menu item gesture area increased

This commit is contained in:
MohammadTaha Basiri 2021-12-23 12:02:09 +03:30
parent d053579173
commit cb52647a35
1 changed files with 25 additions and 22 deletions

View File

@ -24,31 +24,34 @@ class MenuItem extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return GestureDetector( return GestureDetector(
onTap: onTap, onTap: onTap,
child: Row( child: Container(
children: [ color: Colors.transparent,
if (icon != null) Icon(icon, size: 18, color: color), child: Row(
if (icon != null) const SizedBox(width: 4), children: [
DidvanText( if (icon != null) Icon(icon, size: 18, color: color),
title, if (icon != null) const SizedBox(width: 4),
color: color ?? Theme.of(context).colorScheme.title,
),
const Spacer(),
if (suffix != null)
DidvanText( DidvanText(
suffix!, title,
style: Theme.of(context) color: color ?? Theme.of(context).colorScheme.title,
.textTheme
.subtitle2!
.copyWith(fontWeight: FontWeight.w400),
color: Theme.of(context).colorScheme.primary,
), ),
trailing ?? const Spacer(),
Icon( if (suffix != null)
DidvanIcons.angle_left_regular, DidvanText(
size: 18, suffix!,
color: color ?? Theme.of(context).colorScheme.title, style: Theme.of(context)
.textTheme
.subtitle2!
.copyWith(fontWeight: FontWeight.w400),
color: Theme.of(context).colorScheme.primary,
), ),
], trailing ??
Icon(
DidvanIcons.angle_left_regular,
size: 18,
color: color ?? Theme.of(context).colorScheme.title,
),
],
),
), ),
); );
} }