Increased tapping area on the dashbord buttons (#345)

This commit is contained in:
Serhii 2022-04-22 18:02:31 +03:00 committed by GitHub
parent 2e17c59a00
commit 873402ad3c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -23,36 +23,37 @@ class ActionButton extends StatelessWidget {
.display3
.backgroundColor;
return Container(
padding: EdgeInsets.only(top: 14, bottom: 16, left: 10, right: 10),
alignment: alignment,
child: Column(
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
GestureDetector(
onTap: () {
if (route?.isNotEmpty ?? false) {
Navigator.of(context, rootNavigator: true).pushNamed(route);
} else {
onClick?.call();
}
},
child: Container(
return GestureDetector(
onTap: () {
if (route?.isNotEmpty ?? false) {
Navigator.of(context, rootNavigator: true).pushNamed(route);
} else {
onClick?.call();
}
},
child: Container(
color: Colors.transparent,
padding: EdgeInsets.only(top: 14, bottom: 16, left: 10, right: 10),
alignment: alignment,
child: Column(
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Container(
alignment: Alignment.center,
decoration: BoxDecoration(
shape: BoxShape.circle),
child: image,
),
),
SizedBox(height: 4),
Text(
title,
style: TextStyle(
fontSize: 10,
color: _textColor),
)
],
SizedBox(height: 4),
Text(
title,
style: TextStyle(
fontSize: 10,
color: _textColor),
)
],
),
),
);
}