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