menu item gesture area increased
This commit is contained in:
parent
d053579173
commit
cb52647a35
|
|
@ -24,31 +24,34 @@ class MenuItem extends StatelessWidget {
|
|||
Widget build(BuildContext context) {
|
||||
return GestureDetector(
|
||||
onTap: onTap,
|
||||
child: Row(
|
||||
children: [
|
||||
if (icon != null) Icon(icon, size: 18, color: color),
|
||||
if (icon != null) const SizedBox(width: 4),
|
||||
DidvanText(
|
||||
title,
|
||||
color: color ?? Theme.of(context).colorScheme.title,
|
||||
),
|
||||
const Spacer(),
|
||||
if (suffix != null)
|
||||
child: Container(
|
||||
color: Colors.transparent,
|
||||
child: Row(
|
||||
children: [
|
||||
if (icon != null) Icon(icon, size: 18, color: color),
|
||||
if (icon != null) const SizedBox(width: 4),
|
||||
DidvanText(
|
||||
suffix!,
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.subtitle2!
|
||||
.copyWith(fontWeight: FontWeight.w400),
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
title,
|
||||
color: color ?? Theme.of(context).colorScheme.title,
|
||||
),
|
||||
trailing ??
|
||||
Icon(
|
||||
DidvanIcons.angle_left_regular,
|
||||
size: 18,
|
||||
color: color ?? Theme.of(context).colorScheme.title,
|
||||
const Spacer(),
|
||||
if (suffix != null)
|
||||
DidvanText(
|
||||
suffix!,
|
||||
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,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue