diff --git a/packages/wyatt_ui_kit/lib/src/components/buttons/flat_button/flat_button_screen.dart b/packages/wyatt_ui_kit/lib/src/components/buttons/flat_button/flat_button_screen.dart index cffc95da..da65300f 100644 --- a/packages/wyatt_ui_kit/lib/src/components/buttons/flat_button/flat_button_screen.dart +++ b/packages/wyatt_ui_kit/lib/src/components/buttons/flat_button/flat_button_screen.dart @@ -169,7 +169,11 @@ class FlatButtonScreen extends CubitScreen { mainAxisSize: mainAxisSize ?? MainAxisSize.min, mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - if (style.foregroundColors?.color != null && + if (prefix != null && + (prefix is Icon?) && + ((prefix as Icon?)?.color != null)) ...[ + prefix! + ] else if (style.foregroundColors?.color != null && prefix != null) ...[ ColorFiltered( colorFilter: ColorFilter.mode( @@ -208,7 +212,21 @@ class FlatButtonScreen extends CubitScreen { ) ], Gap(style.padding?.vertical ?? 10), - if (style.foregroundColors?.color != null && + if (suffix != null && + (suffix is Icon?) && + ((suffix as Icon?)?.color != null)) ...[ + suffix! + ] else if (style.foregroundColors?.colors != null && + style.foregroundColors!.colors.isNotEmpty && + suffix != null) ...[ + ColorFiltered( + colorFilter: ColorFilter.mode( + style.foregroundColors!.colors.last, + BlendMode.srcIn, + ), + child: suffix, + ) + ] else if (style.foregroundColors?.color != null && suffix != null) ...[ ColorFiltered( colorFilter: ColorFilter.mode(