applied new changes from figma

This commit is contained in:
ashilkn 2022-09-28 12:54:22 +05:30
parent 7756ac81a0
commit e1dae4733d

View file

@ -13,7 +13,6 @@ class MenuItemWidget extends StatelessWidget {
final String? subText; final String? subText;
final TextStyle? textStyle; final TextStyle? textStyle;
final Color? leadingIconColor; final Color? leadingIconColor;
final bool isBigger;
final LeadingIcon? leadingIcon; final LeadingIcon? leadingIcon;
final Widget? leadingSwitch; final Widget? leadingSwitch;
const MenuItemWidget({ const MenuItemWidget({
@ -21,7 +20,6 @@ class MenuItemWidget extends StatelessWidget {
this.subText, this.subText,
this.textStyle, this.textStyle,
this.leadingIconColor, this.leadingIconColor,
this.isBigger = false,
this.leadingIcon, this.leadingIcon,
this.leadingSwitch, this.leadingSwitch,
Key? key, Key? key,
@ -31,46 +29,48 @@ class MenuItemWidget extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
final enteTheme = Theme.of(context).colorScheme.enteTheme; final enteTheme = Theme.of(context).colorScheme.enteTheme;
return Container( return Container(
height: isBigger ? 48 : 44,
width: double.infinity, width: double.infinity,
padding: const EdgeInsets.symmetric(horizontal: 12), padding: const EdgeInsets.symmetric(horizontal: 12),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Row( Padding(
mainAxisAlignment: MainAxisAlignment.spaceBetween, padding: const EdgeInsets.symmetric(vertical: 12),
children: [ child: Row(
Icon( mainAxisAlignment: MainAxisAlignment.spaceBetween,
Icons.add_outlined, children: [
size: 20, Icon(
color: leadingIconColor ?? enteTheme.colorScheme.strokeBase, Icons.add_outlined,
), size: 20,
const SizedBox(width: 12), color: leadingIconColor ?? enteTheme.colorScheme.strokeBase,
Text( ),
text, const SizedBox(width: 12),
style: textStyle ?? enteTheme.textTheme.bodyBold, Text(
), text,
subText != null style: textStyle ?? enteTheme.textTheme.bodyBold,
? Row( ),
children: [ subText != null
Padding( ? Row(
padding: const EdgeInsets.symmetric(horizontal: 4), children: [
child: Text( Padding(
'\u2022', padding: const EdgeInsets.symmetric(horizontal: 4),
style: enteTheme.textTheme.small.copyWith( child: Text(
color: enteTheme.colorScheme.textMuted, '\u2022',
style: enteTheme.textTheme.small.copyWith(
color: enteTheme.colorScheme.textMuted,
),
), ),
), ),
), Text(
Text( subText!,
subText!, style: enteTheme.textTheme.small.copyWith(
style: enteTheme.textTheme.small color: enteTheme.colorScheme.textMuted),
.copyWith(color: enteTheme.colorScheme.textMuted), ),
), ],
], )
) : const SizedBox.shrink(),
: const SizedBox.shrink(), ],
], ),
), ),
SizedBox( SizedBox(
height: 24, height: 24,