Increased tapping area on the dashbord buttons (#345)

Serhii committed Apr 22, 2022 at 18:02 UTC 873402ad3cfd33d8ee004b14d1b858a26070867c
1 file changed +26 -25
lib/src/screens/dashboard/widgets/action_button.dart
+26 -25
@@ -23,36 +23,37 @@ class ActionButton extends StatelessWidget {
23 .display3
24 .backgroundColor;
25
26 - return Container(
27 - padding: EdgeInsets.only(top: 14, bottom: 16, left: 10, right: 10),
28 - alignment: alignment,
29 - child: Column(
30 - mainAxisSize: MainAxisSize.max,
31 - crossAxisAlignment: CrossAxisAlignment.center,
32 - children: <Widget>[
33 - GestureDetector(
34 - onTap: () {
35 - if (route?.isNotEmpty ?? false) {
36 - Navigator.of(context, rootNavigator: true).pushNamed(route);
37 - } else {
38 - onClick?.call();
39 - }
40 - },
41 - child: Container(
26 + return GestureDetector(
27 + onTap: () {
28 + if (route?.isNotEmpty ?? false) {
29 + Navigator.of(context, rootNavigator: true).pushNamed(route);
30 + } else {
31 + onClick?.call();
32 + }
33 + },
34 + child: Container(
35 + color: Colors.transparent,
36 + padding: EdgeInsets.only(top: 14, bottom: 16, left: 10, right: 10),
37 + alignment: alignment,
38 + child: Column(
39 + mainAxisSize: MainAxisSize.max,
40 + crossAxisAlignment: CrossAxisAlignment.center,
41 + children: <Widget>[
42 + Container(
43 alignment: Alignment.center,
44 decoration: BoxDecoration(
45 shape: BoxShape.circle),
46 child: image,
47 ),
47 - ),
48 - SizedBox(height: 4),
49 - Text(
50 - title,
51 - style: TextStyle(
52 - fontSize: 10,
53 - color: _textColor),
54 - )
55 - ],
48 + SizedBox(height: 4),
49 + Text(
50 + title,
51 + style: TextStyle(
52 + fontSize: 10,
53 + color: _textColor),
54 + )
55 + ],
56 + ),
57 ),
58 );
59 }