From af29913525db1d463cfd7a8fc9872268792eb899 Mon Sep 17 00:00:00 2001 From: John Doe Date: Sat, 3 Aug 2024 15:11:29 +0530 Subject: [PATCH 01/31] Added FButton.icon for a single icon button --- forui/lib/src/widgets/button/button.dart | 30 +++++++++++++++---- .../src/widgets/button/button_content.dart | 23 ++++++++++++-- 2 files changed, 46 insertions(+), 7 deletions(-) diff --git a/forui/lib/src/widgets/button/button.dart b/forui/lib/src/widgets/button/button.dart index ca326a73f..fb6df5044 100644 --- a/forui/lib/src/widgets/button/button.dart +++ b/forui/lib/src/widgets/button/button.dart @@ -27,7 +27,8 @@ class FButton extends StatelessWidget { @useResult static _Data _of(BuildContext context) { final theme = context.dependOnInheritedWidgetOfExactType<_InheritedData>(); - return theme?.data ?? (style: context.theme.buttonStyles.primary, enabled: true); + return theme?.data ?? + (style: context.theme.buttonStyles.primary, enabled: true); } /// The style. Defaults to [FButtonStyle.primary]. @@ -99,6 +100,18 @@ class FButton extends StatelessWidget { label: label, ); + /// Creates a [FButton] that contains only an [icon] + FButton.icon({ + required this.onPress, + required Widget icon, + this.style = Variant.outline, + this.onLongPress, + this.autofocus = false, + this.focusNode, + this.onFocusChange, + super.key, + }) : child = _FButtonIconContent(icon: icon); + /// Creates a [FButton] with custom content. const FButton.raw({ required this.onPress, @@ -129,7 +142,8 @@ class FButton extends StatelessWidget { onPress: onPress, onLongPress: onLongPress, child: DecoratedBox( - decoration: enabled ? style.enabledBoxDecoration : style.disabledBoxDecoration, + decoration: + enabled ? style.enabledBoxDecoration : style.disabledBoxDecoration, child: _InheritedData( data: (style: style, enabled: enabled), child: child, @@ -145,7 +159,8 @@ class FButton extends StatelessWidget { ..add(DiagnosticsProperty('style', style)) ..add(DiagnosticsProperty('onPress', onPress)) ..add(DiagnosticsProperty('onLongPress', onLongPress)) - ..add(FlagProperty('autofocus', value: autofocus, defaultValue: false, ifTrue: 'autofocus')) + ..add(FlagProperty('autofocus', + value: autofocus, defaultValue: false, ifTrue: 'autofocus')) ..add(DiagnosticsProperty('focusNode', focusNode)) ..add(DiagnosticsProperty('onFocusChange', onFocusChange)) ..add(DiagnosticsProperty('builder', child)); @@ -233,7 +248,8 @@ class FButtonCustomStyle extends FButtonStyle with Diagnosticable { }) => FButtonCustomStyle( enabledBoxDecoration: enabledBoxDecoration ?? this.enabledBoxDecoration, - disabledBoxDecoration: disabledBoxDecoration ?? this.disabledBoxDecoration, + disabledBoxDecoration: + disabledBoxDecoration ?? this.disabledBoxDecoration, content: content ?? this.content, icon: icon ?? this.icon, ); @@ -259,7 +275,11 @@ class FButtonCustomStyle extends FButtonStyle with Diagnosticable { icon == other.icon; @override - int get hashCode => enabledBoxDecoration.hashCode ^ disabledBoxDecoration.hashCode ^ content.hashCode ^ icon.hashCode; + int get hashCode => + enabledBoxDecoration.hashCode ^ + disabledBoxDecoration.hashCode ^ + content.hashCode ^ + icon.hashCode; } typedef _Data = ({FButtonCustomStyle style, bool enabled}); diff --git a/forui/lib/src/widgets/button/button_content.dart b/forui/lib/src/widgets/button/button_content.dart index 01be48609..b4475194f 100644 --- a/forui/lib/src/widgets/button/button_content.dart +++ b/forui/lib/src/widgets/button/button_content.dart @@ -18,7 +18,9 @@ final class _FButtonContent extends StatelessWidget { return Padding( padding: style.content.padding, child: DefaultTextStyle.merge( - style: enabled ? style.content.enabledTextStyle : style.content.disabledTextStyle, + style: enabled + ? style.content.enabledTextStyle + : style.content.disabledTextStyle, child: Row( mainAxisAlignment: MainAxisAlignment.center, children: separate( @@ -37,6 +39,22 @@ final class _FButtonContent extends StatelessWidget { } } +final class _FButtonIconContent extends StatelessWidget { + final Widget icon; + + const _FButtonIconContent({required this.icon}); + + @override + Widget build(BuildContext context) { + final (:style, enabled: _) = FButton._of(context); + + return Padding( + padding: style.content.padding, + child: icon, + ); + } +} + /// [FButton] content's style. class FButtonContentStyle with Diagnosticable { /// The [TextStyle] when this button is enabled. @@ -121,5 +139,6 @@ class FButtonContentStyle with Diagnosticable { padding == other.padding; @override - int get hashCode => enabledTextStyle.hashCode ^ disabledTextStyle.hashCode ^ padding.hashCode; + int get hashCode => + enabledTextStyle.hashCode ^ disabledTextStyle.hashCode ^ padding.hashCode; } From 3487e11a804a0d0ac24f85dfa4688e30c516121c Mon Sep 17 00:00:00 2001 From: John Doe Date: Sat, 3 Aug 2024 22:50:45 +0530 Subject: [PATCH 02/31] Added sample and docs for FButton.icon --- docs/pages/docs/button.mdx | 20 ++++++++++++++++++-- forui/lib/src/widgets/divider.dart | 2 ++ samples/lib/main.dart | 5 +++++ samples/lib/widgets/button.dart | 15 +++++++++++++++ 4 files changed, 40 insertions(+), 2 deletions(-) diff --git a/docs/pages/docs/button.mdx b/docs/pages/docs/button.mdx index cd7ad8e0a..6880f766f 100644 --- a/docs/pages/docs/button.mdx +++ b/docs/pages/docs/button.mdx @@ -103,7 +103,7 @@ FButton.raw( -### With Icon +### With Text+Icon @@ -117,4 +117,20 @@ FButton.raw( ), ``` - \ No newline at end of file + + +### With Only Icon + + + + + + ```dart {2} + FButton.icon( + icon: FButtonIcon(icon: FAssets.icons.chevronRight), + onPress: () {}, + ), + ``` + + + diff --git a/forui/lib/src/widgets/divider.dart b/forui/lib/src/widgets/divider.dart index 803413b87..8940ddf45 100644 --- a/forui/lib/src/widgets/divider.dart +++ b/forui/lib/src/widgets/divider.dart @@ -168,6 +168,8 @@ final class FDividerStyle with Diagnosticable { ..add(DiagnosticsProperty('padding', padding)) ..add(ColorProperty('color', color)) ..add(DoubleProperty('width', width)); + + FButton.icon(onPress: (){}, icon: FButtonIcon(icon: FAssets.icons.arrowRight),); } @override diff --git a/samples/lib/main.dart b/samples/lib/main.dart index ab3a9f55d..729ebc81d 100644 --- a/samples/lib/main.dart +++ b/samples/lib/main.dart @@ -2,6 +2,7 @@ import 'package:flutter/material.dart' hide DialogRoute; import 'package:auto_route/auto_route.dart'; import 'package:flutter_web_plugins/flutter_web_plugins.dart'; +import 'package:forui/forui.dart'; import 'package:forui_samples/main.gr.dart'; import 'package:forui_samples/sample_scaffold.dart'; @@ -71,6 +72,10 @@ class _AppRouter extends RootStackRouter { path: '/button/icon', page: ButtonIconRoute.page, ), + AutoRoute( + path: '/button/only-icon', + page: ButtonOnlyIconRoute.page, + ), AutoRoute( path: '/calendar/default', page: CalendarRoute.page, diff --git a/samples/lib/widgets/button.dart b/samples/lib/widgets/button.dart index 5ade2741e..a59a73378 100644 --- a/samples/lib/widgets/button.dart +++ b/samples/lib/widgets/button.dart @@ -52,3 +52,18 @@ class ButtonIconPage extends SampleScaffold { ), ); } + +@RoutePage() +class ButtonOnlyIconPage extends SampleScaffold { + ButtonOnlyIconPage({ + @queryParam super.theme, + }); + + @override + Widget child(BuildContext context) => IntrinsicWidth( + child: FButton.icon( + icon: FButtonIcon(icon: FAssets.icons.chevronRight), + onPress: () {}, + ), + ); +} From 30d6b16450cbcea9b5d3665e10c2ab013ab8f2d2 Mon Sep 17 00:00:00 2001 From: John Doe Date: Sat, 3 Aug 2024 15:11:29 +0530 Subject: [PATCH 03/31] Added FButton.icon for a single icon button --- forui/lib/src/widgets/button/button.dart | 30 +++++++++++++++---- .../src/widgets/button/button_content.dart | 23 ++++++++++++-- 2 files changed, 46 insertions(+), 7 deletions(-) diff --git a/forui/lib/src/widgets/button/button.dart b/forui/lib/src/widgets/button/button.dart index ca326a73f..fb6df5044 100644 --- a/forui/lib/src/widgets/button/button.dart +++ b/forui/lib/src/widgets/button/button.dart @@ -27,7 +27,8 @@ class FButton extends StatelessWidget { @useResult static _Data _of(BuildContext context) { final theme = context.dependOnInheritedWidgetOfExactType<_InheritedData>(); - return theme?.data ?? (style: context.theme.buttonStyles.primary, enabled: true); + return theme?.data ?? + (style: context.theme.buttonStyles.primary, enabled: true); } /// The style. Defaults to [FButtonStyle.primary]. @@ -99,6 +100,18 @@ class FButton extends StatelessWidget { label: label, ); + /// Creates a [FButton] that contains only an [icon] + FButton.icon({ + required this.onPress, + required Widget icon, + this.style = Variant.outline, + this.onLongPress, + this.autofocus = false, + this.focusNode, + this.onFocusChange, + super.key, + }) : child = _FButtonIconContent(icon: icon); + /// Creates a [FButton] with custom content. const FButton.raw({ required this.onPress, @@ -129,7 +142,8 @@ class FButton extends StatelessWidget { onPress: onPress, onLongPress: onLongPress, child: DecoratedBox( - decoration: enabled ? style.enabledBoxDecoration : style.disabledBoxDecoration, + decoration: + enabled ? style.enabledBoxDecoration : style.disabledBoxDecoration, child: _InheritedData( data: (style: style, enabled: enabled), child: child, @@ -145,7 +159,8 @@ class FButton extends StatelessWidget { ..add(DiagnosticsProperty('style', style)) ..add(DiagnosticsProperty('onPress', onPress)) ..add(DiagnosticsProperty('onLongPress', onLongPress)) - ..add(FlagProperty('autofocus', value: autofocus, defaultValue: false, ifTrue: 'autofocus')) + ..add(FlagProperty('autofocus', + value: autofocus, defaultValue: false, ifTrue: 'autofocus')) ..add(DiagnosticsProperty('focusNode', focusNode)) ..add(DiagnosticsProperty('onFocusChange', onFocusChange)) ..add(DiagnosticsProperty('builder', child)); @@ -233,7 +248,8 @@ class FButtonCustomStyle extends FButtonStyle with Diagnosticable { }) => FButtonCustomStyle( enabledBoxDecoration: enabledBoxDecoration ?? this.enabledBoxDecoration, - disabledBoxDecoration: disabledBoxDecoration ?? this.disabledBoxDecoration, + disabledBoxDecoration: + disabledBoxDecoration ?? this.disabledBoxDecoration, content: content ?? this.content, icon: icon ?? this.icon, ); @@ -259,7 +275,11 @@ class FButtonCustomStyle extends FButtonStyle with Diagnosticable { icon == other.icon; @override - int get hashCode => enabledBoxDecoration.hashCode ^ disabledBoxDecoration.hashCode ^ content.hashCode ^ icon.hashCode; + int get hashCode => + enabledBoxDecoration.hashCode ^ + disabledBoxDecoration.hashCode ^ + content.hashCode ^ + icon.hashCode; } typedef _Data = ({FButtonCustomStyle style, bool enabled}); diff --git a/forui/lib/src/widgets/button/button_content.dart b/forui/lib/src/widgets/button/button_content.dart index 01be48609..b4475194f 100644 --- a/forui/lib/src/widgets/button/button_content.dart +++ b/forui/lib/src/widgets/button/button_content.dart @@ -18,7 +18,9 @@ final class _FButtonContent extends StatelessWidget { return Padding( padding: style.content.padding, child: DefaultTextStyle.merge( - style: enabled ? style.content.enabledTextStyle : style.content.disabledTextStyle, + style: enabled + ? style.content.enabledTextStyle + : style.content.disabledTextStyle, child: Row( mainAxisAlignment: MainAxisAlignment.center, children: separate( @@ -37,6 +39,22 @@ final class _FButtonContent extends StatelessWidget { } } +final class _FButtonIconContent extends StatelessWidget { + final Widget icon; + + const _FButtonIconContent({required this.icon}); + + @override + Widget build(BuildContext context) { + final (:style, enabled: _) = FButton._of(context); + + return Padding( + padding: style.content.padding, + child: icon, + ); + } +} + /// [FButton] content's style. class FButtonContentStyle with Diagnosticable { /// The [TextStyle] when this button is enabled. @@ -121,5 +139,6 @@ class FButtonContentStyle with Diagnosticable { padding == other.padding; @override - int get hashCode => enabledTextStyle.hashCode ^ disabledTextStyle.hashCode ^ padding.hashCode; + int get hashCode => + enabledTextStyle.hashCode ^ disabledTextStyle.hashCode ^ padding.hashCode; } From f78b1b8234749010302d0a0a8f3a089ad65c6319 Mon Sep 17 00:00:00 2001 From: John Doe Date: Sat, 3 Aug 2024 22:50:45 +0530 Subject: [PATCH 04/31] Added sample and docs for FButton.icon --- docs/pages/docs/button.mdx | 20 ++++++++++++++++++-- forui/lib/src/widgets/divider.dart | 2 ++ samples/lib/main.dart | 5 +++++ samples/lib/widgets/button.dart | 15 +++++++++++++++ 4 files changed, 40 insertions(+), 2 deletions(-) diff --git a/docs/pages/docs/button.mdx b/docs/pages/docs/button.mdx index cd7ad8e0a..6880f766f 100644 --- a/docs/pages/docs/button.mdx +++ b/docs/pages/docs/button.mdx @@ -103,7 +103,7 @@ FButton.raw( -### With Icon +### With Text+Icon @@ -117,4 +117,20 @@ FButton.raw( ), ``` - \ No newline at end of file + + +### With Only Icon + + + + + + ```dart {2} + FButton.icon( + icon: FButtonIcon(icon: FAssets.icons.chevronRight), + onPress: () {}, + ), + ``` + + + diff --git a/forui/lib/src/widgets/divider.dart b/forui/lib/src/widgets/divider.dart index 803413b87..8940ddf45 100644 --- a/forui/lib/src/widgets/divider.dart +++ b/forui/lib/src/widgets/divider.dart @@ -168,6 +168,8 @@ final class FDividerStyle with Diagnosticable { ..add(DiagnosticsProperty('padding', padding)) ..add(ColorProperty('color', color)) ..add(DoubleProperty('width', width)); + + FButton.icon(onPress: (){}, icon: FButtonIcon(icon: FAssets.icons.arrowRight),); } @override diff --git a/samples/lib/main.dart b/samples/lib/main.dart index ab3a9f55d..729ebc81d 100644 --- a/samples/lib/main.dart +++ b/samples/lib/main.dart @@ -2,6 +2,7 @@ import 'package:flutter/material.dart' hide DialogRoute; import 'package:auto_route/auto_route.dart'; import 'package:flutter_web_plugins/flutter_web_plugins.dart'; +import 'package:forui/forui.dart'; import 'package:forui_samples/main.gr.dart'; import 'package:forui_samples/sample_scaffold.dart'; @@ -71,6 +72,10 @@ class _AppRouter extends RootStackRouter { path: '/button/icon', page: ButtonIconRoute.page, ), + AutoRoute( + path: '/button/only-icon', + page: ButtonOnlyIconRoute.page, + ), AutoRoute( path: '/calendar/default', page: CalendarRoute.page, diff --git a/samples/lib/widgets/button.dart b/samples/lib/widgets/button.dart index 5ade2741e..a59a73378 100644 --- a/samples/lib/widgets/button.dart +++ b/samples/lib/widgets/button.dart @@ -52,3 +52,18 @@ class ButtonIconPage extends SampleScaffold { ), ); } + +@RoutePage() +class ButtonOnlyIconPage extends SampleScaffold { + ButtonOnlyIconPage({ + @queryParam super.theme, + }); + + @override + Widget child(BuildContext context) => IntrinsicWidth( + child: FButton.icon( + icon: FButtonIcon(icon: FAssets.icons.chevronRight), + onPress: () {}, + ), + ); +} From 8bd0fd20ab72728449e558af6c1e9fd7b8aaab28 Mon Sep 17 00:00:00 2001 From: Pante Date: Sun, 4 Aug 2024 12:17:15 +0000 Subject: [PATCH 05/31] Commit from GitHub Actions (Forui Samples Presubmit) --- samples/lib/main.dart | 1 - 1 file changed, 1 deletion(-) diff --git a/samples/lib/main.dart b/samples/lib/main.dart index 729ebc81d..38b8f45b6 100644 --- a/samples/lib/main.dart +++ b/samples/lib/main.dart @@ -2,7 +2,6 @@ import 'package:flutter/material.dart' hide DialogRoute; import 'package:auto_route/auto_route.dart'; import 'package:flutter_web_plugins/flutter_web_plugins.dart'; -import 'package:forui/forui.dart'; import 'package:forui_samples/main.gr.dart'; import 'package:forui_samples/sample_scaffold.dart'; From 7edd519996c29973a96c29c291bf30a764004b97 Mon Sep 17 00:00:00 2001 From: Pante Date: Sun, 4 Aug 2024 12:36:36 +0000 Subject: [PATCH 06/31] Commit from GitHub Actions (Forui Presubmit) --- forui/lib/src/widgets/button/button.dart | 18 +++++------------- .../lib/src/widgets/button/button_content.dart | 7 ++----- forui/lib/src/widgets/divider.dart | 5 ++++- 3 files changed, 11 insertions(+), 19 deletions(-) diff --git a/forui/lib/src/widgets/button/button.dart b/forui/lib/src/widgets/button/button.dart index fb6df5044..e422027cf 100644 --- a/forui/lib/src/widgets/button/button.dart +++ b/forui/lib/src/widgets/button/button.dart @@ -27,8 +27,7 @@ class FButton extends StatelessWidget { @useResult static _Data _of(BuildContext context) { final theme = context.dependOnInheritedWidgetOfExactType<_InheritedData>(); - return theme?.data ?? - (style: context.theme.buttonStyles.primary, enabled: true); + return theme?.data ?? (style: context.theme.buttonStyles.primary, enabled: true); } /// The style. Defaults to [FButtonStyle.primary]. @@ -142,8 +141,7 @@ class FButton extends StatelessWidget { onPress: onPress, onLongPress: onLongPress, child: DecoratedBox( - decoration: - enabled ? style.enabledBoxDecoration : style.disabledBoxDecoration, + decoration: enabled ? style.enabledBoxDecoration : style.disabledBoxDecoration, child: _InheritedData( data: (style: style, enabled: enabled), child: child, @@ -159,8 +157,7 @@ class FButton extends StatelessWidget { ..add(DiagnosticsProperty('style', style)) ..add(DiagnosticsProperty('onPress', onPress)) ..add(DiagnosticsProperty('onLongPress', onLongPress)) - ..add(FlagProperty('autofocus', - value: autofocus, defaultValue: false, ifTrue: 'autofocus')) + ..add(FlagProperty('autofocus', value: autofocus, defaultValue: false, ifTrue: 'autofocus')) ..add(DiagnosticsProperty('focusNode', focusNode)) ..add(DiagnosticsProperty('onFocusChange', onFocusChange)) ..add(DiagnosticsProperty('builder', child)); @@ -248,8 +245,7 @@ class FButtonCustomStyle extends FButtonStyle with Diagnosticable { }) => FButtonCustomStyle( enabledBoxDecoration: enabledBoxDecoration ?? this.enabledBoxDecoration, - disabledBoxDecoration: - disabledBoxDecoration ?? this.disabledBoxDecoration, + disabledBoxDecoration: disabledBoxDecoration ?? this.disabledBoxDecoration, content: content ?? this.content, icon: icon ?? this.icon, ); @@ -275,11 +271,7 @@ class FButtonCustomStyle extends FButtonStyle with Diagnosticable { icon == other.icon; @override - int get hashCode => - enabledBoxDecoration.hashCode ^ - disabledBoxDecoration.hashCode ^ - content.hashCode ^ - icon.hashCode; + int get hashCode => enabledBoxDecoration.hashCode ^ disabledBoxDecoration.hashCode ^ content.hashCode ^ icon.hashCode; } typedef _Data = ({FButtonCustomStyle style, bool enabled}); diff --git a/forui/lib/src/widgets/button/button_content.dart b/forui/lib/src/widgets/button/button_content.dart index b4475194f..3d673abed 100644 --- a/forui/lib/src/widgets/button/button_content.dart +++ b/forui/lib/src/widgets/button/button_content.dart @@ -18,9 +18,7 @@ final class _FButtonContent extends StatelessWidget { return Padding( padding: style.content.padding, child: DefaultTextStyle.merge( - style: enabled - ? style.content.enabledTextStyle - : style.content.disabledTextStyle, + style: enabled ? style.content.enabledTextStyle : style.content.disabledTextStyle, child: Row( mainAxisAlignment: MainAxisAlignment.center, children: separate( @@ -139,6 +137,5 @@ class FButtonContentStyle with Diagnosticable { padding == other.padding; @override - int get hashCode => - enabledTextStyle.hashCode ^ disabledTextStyle.hashCode ^ padding.hashCode; + int get hashCode => enabledTextStyle.hashCode ^ disabledTextStyle.hashCode ^ padding.hashCode; } diff --git a/forui/lib/src/widgets/divider.dart b/forui/lib/src/widgets/divider.dart index 8940ddf45..6d3503c66 100644 --- a/forui/lib/src/widgets/divider.dart +++ b/forui/lib/src/widgets/divider.dart @@ -169,7 +169,10 @@ final class FDividerStyle with Diagnosticable { ..add(ColorProperty('color', color)) ..add(DoubleProperty('width', width)); - FButton.icon(onPress: (){}, icon: FButtonIcon(icon: FAssets.icons.arrowRight),); + FButton.icon( + onPress: () {}, + icon: FButtonIcon(icon: FAssets.icons.arrowRight), + ); } @override From 9ab48058c5cdd5cb118fc15582f8b0bf84ad5370 Mon Sep 17 00:00:00 2001 From: Somye Date: Sat, 10 Aug 2024 14:12:07 +0530 Subject: [PATCH 07/31] Added golden images --- ...riant.destructive-icon-disabled-button.png | Bin 0 -> 22601 bytes ...ariant.destructive-icon-enabled-button.png | Bin 0 -> 22767 bytes ...k-Variant.outline-icon-disabled-button.png | Bin 0 -> 23184 bytes ...rk-Variant.outline-icon-enabled-button.png | Bin 0 -> 23380 bytes ...k-Variant.primary-icon-disabled-button.png | Bin 0 -> 22710 bytes ...rk-Variant.primary-icon-enabled-button.png | Bin 0 -> 22940 bytes ...Variant.secondary-icon-disabled-button.png | Bin 0 -> 22540 bytes ...-Variant.secondary-icon-enabled-button.png | Bin 0 -> 22681 bytes ...riant.destructive-icon-disabled-button.png | Bin 0 -> 22544 bytes ...ariant.destructive-icon-enabled-button.png | Bin 0 -> 22710 bytes ...t-Variant.outline-icon-disabled-button.png | Bin 0 -> 22910 bytes ...ht-Variant.outline-icon-enabled-button.png | Bin 0 -> 23199 bytes ...t-Variant.primary-icon-disabled-button.png | Bin 0 -> 22703 bytes ...ht-Variant.primary-icon-enabled-button.png | Bin 0 -> 22927 bytes ...Variant.secondary-icon-disabled-button.png | Bin 0 -> 22110 bytes ...-Variant.secondary-icon-enabled-button.png | Bin 0 -> 22466 bytes .../widgets/button/button_golden_test.dart | 60 +++++++++++++++++- 17 files changed, 58 insertions(+), 2 deletions(-) create mode 100644 forui/test/golden/button/zinc-dark-Variant.destructive-icon-disabled-button.png create mode 100644 forui/test/golden/button/zinc-dark-Variant.destructive-icon-enabled-button.png create mode 100644 forui/test/golden/button/zinc-dark-Variant.outline-icon-disabled-button.png create mode 100644 forui/test/golden/button/zinc-dark-Variant.outline-icon-enabled-button.png create mode 100644 forui/test/golden/button/zinc-dark-Variant.primary-icon-disabled-button.png create mode 100644 forui/test/golden/button/zinc-dark-Variant.primary-icon-enabled-button.png create mode 100644 forui/test/golden/button/zinc-dark-Variant.secondary-icon-disabled-button.png create mode 100644 forui/test/golden/button/zinc-dark-Variant.secondary-icon-enabled-button.png create mode 100644 forui/test/golden/button/zinc-light-Variant.destructive-icon-disabled-button.png create mode 100644 forui/test/golden/button/zinc-light-Variant.destructive-icon-enabled-button.png create mode 100644 forui/test/golden/button/zinc-light-Variant.outline-icon-disabled-button.png create mode 100644 forui/test/golden/button/zinc-light-Variant.outline-icon-enabled-button.png create mode 100644 forui/test/golden/button/zinc-light-Variant.primary-icon-disabled-button.png create mode 100644 forui/test/golden/button/zinc-light-Variant.primary-icon-enabled-button.png create mode 100644 forui/test/golden/button/zinc-light-Variant.secondary-icon-disabled-button.png create mode 100644 forui/test/golden/button/zinc-light-Variant.secondary-icon-enabled-button.png diff --git a/forui/test/golden/button/zinc-dark-Variant.destructive-icon-disabled-button.png b/forui/test/golden/button/zinc-dark-Variant.destructive-icon-disabled-button.png new file mode 100644 index 0000000000000000000000000000000000000000..8ca016387aa65fc549c27b9e079a40334ea01613 GIT binary patch literal 22601 zcmeHPdpuOz9^Z9(=s|Rj%G=?HLZ?Fy$&_4i((QR9qA`_6Y09I>+jP<=gi@)LMo(0j zNohRCbkGzH?x|=_p|})-$z#kJ&%4)Nd*a@I@BQc8mVajL^;_$=_WJJc@3DTfN9@+k z_KGvrXJQzpxZ!8p?HD$LhGEkc6sF-l`L743;2)EYY`3?;a;i1k@rx-(Y&JM5;D6x? z9x)iEi*2x7=NO#Y`Nuj%o-W3-etPCbY2%IKk@L>2o~l~woh{YCC&53>t5MVCZR}ko zW2*c@S&c1kVtU`qleeusc$4MrnAy(qCYCg5mb|TNMw=vW+fFl)HyO{6ayb?V7Q_~k z3&@C&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I_E3Ne9(Q~hNKJycI%Vf^T}=+*{ue<{mJgn$ZohrV#8=R0K%3f6FSbm z@efx}bu=Ns!z#~YfojT;79lV+Sc=o>1f6_;X81tuEos$Rb#ehc40y16>*(7ejbK^K zf1H77=Xcch;R}voM>MRmj%i;6ZeQF-EfzC ztEf1BNg;&wc>`T9Xw3OTWBaZphjLA+57Gc?#%my&$$=atdhHA1R6aYBY-0+$x%lm} zymy56tc9NWrf+6_fMu-y3)r|6D)YB0FsP7(fr1E+@Qd7fPdk%r6)xoD|hU}p5{9Wvi2me}0v>U=(G-a+a+p1)rFXp|> zkFS&#c|D6H!WI|E9n-J_jN79Uu68~L8Xqmla$XSlBH z8wtt-^hm+r6K3>RHeL#=u5cVGuBa0+f=VxcZIS+M?q8@E`mf*5iFP-F)LasfxzTWTo4Hm2?zvGUXLM5fJlHyfOh!s zt-DFRnfYg8f^5s5lkhw*7W`j;|6Ta}jNh2!0}?v+2Dy;Y;6a@+{@L|Bk)0B2F-FbM z$0JN24u}vC2MiGc5duTnfV2VsYJ~hHK?9@>NE?tgkQ_k1K>-9Zj}QrD9+7!O=22l4 zkTxJ~m_*vJjdzsziHmWmC~^)jjyN@n6M$_;9Ni(PkfJpHBN)^SwF6-SaX>tQIADkn c|1CmH{W8Gg^8(#9@!$b=o1AEOHhO*cFE@4P3jhEB literal 0 HcmV?d00001 diff --git a/forui/test/golden/button/zinc-dark-Variant.outline-icon-disabled-button.png b/forui/test/golden/button/zinc-dark-Variant.outline-icon-disabled-button.png new file mode 100644 index 0000000000000000000000000000000000000000..8c27e01ccd8a640086c599f8dd7cb8c6d4492b83 GIT binary patch literal 23184 zcmeHPYgAKL7QQ|~r9w)ph=PnLw1t8)R1rd;7L8besg{Qb1m(3N5=40gLWtH@EEKdT zs8N{K3JypJurxpj#6gJ|kxGh)Jii!7`Vt_b0eExOx)xPJSzb7<6g!WY_k1AS!I>}u1qs@{Je+|l0tVM6a zuXXHrHB}jDe#ly)`l7Xlt12QJ7Ohg1?f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%v(HQ1sRKD&&7sV{cxdqcDY_A-9Jn&}>1_Xha;6Ok^Kte!o zP;vmOrV0osk5C?=H$ZPd5r9$vr2t9+lmaLPa|iw5;u`k{7#m=0c;{lnO>Z0QsF==+ zP}?&t_X&t_BX%$iqrzVN7#S$TpK<3vASO5vkPwg%$UEo_AKcyhjnAfUE4G8j@3_<1 KfwRN+)V}~#NOKPW literal 0 HcmV?d00001 diff --git a/forui/test/golden/button/zinc-dark-Variant.outline-icon-enabled-button.png b/forui/test/golden/button/zinc-dark-Variant.outline-icon-enabled-button.png new file mode 100644 index 0000000000000000000000000000000000000000..5f3cdbe79aa134a4ea1e63a6ddfc1b5d982279ce GIT binary patch literal 23380 zcmeHPYgALm7Cu@PRD4oUAP}T2Dk4-x1VliKqLhLcAD~1)k%x%E01AR8v|3S7sO445 zBV4V8+dx22f`kyPLewCrEQsM19s&mBC9i}Ka?dLlu6Nyk_x|W|vKA|I&g?mR=9|60 zy=Tslt9zXt7A??T071~AJ-h8)A!xog1gWU1&V%n1*GTFH zX)4Mx)bu=huJU53R=%UDs7F=K*sx$?# zJO{fLxGjK;=Lb=}nIk~}(30*Jx$!_DEpkG?gDR?@c?edd2WE%hMy68ZHP_EJ}^g$$2LIK?b0a}U06_8pep#Z4`NJMd4_}|A+ zf(|KMc^1GPL?xxqfv5zQjkqlU`UUj+f1}^O0Oh_4YDBkm3>>x2pu2TQrRQ=EGEU_o$Ik5Z(LExGe%G+n-B{D-p2Q3;6$#oDt!-^b zn?#};Y_@DjBFXPNgCHw0b+Wl&ZD|Yr)LI>vlx+6Tt>6yR^0}nP|Lx=p<{3`z{xPdR-O)v-#eUJIXoO_y)CygvaiOP z`0V&bEjGK5wr!QAjP-qUBu9^{pl)U|nU#D#Undw*Tuw7UdmZ6FHrCZKG7{#LRqNKx zs0)Pq8y^!RqtIx!8T96BBW@dE6pr0nIV?S9tQor@^@XQ=5*~dToqi)m#YG)C_*S|a z4W-fHZwCiYpO=PA_S7?YJRaqo^hm^T!m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shg?zjwcu7Z=JwgZw%yY-GaW*GxT;0BVPI5;@0O-qaO!dG!}xWi>xZ22R1F!CqT z@%{9nsdewOtlo|eZp)KyH^R{=LRopE2oWzmJ-wb&BIi5WQ~OakIoeFb3c)*BKsT)` z2i~mhZhIQ?$i2>Ye5ieWd)PRi>|qXjynN&pu|E0bU4hhQPb1|7JnAC-9~twU7mSZr z>$M9rc%hRyg2kJ0|Ct*4$Cy*KNEALmgkw)PU1uAHTZe!HqPN%9)LdE1$h^Wg`LbAiz?iXIa>*?p_}7xM&9KDTVJCEq5~sc3fyKpLBZ_R{0V zXfHn@tMIeALD=UL18aVL{?MIYg~x))=@}Uf9FXxV=0p2o@1eEy3ZFLRibtBXtNHn_ zoBi&3cn|sKhkXgi4;epZpg+t|2J3r6_CIp$SgvDXXucyaD7&Vnrk=AcQXpU^3>8f= z_V3@nCL|=wiw};eV-&t;E?nM4{+TWMpJcVIfnQ z7Vc=vSeY<3=C8*Dq9<68e94v^qy0U-z18OyX;h`&;(Yh&)vHGuz7pQ;g+CY?8g_SA zC*>3rIN+h1rxnc%6=XrbK4$^Ak0Ceubw><{1Ox(z1jrJ6 z<#z{U36Lcq5I~jyS%SYdFih6wb1`h`4)A{g{_B}UwV5l3*ThmE^Ejo0ogNFPzdTi+ z{21_}riDM2KVc|_(B znMcYhAZnjt_46Ot&15Qq@i cU#bmrf7r0WV%OrtE&%k-?UtsQTb+OUH+6q$zyJUM literal 0 HcmV?d00001 diff --git a/forui/test/golden/button/zinc-dark-Variant.primary-icon-enabled-button.png b/forui/test/golden/button/zinc-dark-Variant.primary-icon-enabled-button.png new file mode 100644 index 0000000000000000000000000000000000000000..acdd2c4a7b362996af69934bcabb15583f6358d4 GIT binary patch literal 22940 zcmeHPX;@Ro8a^rts0eC7*$Ub!wIWzc0fAsdky;llxS?TD6e!3d0f8itP%J746kDMP zgxFr8mMt1Fph98+L8yQh39>0m*dam@kS#rP&Pn09{c-Q}^v8Yf zzvUcq>A-#)rNtVH5d=}%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c-dark-Variant.secondary-icon-disabled-button.png new file mode 100644 index 0000000000000000000000000000000000000000..02f59e70e03951e8c84698a77ab069cb430a5ad7 GIT binary patch literal 22540 zcmeHPdpMNa8vnFqREXLY5mHeRrBmA_mt-GZRcdGCHkFCaE+w}JGrMewPzk399Zu=V zEn+rPOvjEgp|&=5ll!B=U`WHb#QD~@zS%r`|5-g}pQkndd~2aytL`o4R0( zWX_aS6jgF1MNI3fg_5$R8)t^394<$d6tOE(b0lR=Lz|{cVnf;>QlIOGV*_$AwA1P)#Dd>&W4xo<&26O#MaBF zxjyM>`($kD-RDgUlryGIRa>W};ATzRR!L2r!O`Rrw~A>Yu}Ea0h|nSt1rr(3RC*uz z76~jgk;|2c0=t4Dkwg~ZC_qa@VTraD5>cS71=@&8uwea}V(6v*xIW2U0Aj7rwGf&d zmjDWRQ`bUJ$dlMM3VA5WKw{x9b!@D*nG4uTb%>|yaSd(n)Vh|And@xs! zNz(yGJVjYTdm;0^tM6wEj8bZjR2!EoItA<13=9ozba7=wxt6+A@OZqJ=fP}ZRcQFa zhOP&f1iq?*K(E&BGSetyeB7XNy9t;-_=9l?V-hU&vYi-XV9Vky%J~MAh0nWu7V`?D zPVmBZ*r)IYN7O7B6Ur7L(q!RqW* zhH(_H*SwlPC?4ufEL{%n*PWrjm!UYu)87bP%aaB>SB-1ei45cE(K)V@$}tt~oyK6A zlpBsi;7MUO3)^%jPI^~+l{UvD1CINYwWD_~Uo?XONEH};9 zxgsh1>wy|v&m?6hNipWXoG)&H@)(21+#V0-`ZS&X$0Ox{lc5zvMzY~qp574$Cr(>R zfu6Tsq`L)9Vm>-^5y+z9BG0QJ|7~2#dUZSHna@P(Bj(DXmQf9 zUaGuxON5=9+t$Rr=XA<8uUCzCTvg>RaNm)oe7D8X}~u z&NyAXY0lE7jwRLB<39R(p1HN%QSLrPOx-=OLk?fTaz$-dx=4CsXg=U!PYfa8)OoCV zd%12}1p66JazX$vap8wEo;ZAkmojYNHkB0(doP@p5S*R`ns)R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WQ=!~8wY-x0zaB6JKm0}GVl&i#6)FR3W@X1BF`Yq zAP^uXKumxk5FijB5a1ORstHg{fIxuK!GFjE7sRd&7&hAs{9gcaf%dQH^^J9L7(4@P zb-#^0tvGHzkWEsDU7*QxhD%-0MBUH}$R}`P9svRc35*BC5F{-i)+8K(0D%C3iUkq_ zsDPpzf#?y@BZ>wT4Y&so6(A}=RDh`9y`zG(upW5m-21FZX&h$Yggao9+CP50FJ1u8 t;6YrVZX!I8PY6FCoREG%fcRelV&>p!Z^I|jqzG^W=k+eMY)9`SzX5$)FeU&1 literal 0 HcmV?d00001 diff --git a/forui/test/golden/button/zinc-light-Variant.destructive-icon-disabled-button.png b/forui/test/golden/button/zinc-light-Variant.destructive-icon-disabled-button.png new file mode 100644 index 0000000000000000000000000000000000000000..e6d980956baa796572afe34480b2454c994af219 GIT binary patch literal 22544 zcmeHPX;f257Jdk_IMAY^BD8?CE!rYPKtLfZ4vKhCq*bs%F^V)Q$kNCnTjCBL2kr5w zC>m^O1;GFj5hMaZTv|aQGZMhC2_j2a1Wdw~Ft1*{DE+U;@$@+}Q|||_s$SiyTlaqV z-l|JM;--zx8q;*9VHl?2vd-yy3{#_Fn2M^ZGTu^HGpdBY6vDoDUX5i}ecgpul)_fK zY*EFZSk*lV7-oREI5}>Ky3+I7Q3G3`$>p|<$M{&hoW9_a`zD1Q=H~i134ET)1Pbyp zmSaZySaDJ|mbWv0V@#EoHRt8Zi_Zg42c&S=mKYsP<*;1;3!iw+K8Dt!8l=uBq&V^kJzWP)XYitG3C={YTcx)p4udDs_<#+ zy>OB^(cp3;b3kH|ivlx5Xpzf86B&_Q6b$5BKK&vExm-Cc3{WJJivs%@1!%b}(7pxj zxJWFZ82SbG=iZqmr{s45fP9hrMdu^Z&d?DC9e7D7puIXukC0Hns#*1lpuG3OT+=6m zg5Zf&zQs&xVrkpkJ-2=0M9m$dT7Oe;(aS)S5ZZQ?3bTlg4qr)y>4Y`@Hm>N|I&RAH zXzLXBhJL8BY3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mV?d00001 diff --git a/forui/test/golden/button/zinc-light-Variant.outline-icon-disabled-button.png b/forui/test/golden/button/zinc-light-Variant.outline-icon-disabled-button.png new file mode 100644 index 0000000000000000000000000000000000000000..917a35b44a462b626b6dbe5e9cdc64cae4822dff GIT binary patch literal 22910 zcmeHPX;f3!7QQG&Xi-ocKoJmq@-~JIYrQT{esIq{Ipf~n{`Nkb zvyys{=)Cm9wI3n~vead-lRJWF1R%%~b#*ngrlNIP6@93D?e6S|Fdpi^MqgCFc62$S zj(+0RkEbAr5#r*s`v^5}sB`yHWP>(`Bc6>TSv}I)aQVMQi1Fgp%Cf_8&LU+wMbk@JL@ud(q%0f3!Ih$bVu5H; zVgVWvR2OT@ZmM!S-Ax@16ZUv~fWp`mY=b3=}NcV{GmM{HZ9dYPq}r{dh$X6v-* zT|~5ZL26E80VS%ui=Q_wkcsL72a3EqZLL^fL2z)TF&ROzC`Ex>f@o37A_W?eQWOr5 zTa=i=%C;IOA&?^N?5?q0tTWAEc|&s^e4MjgUY)A=wyH1L~w8f zx;%I$RTwnncF662I=BCCl>61h5EhkvH6okw$_#!c;dx~W*7$R+T!V7xw|o-fWPUE_ z3^XPly^ii_p0J517YOF;wAii8;G8>NOhFKvbm74Z>3YzPAL$dneFa+TY4OPn&f{lM z*j;&1(%j2*a#(rpt!~L3D_6e3642C88_PAtJMwOy=k@P0&*EvhRZX*MBg%ZzTSL|c zrF>JHDUe>0&CG?TKexY3w~VP4wGXo#0lm=N6zjQ%u7^Y-iW8IK!%BT_bbZkhz9ZD~ zA>o8~CZ+m8WXWcUY^I^xvxKaFVM&Pw*s7f#c0A*loUHWaPQ@qwLmI*+r8fi;YNj5b zgAt1+vR_Izv{|L2i{(a?C-fahJ0UeDSnh0c6PWBYo9)N^qNQCT3#t~`P)rMkPqWh} zre>pzJ7cQ#xZ>W_!(gV-bSzcUb1ySkFG)T(9`)q$iBbcun9{!Ou5OSSPnSR-h+}fQ z6U#}=JBCU6H?Dx&eAI3D`hJ>|3c9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L+6wYmEl3JP66~-dg8?%IdwsQkf z;h0%!;$v`f=#?j3pY`|WE-wmXOxM=kj#-`7_8K$Bjd*Z+zGw7bS40e*z_G{Xgzh0X zw~}J_Oy1Q?Sm-rrh41+Dg92$rz=_h1%+?UwKBwk;A!Vk*;Rt!HuR%r?s}+;DTJ<(` z^ThQ`~3AHgbyO_uOG`O^5q&t^xUYIoBk+LAh)AjC_^$Yw7OeZhb!&!X0YR}^0 zwUll2-`9ejXX756qxvSnAKlMCQPs#v9v;D!Hm1(bY0FK5!Um=Ee}6G}vLao;az&@} z!nnsm1v5#ShWCxO;4&ZoDN@VR{z9RP$wU#VtgYql(%_!WQfIAZ+lgo156We4p+KPn=ApWue5`- z?ieN3!^2~B8Vg;|B5N?P2JTFn8zaimIfYDya8>oL*!>7cBDy>X2+zEN2Oduo_4K{Xm)Ea)5xqEmMpb~&o0IA?Tp@M6E*4VEH=su6MO%^pR=WN36^I`fw wu;`B;7J$_Xi-0o01pxs80fAnQ{VOrV%3J4sv=Wo&v1@uRdx%a9$AItt12^o^egFUf literal 0 HcmV?d00001 diff --git a/forui/test/golden/button/zinc-light-Variant.outline-icon-enabled-button.png b/forui/test/golden/button/zinc-light-Variant.outline-icon-enabled-button.png new file mode 100644 index 0000000000000000000000000000000000000000..780bc9959d311d1039e8ae3c8c6772887ec2f896 GIT binary patch literal 23199 zcmeHPc~n!!8ow?@P!W`e3bME_fKrh{WKmRFiXyloE(9u;f+7%>5FkQYJW2(nR+ieZ zy;9*>c2I*tAk{)Dkwqd#40~R{5W^NBfdF}TOXa+GPXFsUeaFck+`043{buGjzi*kz zCEp%$b<$j@zYu~TP3O-Yk3f)yHv}zES672;Dq1J!!h76+p%X5>cEAAcY1y3!DmI!v*%CI2FM59GqIjxpBQ~U>x52YmS>#vK8;>K3!3?};wbcf)3t1tApzwon_3NEQ9%LS1Z+`Z z5f6+=1%(6fEh;FWwZP@7u+RpPNCgEA1nBqQEP~WRMGKHxfJ7AM!e0g}Q8cz5jH*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n+SS$7dJFizou>$Uk&y_D?ETo=V`^@vbge{uJPVax*@a;F&WBxH`9u9h-l2~& zx<&qzv9i}c1~fqj=L2W;bwryYd~r&;#G)tb+TL}n{#FqTQ|jQ{K0LcE^NaERCwB`A zec1EtatjN0Zk`-r1zRp@Ac8BiL(JUfusv*GSj+14X*50_FCCMOwUpKi95v`A^4y_^ z#;mI5Tt=unShJ2Tblb@sStqTkDPSsVOl?!|35|HKh^O-F1ooH$+UL5DTUu;7haZ)$ zVzb%#!a5`VM}BK)3G#IFi?`t5WuJpH8r8Z@$n^N zdiZoPe;DP|DdjfbvW*+LZX5GD0}o42484Aq+0nL1Sl!x6-|IIS()|1Ht8{fE`3((T zR{mh2BV4#gLV<1UZako^dMupV+1?(qakC<{&!zZyE+c`it*u?%(c!q)$7hwRE6!IS zrwNw?#>SH3J=sJ8{BR&05K-_hg%r@_gJq*&3wu}NN<;#5xIjkF5Rm|p0FeMgBtRrU zB)|{}{ud-L>TKPGA6&P9{|i7IzW%Lqh(avVCte1t4HXD}?C&_VaQa#C%IQDt4@AWf zQ-le`0TBY?fFVL4LSRT6kTzh*6p$o9+JLkHX#>dt!%WviQ$$T2YS51&w4=>Px# literal 0 HcmV?d00001 diff --git a/forui/test/golden/button/zinc-light-Variant.primary-icon-enabled-button.png b/forui/test/golden/button/zinc-light-Variant.primary-icon-enabled-button.png new file mode 100644 index 0000000000000000000000000000000000000000..f789c8b6c58a0ed21c2b8be7bab218007bd346d9 GIT binary patch literal 22927 zcmeHPc~DeG8h=Jq5D}Cp3d$LS91#T-IffY(LJS}VSpji`EOG>+12YKd00TipMFiI< zBByH-V%;pSH5m8;fQBR77qplN6Pep>h!v5EjT5 z5f`8lLEl1f0lHimEC?#V7z$Ghf(kI>f{7?W1(-s^l?6csxZr~8P=X3@c@B3i2r9sh zh5y%$g^adBmK=H5@H$(G`I*?Yn&@pRUe4-;t!@%4Vtn#sz8uxb*mZQ>;K!Pc_b&F> zobieNVXsYua#*y@H}Q9sf1s-re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Mgb4K52GI!_n@2)yLU029PrPAP%(!<|tjy&rxaARVMTHe@;+^_8G8~lr literal 0 HcmV?d00001 diff --git a/forui/test/golden/button/zinc-light-Variant.secondary-icon-enabled-button.png b/forui/test/golden/button/zinc-light-Variant.secondary-icon-enabled-button.png new file mode 100644 index 0000000000000000000000000000000000000000..f4a7109a9de6c1d5c1c5148320988db9d6963625 GIT binary patch literal 22466 zcmeHPc~Fx{7XLs*5W*lHAVdU4MFn9%814|oNO>S~34|-i zai&VJ1QWm!kRt{avWf#b4#yZdBq{?@IV6CDW5517k<9$FwN+bAP1)Z+Uw_@N-|K$; zd#_)=G@SI@=|Wnly%57NlIwP7FAP(rV%P#DB}KfZs&!HUf5}CAxj130W^zCNp%Crl z>aB!7NlN=NFia0~b>8Y7pa16BRuZPK&gBZG5-ApsztI0~m#19t#*HiSF7V;a@a3ds zjBQT+_~EQ*EUjn!n=xNnR$pE!En)`qmPyNw`?&Jba)zp(w1}ONQ<0YS5Ob+2kXjI0 zq*y>kgnWwx3&`c7%|ZeNw1=Y5LIMR8aiKs|0tFO8qmzXM3h2Ov&Y==0pyN5pT1cRP z5(|IT#6sz>HF3t3XVxw}KHoC%mlwoT zs$ig-~u51e@gu$odXS^00|w{p(S7_ z68MuNf$`!6U@0Dxd1hnNTD-_CK?g4~s4ioRnR}?)({Q(^7Dp-%xIK*#tpa57#3_$! zRW>O0YY#unw;W5pLstvwIac#e@pNcXQc@QGCxHl1cGt&{XLOYD($Mv6fmTy_R%~ZF zGqS76!d;LutHoq8DLimLEPf9W7Be(Q?P>#f<;K1qFZSNqRwAC5s#Pfij3}px+)Gcx z8}a6pX*zxQ)a-@A15;BUh7LI4%?!;iiA+|!ep7jNLIJy=UPU}C;Njgv9Oi-cRCpSr z+<*UpEUXT8_%@;km!HEE3@iuiRpE?Y;gfIai+&?c5iQ}I;lH)i&EZvb78Vx)n%Z0Z zR=^AE>a@>fPehA3ISDBgf_=|h$lhc$sX3H?-`9d)k<%B=p@Um_+`z>|d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oLkyj5Nk6@|o;^_yraUtIaQwXq%aN zEMY(k!HEQcpwrvi`$I{)Fe-&JX8&SC>v;0=^zR?--`1b#K>|j1SP~}$JRj=>-Ce)l>CAGX9{&$7iF%9x literal 0 HcmV?d00001 diff --git a/forui/test/src/widgets/button/button_golden_test.dart b/forui/test/src/widgets/button/button_golden_test.dart index 9ed587cc9..55604de1e 100644 --- a/forui/test/src/widgets/button/button_golden_test.dart +++ b/forui/test/src/widgets/button/button_golden_test.dart @@ -32,7 +32,8 @@ void main() { await expectLater( find.byType(TestScaffold), - matchesGoldenFile('button/$name-$variant-enabled-content-button.png'), + matchesGoldenFile( + 'button/$name-$variant-enabled-content-button.png'), ); }); @@ -55,7 +56,8 @@ void main() { await expectLater( find.byType(TestScaffold), - matchesGoldenFile('button/$name-$variant-disabled-content-button.png'), + matchesGoldenFile( + 'button/$name-$variant-disabled-content-button.png'), ); }); @@ -136,7 +138,61 @@ void main() { matchesGoldenFile('button/$name-$variant-disabled-raw-button.png'), ); }); + + testWidgets('$name with enabled icon', (tester) async { + await tester.pumpWidget( + TestScaffold( + data: theme, + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 20), + child: FButton.icon( + onPress: () {}, + style: variant, + icon: FButtonIcon( + icon: FAssets.icons.chevronRight, + ), + + ), + ), + ), + ); + + await expectLater( + find.byType(TestScaffold), + matchesGoldenFile( + 'button/$name-$variant-icon-enabled-button.png', + ), + ); + }); + + testWidgets('$name with disabled icon', (tester) async { + await tester.pumpWidget( + TestScaffold( + data: theme, + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 20), + child: FButton.icon( + onPress: null, + style: variant, + icon: FButtonIcon( + icon: FAssets.icons.chevronRight, + ), + + ), + ), + ), + ); + + await expectLater( + find.byType(TestScaffold), + matchesGoldenFile( + 'button/$name-$variant-icon-disabled-button.png', + ), + ); + }); } } }); } + +//flutter test --update-goldens /Users/somyemahajan/Projects/forui/forui/test/src/widgets/button/button_golden_test.dart From e484a3deab5192013439dce47cae4607913e4fe7 Mon Sep 17 00:00:00 2001 From: sommye-ctr Date: Sat, 10 Aug 2024 08:43:43 +0000 Subject: [PATCH 08/31] Commit from GitHub Actions (Forui Presubmit) --- forui/example/pubspec.lock | 24 +++++++++---------- forui/lib/src/widgets/button/button.dart | 18 ++++---------- .../src/widgets/button/button_content.dart | 7 ++---- .../widgets/button/button_golden_test.dart | 8 ++----- 4 files changed, 21 insertions(+), 36 deletions(-) diff --git a/forui/example/pubspec.lock b/forui/example/pubspec.lock index 6b9f96c23..45d3bce65 100644 --- a/forui/example/pubspec.lock +++ b/forui/example/pubspec.lock @@ -338,18 +338,18 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" url: "https://pub.dev" source: hosted - version: "10.0.4" + version: "10.0.5" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" url: "https://pub.dev" source: hosted - version: "3.0.3" + version: "3.0.5" leak_tracker_testing: dependency: transitive description: @@ -378,18 +378,18 @@ packages: dependency: transitive description: name: material_color_utilities - sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec url: "https://pub.dev" source: hosted - version: "0.8.0" + version: "0.11.1" meta: dependency: transitive description: name: meta - sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 url: "https://pub.dev" source: hosted - version: "1.12.0" + version: "1.15.0" mime: dependency: transitive description: @@ -631,10 +631,10 @@ packages: dependency: transitive description: name: test_api - sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" + sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" url: "https://pub.dev" source: hosted - version: "0.7.0" + version: "0.7.2" timing: dependency: transitive description: @@ -687,10 +687,10 @@ packages: dependency: transitive description: name: vm_service - sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" + sha256: f652077d0bdf60abe4c1f6377448e8655008eef28f128bc023f7b5e8dfeb48fc url: "https://pub.dev" source: hosted - version: "14.2.1" + version: "14.2.4" watcher: dependency: transitive description: diff --git a/forui/lib/src/widgets/button/button.dart b/forui/lib/src/widgets/button/button.dart index fb6df5044..e422027cf 100644 --- a/forui/lib/src/widgets/button/button.dart +++ b/forui/lib/src/widgets/button/button.dart @@ -27,8 +27,7 @@ class FButton extends StatelessWidget { @useResult static _Data _of(BuildContext context) { final theme = context.dependOnInheritedWidgetOfExactType<_InheritedData>(); - return theme?.data ?? - (style: context.theme.buttonStyles.primary, enabled: true); + return theme?.data ?? (style: context.theme.buttonStyles.primary, enabled: true); } /// The style. Defaults to [FButtonStyle.primary]. @@ -142,8 +141,7 @@ class FButton extends StatelessWidget { onPress: onPress, onLongPress: onLongPress, child: DecoratedBox( - decoration: - enabled ? style.enabledBoxDecoration : style.disabledBoxDecoration, + decoration: enabled ? style.enabledBoxDecoration : style.disabledBoxDecoration, child: _InheritedData( data: (style: style, enabled: enabled), child: child, @@ -159,8 +157,7 @@ class FButton extends StatelessWidget { ..add(DiagnosticsProperty('style', style)) ..add(DiagnosticsProperty('onPress', onPress)) ..add(DiagnosticsProperty('onLongPress', onLongPress)) - ..add(FlagProperty('autofocus', - value: autofocus, defaultValue: false, ifTrue: 'autofocus')) + ..add(FlagProperty('autofocus', value: autofocus, defaultValue: false, ifTrue: 'autofocus')) ..add(DiagnosticsProperty('focusNode', focusNode)) ..add(DiagnosticsProperty('onFocusChange', onFocusChange)) ..add(DiagnosticsProperty('builder', child)); @@ -248,8 +245,7 @@ class FButtonCustomStyle extends FButtonStyle with Diagnosticable { }) => FButtonCustomStyle( enabledBoxDecoration: enabledBoxDecoration ?? this.enabledBoxDecoration, - disabledBoxDecoration: - disabledBoxDecoration ?? this.disabledBoxDecoration, + disabledBoxDecoration: disabledBoxDecoration ?? this.disabledBoxDecoration, content: content ?? this.content, icon: icon ?? this.icon, ); @@ -275,11 +271,7 @@ class FButtonCustomStyle extends FButtonStyle with Diagnosticable { icon == other.icon; @override - int get hashCode => - enabledBoxDecoration.hashCode ^ - disabledBoxDecoration.hashCode ^ - content.hashCode ^ - icon.hashCode; + int get hashCode => enabledBoxDecoration.hashCode ^ disabledBoxDecoration.hashCode ^ content.hashCode ^ icon.hashCode; } typedef _Data = ({FButtonCustomStyle style, bool enabled}); diff --git a/forui/lib/src/widgets/button/button_content.dart b/forui/lib/src/widgets/button/button_content.dart index b4475194f..3d673abed 100644 --- a/forui/lib/src/widgets/button/button_content.dart +++ b/forui/lib/src/widgets/button/button_content.dart @@ -18,9 +18,7 @@ final class _FButtonContent extends StatelessWidget { return Padding( padding: style.content.padding, child: DefaultTextStyle.merge( - style: enabled - ? style.content.enabledTextStyle - : style.content.disabledTextStyle, + style: enabled ? style.content.enabledTextStyle : style.content.disabledTextStyle, child: Row( mainAxisAlignment: MainAxisAlignment.center, children: separate( @@ -139,6 +137,5 @@ class FButtonContentStyle with Diagnosticable { padding == other.padding; @override - int get hashCode => - enabledTextStyle.hashCode ^ disabledTextStyle.hashCode ^ padding.hashCode; + int get hashCode => enabledTextStyle.hashCode ^ disabledTextStyle.hashCode ^ padding.hashCode; } diff --git a/forui/test/src/widgets/button/button_golden_test.dart b/forui/test/src/widgets/button/button_golden_test.dart index 55604de1e..2df852788 100644 --- a/forui/test/src/widgets/button/button_golden_test.dart +++ b/forui/test/src/widgets/button/button_golden_test.dart @@ -32,8 +32,7 @@ void main() { await expectLater( find.byType(TestScaffold), - matchesGoldenFile( - 'button/$name-$variant-enabled-content-button.png'), + matchesGoldenFile('button/$name-$variant-enabled-content-button.png'), ); }); @@ -56,8 +55,7 @@ void main() { await expectLater( find.byType(TestScaffold), - matchesGoldenFile( - 'button/$name-$variant-disabled-content-button.png'), + matchesGoldenFile('button/$name-$variant-disabled-content-button.png'), ); }); @@ -151,7 +149,6 @@ void main() { icon: FButtonIcon( icon: FAssets.icons.chevronRight, ), - ), ), ), @@ -177,7 +174,6 @@ void main() { icon: FButtonIcon( icon: FAssets.icons.chevronRight, ), - ), ), ), From c51dfb6a48946419c0806154814a626d7cf6bd3d Mon Sep 17 00:00:00 2001 From: sommye-ctr Date: Sat, 10 Aug 2024 08:43:47 +0000 Subject: [PATCH 09/31] Commit from GitHub Actions (Forui Samples Presubmit) --- samples/lib/main.dart | 1 - samples/pubspec.lock | 24 ++++++++++++------------ 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/samples/lib/main.dart b/samples/lib/main.dart index 729ebc81d..38b8f45b6 100644 --- a/samples/lib/main.dart +++ b/samples/lib/main.dart @@ -2,7 +2,6 @@ import 'package:flutter/material.dart' hide DialogRoute; import 'package:auto_route/auto_route.dart'; import 'package:flutter_web_plugins/flutter_web_plugins.dart'; -import 'package:forui/forui.dart'; import 'package:forui_samples/main.gr.dart'; import 'package:forui_samples/sample_scaffold.dart'; diff --git a/samples/pubspec.lock b/samples/pubspec.lock index a43948ca7..1d94f8a48 100644 --- a/samples/pubspec.lock +++ b/samples/pubspec.lock @@ -367,18 +367,18 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" url: "https://pub.dev" source: hosted - version: "10.0.4" + version: "10.0.5" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" url: "https://pub.dev" source: hosted - version: "3.0.3" + version: "3.0.5" leak_tracker_testing: dependency: transitive description: @@ -407,18 +407,18 @@ packages: dependency: transitive description: name: material_color_utilities - sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec url: "https://pub.dev" source: hosted - version: "0.8.0" + version: "0.11.1" meta: dependency: transitive description: name: meta - sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 url: "https://pub.dev" source: hosted - version: "1.12.0" + version: "1.15.0" mime: dependency: transitive description: @@ -652,10 +652,10 @@ packages: dependency: transitive description: name: test_api - sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" + sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" url: "https://pub.dev" source: hosted - version: "0.7.0" + version: "0.7.2" timing: dependency: transitive description: @@ -708,10 +708,10 @@ packages: dependency: transitive description: name: vm_service - sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" + sha256: f652077d0bdf60abe4c1f6377448e8655008eef28f128bc023f7b5e8dfeb48fc url: "https://pub.dev" source: hosted - version: "14.2.1" + version: "14.2.4" watcher: dependency: transitive description: From d59b46cbcde4c46e4fdfd399a7afb3bca36aee43 Mon Sep 17 00:00:00 2001 From: Somye <71683523+sommye-ctr@users.noreply.github.com> Date: Sun, 11 Aug 2024 09:24:41 +0530 Subject: [PATCH 10/31] Update docs/pages/docs/button.mdx Co-authored-by: Matthias Ngeo --- docs/pages/docs/button.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/pages/docs/button.mdx b/docs/pages/docs/button.mdx index 6880f766f..9058e1fda 100644 --- a/docs/pages/docs/button.mdx +++ b/docs/pages/docs/button.mdx @@ -103,7 +103,7 @@ FButton.raw( -### With Text+Icon +### With Text and Icon From c825216f6b77ce860fb97eb5bca1fec0bb9d73d2 Mon Sep 17 00:00:00 2001 From: Somye <71683523+sommye-ctr@users.noreply.github.com> Date: Sun, 11 Aug 2024 09:25:40 +0530 Subject: [PATCH 11/31] Update forui/lib/src/widgets/button/button.dart Co-authored-by: Matthias Ngeo --- forui/lib/src/widgets/button/button.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forui/lib/src/widgets/button/button.dart b/forui/lib/src/widgets/button/button.dart index e422027cf..0d332b0a3 100644 --- a/forui/lib/src/widgets/button/button.dart +++ b/forui/lib/src/widgets/button/button.dart @@ -99,7 +99,7 @@ class FButton extends StatelessWidget { label: label, ); - /// Creates a [FButton] that contains only an [icon] + /// Creates a [FButton] that contains only an [icon]. FButton.icon({ required this.onPress, required Widget icon, From 4b505e5991bd83a66736e2339265e683a85390c0 Mon Sep 17 00:00:00 2001 From: Somye <71683523+sommye-ctr@users.noreply.github.com> Date: Sun, 11 Aug 2024 09:25:50 +0530 Subject: [PATCH 12/31] Update forui/lib/src/widgets/divider.dart Co-authored-by: Matthias Ngeo --- forui/lib/src/widgets/divider.dart | 5 ----- 1 file changed, 5 deletions(-) diff --git a/forui/lib/src/widgets/divider.dart b/forui/lib/src/widgets/divider.dart index 6d3503c66..803413b87 100644 --- a/forui/lib/src/widgets/divider.dart +++ b/forui/lib/src/widgets/divider.dart @@ -168,11 +168,6 @@ final class FDividerStyle with Diagnosticable { ..add(DiagnosticsProperty('padding', padding)) ..add(ColorProperty('color', color)) ..add(DoubleProperty('width', width)); - - FButton.icon( - onPress: () {}, - icon: FButtonIcon(icon: FAssets.icons.arrowRight), - ); } @override From 1b4cbb6e2ae2b2b25a995f9b4c7809879c4f0451 Mon Sep 17 00:00:00 2001 From: Somye Date: Sun, 11 Aug 2024 09:37:50 +0530 Subject: [PATCH 13/31] Renamed icon to child in FButton.icon(...) --- forui/lib/src/widgets/button/button.dart | 6 +++--- forui/lib/src/widgets/button/button_content.dart | 6 +++--- forui/lib/src/widgets/divider.dart | 5 ----- forui/test/src/widgets/button/button_golden_test.dart | 4 ++-- samples/lib/widgets/button.dart | 2 +- 5 files changed, 9 insertions(+), 14 deletions(-) diff --git a/forui/lib/src/widgets/button/button.dart b/forui/lib/src/widgets/button/button.dart index fb6df5044..8830dcbea 100644 --- a/forui/lib/src/widgets/button/button.dart +++ b/forui/lib/src/widgets/button/button.dart @@ -100,17 +100,17 @@ class FButton extends StatelessWidget { label: label, ); - /// Creates a [FButton] that contains only an [icon] + /// Creates a [FButton] that contains only an icon. FButton.icon({ required this.onPress, - required Widget icon, + required Widget child, this.style = Variant.outline, this.onLongPress, this.autofocus = false, this.focusNode, this.onFocusChange, super.key, - }) : child = _FButtonIconContent(icon: icon); + }) : child = _FButtonIconContent(child: child); /// Creates a [FButton] with custom content. const FButton.raw({ diff --git a/forui/lib/src/widgets/button/button_content.dart b/forui/lib/src/widgets/button/button_content.dart index b4475194f..e929e2607 100644 --- a/forui/lib/src/widgets/button/button_content.dart +++ b/forui/lib/src/widgets/button/button_content.dart @@ -40,9 +40,9 @@ final class _FButtonContent extends StatelessWidget { } final class _FButtonIconContent extends StatelessWidget { - final Widget icon; + final Widget child; - const _FButtonIconContent({required this.icon}); + const _FButtonIconContent({required this.child}); @override Widget build(BuildContext context) { @@ -50,7 +50,7 @@ final class _FButtonIconContent extends StatelessWidget { return Padding( padding: style.content.padding, - child: icon, + child: child, ); } } diff --git a/forui/lib/src/widgets/divider.dart b/forui/lib/src/widgets/divider.dart index 6d3503c66..803413b87 100644 --- a/forui/lib/src/widgets/divider.dart +++ b/forui/lib/src/widgets/divider.dart @@ -168,11 +168,6 @@ final class FDividerStyle with Diagnosticable { ..add(DiagnosticsProperty('padding', padding)) ..add(ColorProperty('color', color)) ..add(DoubleProperty('width', width)); - - FButton.icon( - onPress: () {}, - icon: FButtonIcon(icon: FAssets.icons.arrowRight), - ); } @override diff --git a/forui/test/src/widgets/button/button_golden_test.dart b/forui/test/src/widgets/button/button_golden_test.dart index 55604de1e..10aa53a76 100644 --- a/forui/test/src/widgets/button/button_golden_test.dart +++ b/forui/test/src/widgets/button/button_golden_test.dart @@ -148,7 +148,7 @@ void main() { child: FButton.icon( onPress: () {}, style: variant, - icon: FButtonIcon( + child: FButtonIcon( icon: FAssets.icons.chevronRight, ), @@ -174,7 +174,7 @@ void main() { child: FButton.icon( onPress: null, style: variant, - icon: FButtonIcon( + child: FButtonIcon( icon: FAssets.icons.chevronRight, ), diff --git a/samples/lib/widgets/button.dart b/samples/lib/widgets/button.dart index a59a73378..fa5d6dc8b 100644 --- a/samples/lib/widgets/button.dart +++ b/samples/lib/widgets/button.dart @@ -62,7 +62,7 @@ class ButtonOnlyIconPage extends SampleScaffold { @override Widget child(BuildContext context) => IntrinsicWidth( child: FButton.icon( - icon: FButtonIcon(icon: FAssets.icons.chevronRight), + child: FButtonIcon(icon: FAssets.icons.chevronRight), onPress: () {}, ), ); From 88ce93812d36396c294ac83718242536ddf789b7 Mon Sep 17 00:00:00 2001 From: Somye Date: Sun, 11 Aug 2024 09:46:08 +0530 Subject: [PATCH 14/31] Renamed icon to child in FButton.icon(...) --- forui/lib/src/widgets/button/button.dart | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/forui/lib/src/widgets/button/button.dart b/forui/lib/src/widgets/button/button.dart index 0d332b0a3..5d91fa95f 100644 --- a/forui/lib/src/widgets/button/button.dart +++ b/forui/lib/src/widgets/button/button.dart @@ -27,7 +27,8 @@ class FButton extends StatelessWidget { @useResult static _Data _of(BuildContext context) { final theme = context.dependOnInheritedWidgetOfExactType<_InheritedData>(); - return theme?.data ?? (style: context.theme.buttonStyles.primary, enabled: true); + return theme?.data ?? + (style: context.theme.buttonStyles.primary, enabled: true); } /// The style. Defaults to [FButtonStyle.primary]. @@ -99,17 +100,17 @@ class FButton extends StatelessWidget { label: label, ); - /// Creates a [FButton] that contains only an [icon]. + /// Creates a [FButton] that contains only an icon FButton.icon({ required this.onPress, - required Widget icon, + required Widget child, this.style = Variant.outline, this.onLongPress, this.autofocus = false, this.focusNode, this.onFocusChange, super.key, - }) : child = _FButtonIconContent(icon: icon); + }) : child = _FButtonIconContent(child: child); /// Creates a [FButton] with custom content. const FButton.raw({ @@ -141,7 +142,8 @@ class FButton extends StatelessWidget { onPress: onPress, onLongPress: onLongPress, child: DecoratedBox( - decoration: enabled ? style.enabledBoxDecoration : style.disabledBoxDecoration, + decoration: + enabled ? style.enabledBoxDecoration : style.disabledBoxDecoration, child: _InheritedData( data: (style: style, enabled: enabled), child: child, @@ -157,7 +159,8 @@ class FButton extends StatelessWidget { ..add(DiagnosticsProperty('style', style)) ..add(DiagnosticsProperty('onPress', onPress)) ..add(DiagnosticsProperty('onLongPress', onLongPress)) - ..add(FlagProperty('autofocus', value: autofocus, defaultValue: false, ifTrue: 'autofocus')) + ..add(FlagProperty('autofocus', + value: autofocus, defaultValue: false, ifTrue: 'autofocus')) ..add(DiagnosticsProperty('focusNode', focusNode)) ..add(DiagnosticsProperty('onFocusChange', onFocusChange)) ..add(DiagnosticsProperty('builder', child)); @@ -245,7 +248,8 @@ class FButtonCustomStyle extends FButtonStyle with Diagnosticable { }) => FButtonCustomStyle( enabledBoxDecoration: enabledBoxDecoration ?? this.enabledBoxDecoration, - disabledBoxDecoration: disabledBoxDecoration ?? this.disabledBoxDecoration, + disabledBoxDecoration: + disabledBoxDecoration ?? this.disabledBoxDecoration, content: content ?? this.content, icon: icon ?? this.icon, ); @@ -271,7 +275,11 @@ class FButtonCustomStyle extends FButtonStyle with Diagnosticable { icon == other.icon; @override - int get hashCode => enabledBoxDecoration.hashCode ^ disabledBoxDecoration.hashCode ^ content.hashCode ^ icon.hashCode; + int get hashCode => + enabledBoxDecoration.hashCode ^ + disabledBoxDecoration.hashCode ^ + content.hashCode ^ + icon.hashCode; } typedef _Data = ({FButtonCustomStyle style, bool enabled}); From a0c46d9ab94d46e9ceeadbcc8d61aaee3cb48a83 Mon Sep 17 00:00:00 2001 From: sommye-ctr Date: Sun, 11 Aug 2024 04:17:56 +0000 Subject: [PATCH 15/31] Commit from GitHub Actions (Forui Presubmit) --- forui/lib/src/widgets/button/button.dart | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/forui/lib/src/widgets/button/button.dart b/forui/lib/src/widgets/button/button.dart index 5d91fa95f..e28250251 100644 --- a/forui/lib/src/widgets/button/button.dart +++ b/forui/lib/src/widgets/button/button.dart @@ -27,8 +27,7 @@ class FButton extends StatelessWidget { @useResult static _Data _of(BuildContext context) { final theme = context.dependOnInheritedWidgetOfExactType<_InheritedData>(); - return theme?.data ?? - (style: context.theme.buttonStyles.primary, enabled: true); + return theme?.data ?? (style: context.theme.buttonStyles.primary, enabled: true); } /// The style. Defaults to [FButtonStyle.primary]. @@ -142,8 +141,7 @@ class FButton extends StatelessWidget { onPress: onPress, onLongPress: onLongPress, child: DecoratedBox( - decoration: - enabled ? style.enabledBoxDecoration : style.disabledBoxDecoration, + decoration: enabled ? style.enabledBoxDecoration : style.disabledBoxDecoration, child: _InheritedData( data: (style: style, enabled: enabled), child: child, @@ -159,8 +157,7 @@ class FButton extends StatelessWidget { ..add(DiagnosticsProperty('style', style)) ..add(DiagnosticsProperty('onPress', onPress)) ..add(DiagnosticsProperty('onLongPress', onLongPress)) - ..add(FlagProperty('autofocus', - value: autofocus, defaultValue: false, ifTrue: 'autofocus')) + ..add(FlagProperty('autofocus', value: autofocus, defaultValue: false, ifTrue: 'autofocus')) ..add(DiagnosticsProperty('focusNode', focusNode)) ..add(DiagnosticsProperty('onFocusChange', onFocusChange)) ..add(DiagnosticsProperty('builder', child)); @@ -248,8 +245,7 @@ class FButtonCustomStyle extends FButtonStyle with Diagnosticable { }) => FButtonCustomStyle( enabledBoxDecoration: enabledBoxDecoration ?? this.enabledBoxDecoration, - disabledBoxDecoration: - disabledBoxDecoration ?? this.disabledBoxDecoration, + disabledBoxDecoration: disabledBoxDecoration ?? this.disabledBoxDecoration, content: content ?? this.content, icon: icon ?? this.icon, ); @@ -275,11 +271,7 @@ class FButtonCustomStyle extends FButtonStyle with Diagnosticable { icon == other.icon; @override - int get hashCode => - enabledBoxDecoration.hashCode ^ - disabledBoxDecoration.hashCode ^ - content.hashCode ^ - icon.hashCode; + int get hashCode => enabledBoxDecoration.hashCode ^ disabledBoxDecoration.hashCode ^ content.hashCode ^ icon.hashCode; } typedef _Data = ({FButtonCustomStyle style, bool enabled}); From 8e3294d294cf4a0180b1bcb2d0694c99d965dc86 Mon Sep 17 00:00:00 2001 From: Somye Date: Sun, 11 Aug 2024 09:48:12 +0530 Subject: [PATCH 16/31] Updated forui/lib/src/widgets/button/button.dart --- forui/lib/src/widgets/button/button.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forui/lib/src/widgets/button/button.dart b/forui/lib/src/widgets/button/button.dart index 5d91fa95f..8830dcbea 100644 --- a/forui/lib/src/widgets/button/button.dart +++ b/forui/lib/src/widgets/button/button.dart @@ -100,7 +100,7 @@ class FButton extends StatelessWidget { label: label, ); - /// Creates a [FButton] that contains only an icon + /// Creates a [FButton] that contains only an icon. FButton.icon({ required this.onPress, required Widget child, From 0b66c576b59b21273d1e4141dda6849a3dd833c6 Mon Sep 17 00:00:00 2001 From: Somye Date: Tue, 13 Aug 2024 10:39:34 +0530 Subject: [PATCH 17/31] Added FButtonIconContentStyle --- forui/lib/src/widgets/button/button.dart | 99 ++++++++++++++++++- .../src/widgets/button/button_content.dart | 50 +++++++++- 2 files changed, 140 insertions(+), 9 deletions(-) diff --git a/forui/lib/src/widgets/button/button.dart b/forui/lib/src/widgets/button/button.dart index b5dd2a311..a5bb83b4e 100644 --- a/forui/lib/src/widgets/button/button.dart +++ b/forui/lib/src/widgets/button/button.dart @@ -27,7 +27,8 @@ class FButton extends StatelessWidget { @useResult static _Data _of(BuildContext context) { final theme = context.dependOnInheritedWidgetOfExactType<_InheritedData>(); - return theme?.data ?? (style: context.theme.buttonStyles.primary, enabled: true); + return theme?.data ?? + (style: context.theme.buttonStyles.primary, enabled: true); } /// The style. Defaults to [FButtonStyle.primary]. @@ -141,7 +142,8 @@ class FButton extends StatelessWidget { onPress: onPress, onLongPress: onLongPress, child: DecoratedBox( - decoration: enabled ? style.enabledBoxDecoration : style.disabledBoxDecoration, + decoration: + enabled ? style.enabledBoxDecoration : style.disabledBoxDecoration, child: _InheritedData( data: (style: style, enabled: enabled), child: child, @@ -157,7 +159,8 @@ class FButton extends StatelessWidget { ..add(DiagnosticsProperty('style', style)) ..add(DiagnosticsProperty('onPress', onPress)) ..add(DiagnosticsProperty('onLongPress', onLongPress)) - ..add(FlagProperty('autofocus', value: autofocus, defaultValue: false, ifTrue: 'autofocus')) + ..add(FlagProperty('autofocus', + value: autofocus, defaultValue: false, ifTrue: 'autofocus')) ..add(DiagnosticsProperty('focusNode', focusNode)) ..add(DiagnosticsProperty('onFocusChange', onFocusChange)) ..add(DiagnosticsProperty('builder', child)); @@ -245,7 +248,8 @@ class FButtonCustomStyle extends FButtonStyle with Diagnosticable { }) => FButtonCustomStyle( enabledBoxDecoration: enabledBoxDecoration ?? this.enabledBoxDecoration, - disabledBoxDecoration: disabledBoxDecoration ?? this.disabledBoxDecoration, + disabledBoxDecoration: + disabledBoxDecoration ?? this.disabledBoxDecoration, content: content ?? this.content, icon: icon ?? this.icon, ); @@ -271,7 +275,92 @@ class FButtonCustomStyle extends FButtonStyle with Diagnosticable { icon == other.icon; @override - int get hashCode => enabledBoxDecoration.hashCode ^ disabledBoxDecoration.hashCode ^ content.hashCode ^ icon.hashCode; + int get hashCode => + enabledBoxDecoration.hashCode ^ + disabledBoxDecoration.hashCode ^ + content.hashCode ^ + icon.hashCode; +} + +/// [FButton] style for icon-button. +class FButtonIconStyle extends FButtonStyle with Diagnosticable { + /// The box decoration for an enabled button. + final BoxDecoration enabledBoxDecoration; + + /// The box decoration for a disabled button. + final BoxDecoration disabledBoxDecoration; + + /// The content's style. + final FButtonContentStyle content; + + /// The icon's style. + final FButtonIconStyle icon; + + /// Creates a [FButtonIconStyle]. + FButtonIconStyle({ + required this.enabledBoxDecoration, + required this.disabledBoxDecoration, + required this.content, + required this.icon, + }); + + /// Returns a copy of this [FButtonIconStyle] with the given properties replaced. + /// + /// ```dart + /// final style = FButtonIconStyle( + /// enabledBoxDecoration: ..., + /// disabledBoxDecoration: ..., + /// // other properties omitted for brevity + /// ); + /// + /// final copy = style.copyWith( + /// disabledBoxDecoration: ..., + /// ); + /// + /// print(copy.background); // Colors.blue + /// print(copy.border); // Colors.black + /// ``` + @useResult + FButtonIconStyle copyWith({ + BoxDecoration? enabledBoxDecoration, + BoxDecoration? disabledBoxDecoration, + FButtonContentStyle? content, + FButtonIconStyle? icon, + }) => + FButtonIconStyle( + enabledBoxDecoration: enabledBoxDecoration ?? this.enabledBoxDecoration, + disabledBoxDecoration: + disabledBoxDecoration ?? this.disabledBoxDecoration, + content: content ?? this.content, + icon: icon ?? this.icon, + ); + + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties + ..add(DiagnosticsProperty('enabledBoxDecoration', enabledBoxDecoration)) + ..add(DiagnosticsProperty('disabledBoxDecoration', disabledBoxDecoration)) + ..add(DiagnosticsProperty('content', content)) + ..add(DiagnosticsProperty('icon', icon)); + } + + @override + bool operator ==(Object other) => + identical(this, other) || + other is FButtonCustomStyle && + runtimeType == other.runtimeType && + enabledBoxDecoration == other.enabledBoxDecoration && + disabledBoxDecoration == other.disabledBoxDecoration && + content == other.content && + icon == other.icon; + + @override + int get hashCode => + enabledBoxDecoration.hashCode ^ + disabledBoxDecoration.hashCode ^ + content.hashCode ^ + icon.hashCode; } typedef _Data = ({FButtonCustomStyle style, bool enabled}); diff --git a/forui/lib/src/widgets/button/button_content.dart b/forui/lib/src/widgets/button/button_content.dart index 8900d8277..3018488f9 100644 --- a/forui/lib/src/widgets/button/button_content.dart +++ b/forui/lib/src/widgets/button/button_content.dart @@ -18,7 +18,9 @@ final class _FButtonContent extends StatelessWidget { return Padding( padding: style.content.padding, child: DefaultTextStyle.merge( - style: enabled ? style.content.enabledTextStyle : style.content.disabledTextStyle, + style: enabled + ? style.content.enabledTextStyle + : style.content.disabledTextStyle, child: Row( mainAxisAlignment: MainAxisAlignment.center, children: separate( @@ -44,15 +46,54 @@ final class _FButtonIconContent extends StatelessWidget { @override Widget build(BuildContext context) { - final (:style, enabled: _) = FButton._of(context); + final FButtonIconContentStyle contentStyle = FButtonIconContentStyle(); return Padding( - padding: style.content.padding, + padding: contentStyle.padding, child: child, ); } } +/// [FButton] icon's style. +class FButtonIconContentStyle with Diagnosticable { + /// The padding. + final EdgeInsets padding; + + /// Creates a [FButtonIconContentStyle]. + FButtonIconContentStyle({ + this.padding = const EdgeInsets.symmetric( + horizontal: 16, + vertical: 12.5, + ), + }); + + /// Returns a copy of this [FButtonIconContentStyle] with the given properties replaced. + @useResult + FButtonIconContentStyle copyWith({ + EdgeInsets? padding, + }) => + FButtonIconContentStyle( + padding: padding ?? this.padding, + ); + + @override + bool operator ==(Object other) => + identical(this, other) || + other is FButtonIconContentStyle && + runtimeType == other.runtimeType && + padding == other.padding; + + @override + int get hashCode => padding.hashCode; + + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties.add(DiagnosticsProperty('padding', padding)); + } +} + /// [FButton] content's style. class FButtonContentStyle with Diagnosticable { /// The [TextStyle] when this button is enabled. @@ -137,5 +178,6 @@ class FButtonContentStyle with Diagnosticable { padding == other.padding; @override - int get hashCode => enabledTextStyle.hashCode ^ disabledTextStyle.hashCode ^ padding.hashCode; + int get hashCode => + enabledTextStyle.hashCode ^ disabledTextStyle.hashCode ^ padding.hashCode; } From 52182c6bf7809087c601864c3596164e3e32508b Mon Sep 17 00:00:00 2001 From: sommye-ctr Date: Tue, 13 Aug 2024 05:11:07 +0000 Subject: [PATCH 18/31] Commit from GitHub Actions (Forui Presubmit) --- forui/example/pubspec.lock | 24 ++++++++--------- forui/lib/src/widgets/button/button.dart | 27 +++++-------------- .../src/widgets/button/button_content.dart | 11 +++----- 3 files changed, 22 insertions(+), 40 deletions(-) diff --git a/forui/example/pubspec.lock b/forui/example/pubspec.lock index 45d3bce65..6b9f96c23 100644 --- a/forui/example/pubspec.lock +++ b/forui/example/pubspec.lock @@ -338,18 +338,18 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" url: "https://pub.dev" source: hosted - version: "10.0.5" + version: "10.0.4" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" url: "https://pub.dev" source: hosted - version: "3.0.5" + version: "3.0.3" leak_tracker_testing: dependency: transitive description: @@ -378,18 +378,18 @@ packages: dependency: transitive description: name: material_color_utilities - sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.11.1" + version: "0.8.0" meta: dependency: transitive description: name: meta - sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" url: "https://pub.dev" source: hosted - version: "1.15.0" + version: "1.12.0" mime: dependency: transitive description: @@ -631,10 +631,10 @@ packages: dependency: transitive description: name: test_api - sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" url: "https://pub.dev" source: hosted - version: "0.7.2" + version: "0.7.0" timing: dependency: transitive description: @@ -687,10 +687,10 @@ packages: dependency: transitive description: name: vm_service - sha256: f652077d0bdf60abe4c1f6377448e8655008eef28f128bc023f7b5e8dfeb48fc + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" url: "https://pub.dev" source: hosted - version: "14.2.4" + version: "14.2.1" watcher: dependency: transitive description: diff --git a/forui/lib/src/widgets/button/button.dart b/forui/lib/src/widgets/button/button.dart index a5bb83b4e..362470d04 100644 --- a/forui/lib/src/widgets/button/button.dart +++ b/forui/lib/src/widgets/button/button.dart @@ -27,8 +27,7 @@ class FButton extends StatelessWidget { @useResult static _Data _of(BuildContext context) { final theme = context.dependOnInheritedWidgetOfExactType<_InheritedData>(); - return theme?.data ?? - (style: context.theme.buttonStyles.primary, enabled: true); + return theme?.data ?? (style: context.theme.buttonStyles.primary, enabled: true); } /// The style. Defaults to [FButtonStyle.primary]. @@ -142,8 +141,7 @@ class FButton extends StatelessWidget { onPress: onPress, onLongPress: onLongPress, child: DecoratedBox( - decoration: - enabled ? style.enabledBoxDecoration : style.disabledBoxDecoration, + decoration: enabled ? style.enabledBoxDecoration : style.disabledBoxDecoration, child: _InheritedData( data: (style: style, enabled: enabled), child: child, @@ -159,8 +157,7 @@ class FButton extends StatelessWidget { ..add(DiagnosticsProperty('style', style)) ..add(DiagnosticsProperty('onPress', onPress)) ..add(DiagnosticsProperty('onLongPress', onLongPress)) - ..add(FlagProperty('autofocus', - value: autofocus, defaultValue: false, ifTrue: 'autofocus')) + ..add(FlagProperty('autofocus', value: autofocus, defaultValue: false, ifTrue: 'autofocus')) ..add(DiagnosticsProperty('focusNode', focusNode)) ..add(DiagnosticsProperty('onFocusChange', onFocusChange)) ..add(DiagnosticsProperty('builder', child)); @@ -248,8 +245,7 @@ class FButtonCustomStyle extends FButtonStyle with Diagnosticable { }) => FButtonCustomStyle( enabledBoxDecoration: enabledBoxDecoration ?? this.enabledBoxDecoration, - disabledBoxDecoration: - disabledBoxDecoration ?? this.disabledBoxDecoration, + disabledBoxDecoration: disabledBoxDecoration ?? this.disabledBoxDecoration, content: content ?? this.content, icon: icon ?? this.icon, ); @@ -275,11 +271,7 @@ class FButtonCustomStyle extends FButtonStyle with Diagnosticable { icon == other.icon; @override - int get hashCode => - enabledBoxDecoration.hashCode ^ - disabledBoxDecoration.hashCode ^ - content.hashCode ^ - icon.hashCode; + int get hashCode => enabledBoxDecoration.hashCode ^ disabledBoxDecoration.hashCode ^ content.hashCode ^ icon.hashCode; } /// [FButton] style for icon-button. @@ -329,8 +321,7 @@ class FButtonIconStyle extends FButtonStyle with Diagnosticable { }) => FButtonIconStyle( enabledBoxDecoration: enabledBoxDecoration ?? this.enabledBoxDecoration, - disabledBoxDecoration: - disabledBoxDecoration ?? this.disabledBoxDecoration, + disabledBoxDecoration: disabledBoxDecoration ?? this.disabledBoxDecoration, content: content ?? this.content, icon: icon ?? this.icon, ); @@ -356,11 +347,7 @@ class FButtonIconStyle extends FButtonStyle with Diagnosticable { icon == other.icon; @override - int get hashCode => - enabledBoxDecoration.hashCode ^ - disabledBoxDecoration.hashCode ^ - content.hashCode ^ - icon.hashCode; + int get hashCode => enabledBoxDecoration.hashCode ^ disabledBoxDecoration.hashCode ^ content.hashCode ^ icon.hashCode; } typedef _Data = ({FButtonCustomStyle style, bool enabled}); diff --git a/forui/lib/src/widgets/button/button_content.dart b/forui/lib/src/widgets/button/button_content.dart index 3018488f9..3c7a1082d 100644 --- a/forui/lib/src/widgets/button/button_content.dart +++ b/forui/lib/src/widgets/button/button_content.dart @@ -18,9 +18,7 @@ final class _FButtonContent extends StatelessWidget { return Padding( padding: style.content.padding, child: DefaultTextStyle.merge( - style: enabled - ? style.content.enabledTextStyle - : style.content.disabledTextStyle, + style: enabled ? style.content.enabledTextStyle : style.content.disabledTextStyle, child: Row( mainAxisAlignment: MainAxisAlignment.center, children: separate( @@ -80,9 +78,7 @@ class FButtonIconContentStyle with Diagnosticable { @override bool operator ==(Object other) => identical(this, other) || - other is FButtonIconContentStyle && - runtimeType == other.runtimeType && - padding == other.padding; + other is FButtonIconContentStyle && runtimeType == other.runtimeType && padding == other.padding; @override int get hashCode => padding.hashCode; @@ -178,6 +174,5 @@ class FButtonContentStyle with Diagnosticable { padding == other.padding; @override - int get hashCode => - enabledTextStyle.hashCode ^ disabledTextStyle.hashCode ^ padding.hashCode; + int get hashCode => enabledTextStyle.hashCode ^ disabledTextStyle.hashCode ^ padding.hashCode; } From 537f33cce7bbcca2a5f643f2dcd387989d707d90 Mon Sep 17 00:00:00 2001 From: sommye-ctr Date: Tue, 13 Aug 2024 05:11:09 +0000 Subject: [PATCH 19/31] Commit from GitHub Actions (Forui Samples Presubmit) --- samples/pubspec.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/samples/pubspec.lock b/samples/pubspec.lock index 1d94f8a48..a43948ca7 100644 --- a/samples/pubspec.lock +++ b/samples/pubspec.lock @@ -367,18 +367,18 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" url: "https://pub.dev" source: hosted - version: "10.0.5" + version: "10.0.4" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" url: "https://pub.dev" source: hosted - version: "3.0.5" + version: "3.0.3" leak_tracker_testing: dependency: transitive description: @@ -407,18 +407,18 @@ packages: dependency: transitive description: name: material_color_utilities - sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.11.1" + version: "0.8.0" meta: dependency: transitive description: name: meta - sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" url: "https://pub.dev" source: hosted - version: "1.15.0" + version: "1.12.0" mime: dependency: transitive description: @@ -652,10 +652,10 @@ packages: dependency: transitive description: name: test_api - sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" url: "https://pub.dev" source: hosted - version: "0.7.2" + version: "0.7.0" timing: dependency: transitive description: @@ -708,10 +708,10 @@ packages: dependency: transitive description: name: vm_service - sha256: f652077d0bdf60abe4c1f6377448e8655008eef28f128bc023f7b5e8dfeb48fc + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" url: "https://pub.dev" source: hosted - version: "14.2.4" + version: "14.2.1" watcher: dependency: transitive description: From c25995a1607ed7611d66fcbe61d1fe63084bfbd3 Mon Sep 17 00:00:00 2001 From: Somye Date: Wed, 14 Aug 2024 21:42:45 +0530 Subject: [PATCH 20/31] Added FButtonIconContentStyle to FButtonCustomStyle --- forui/lib/src/widgets/button/button.dart | 18 +++++++++++++++--- .../lib/src/widgets/button/button_content.dart | 4 ++-- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/forui/lib/src/widgets/button/button.dart b/forui/lib/src/widgets/button/button.dart index a5bb83b4e..94f4438ef 100644 --- a/forui/lib/src/widgets/button/button.dart +++ b/forui/lib/src/widgets/button/button.dart @@ -215,12 +215,16 @@ class FButtonCustomStyle extends FButtonStyle with Diagnosticable { /// The icon's style. final FButtonIconStyle icon; + /// The icon-content's style + final FButtonIconContentStyle iconContent; + /// Creates a [FButtonCustomStyle]. FButtonCustomStyle({ required this.enabledBoxDecoration, required this.disabledBoxDecoration, required this.content, required this.icon, + required this.iconContent, }); /// Returns a copy of this [FButtonCustomStyle] with the given properties replaced. @@ -245,6 +249,7 @@ class FButtonCustomStyle extends FButtonStyle with Diagnosticable { BoxDecoration? disabledBoxDecoration, FButtonContentStyle? content, FButtonIconStyle? icon, + FButtonIconContentStyle? iconContent, }) => FButtonCustomStyle( enabledBoxDecoration: enabledBoxDecoration ?? this.enabledBoxDecoration, @@ -252,6 +257,7 @@ class FButtonCustomStyle extends FButtonStyle with Diagnosticable { disabledBoxDecoration ?? this.disabledBoxDecoration, content: content ?? this.content, icon: icon ?? this.icon, + iconContent: iconContent ?? this.iconContent, ); @override @@ -261,7 +267,11 @@ class FButtonCustomStyle extends FButtonStyle with Diagnosticable { ..add(DiagnosticsProperty('enabledBoxDecoration', enabledBoxDecoration)) ..add(DiagnosticsProperty('disabledBoxDecoration', disabledBoxDecoration)) ..add(DiagnosticsProperty('content', content)) - ..add(DiagnosticsProperty('icon', icon)); + ..add(DiagnosticsProperty('icon', icon)) + ..add( + DiagnosticsProperty( + 'iconContent', iconContent), + ); } @override @@ -272,14 +282,16 @@ class FButtonCustomStyle extends FButtonStyle with Diagnosticable { enabledBoxDecoration == other.enabledBoxDecoration && disabledBoxDecoration == other.disabledBoxDecoration && content == other.content && - icon == other.icon; + icon == other.icon && + iconContent == other.iconContent; @override int get hashCode => enabledBoxDecoration.hashCode ^ disabledBoxDecoration.hashCode ^ content.hashCode ^ - icon.hashCode; + icon.hashCode ^ + iconContent.hashCode; } /// [FButton] style for icon-button. diff --git a/forui/lib/src/widgets/button/button_content.dart b/forui/lib/src/widgets/button/button_content.dart index 3018488f9..4aa31c1de 100644 --- a/forui/lib/src/widgets/button/button_content.dart +++ b/forui/lib/src/widgets/button/button_content.dart @@ -46,10 +46,10 @@ final class _FButtonIconContent extends StatelessWidget { @override Widget build(BuildContext context) { - final FButtonIconContentStyle contentStyle = FButtonIconContentStyle(); + final (:style, enabled: _) = FButton._of(context); return Padding( - padding: contentStyle.padding, + padding: style.iconContent.padding, child: child, ); } From be7ac55edf584180579d153c08dbf6839532673c Mon Sep 17 00:00:00 2001 From: Somye Date: Thu, 15 Aug 2024 10:39:28 +0530 Subject: [PATCH 21/31] Added FButtonIconContentStyle to FButtonCustomStyle --- forui/lib/src/widgets/button/button.dart | 43 +++++++++++++++++++----- 1 file changed, 34 insertions(+), 9 deletions(-) diff --git a/forui/lib/src/widgets/button/button.dart b/forui/lib/src/widgets/button/button.dart index 362470d04..94f4438ef 100644 --- a/forui/lib/src/widgets/button/button.dart +++ b/forui/lib/src/widgets/button/button.dart @@ -27,7 +27,8 @@ class FButton extends StatelessWidget { @useResult static _Data _of(BuildContext context) { final theme = context.dependOnInheritedWidgetOfExactType<_InheritedData>(); - return theme?.data ?? (style: context.theme.buttonStyles.primary, enabled: true); + return theme?.data ?? + (style: context.theme.buttonStyles.primary, enabled: true); } /// The style. Defaults to [FButtonStyle.primary]. @@ -141,7 +142,8 @@ class FButton extends StatelessWidget { onPress: onPress, onLongPress: onLongPress, child: DecoratedBox( - decoration: enabled ? style.enabledBoxDecoration : style.disabledBoxDecoration, + decoration: + enabled ? style.enabledBoxDecoration : style.disabledBoxDecoration, child: _InheritedData( data: (style: style, enabled: enabled), child: child, @@ -157,7 +159,8 @@ class FButton extends StatelessWidget { ..add(DiagnosticsProperty('style', style)) ..add(DiagnosticsProperty('onPress', onPress)) ..add(DiagnosticsProperty('onLongPress', onLongPress)) - ..add(FlagProperty('autofocus', value: autofocus, defaultValue: false, ifTrue: 'autofocus')) + ..add(FlagProperty('autofocus', + value: autofocus, defaultValue: false, ifTrue: 'autofocus')) ..add(DiagnosticsProperty('focusNode', focusNode)) ..add(DiagnosticsProperty('onFocusChange', onFocusChange)) ..add(DiagnosticsProperty('builder', child)); @@ -212,12 +215,16 @@ class FButtonCustomStyle extends FButtonStyle with Diagnosticable { /// The icon's style. final FButtonIconStyle icon; + /// The icon-content's style + final FButtonIconContentStyle iconContent; + /// Creates a [FButtonCustomStyle]. FButtonCustomStyle({ required this.enabledBoxDecoration, required this.disabledBoxDecoration, required this.content, required this.icon, + required this.iconContent, }); /// Returns a copy of this [FButtonCustomStyle] with the given properties replaced. @@ -242,12 +249,15 @@ class FButtonCustomStyle extends FButtonStyle with Diagnosticable { BoxDecoration? disabledBoxDecoration, FButtonContentStyle? content, FButtonIconStyle? icon, + FButtonIconContentStyle? iconContent, }) => FButtonCustomStyle( enabledBoxDecoration: enabledBoxDecoration ?? this.enabledBoxDecoration, - disabledBoxDecoration: disabledBoxDecoration ?? this.disabledBoxDecoration, + disabledBoxDecoration: + disabledBoxDecoration ?? this.disabledBoxDecoration, content: content ?? this.content, icon: icon ?? this.icon, + iconContent: iconContent ?? this.iconContent, ); @override @@ -257,7 +267,11 @@ class FButtonCustomStyle extends FButtonStyle with Diagnosticable { ..add(DiagnosticsProperty('enabledBoxDecoration', enabledBoxDecoration)) ..add(DiagnosticsProperty('disabledBoxDecoration', disabledBoxDecoration)) ..add(DiagnosticsProperty('content', content)) - ..add(DiagnosticsProperty('icon', icon)); + ..add(DiagnosticsProperty('icon', icon)) + ..add( + DiagnosticsProperty( + 'iconContent', iconContent), + ); } @override @@ -268,10 +282,16 @@ class FButtonCustomStyle extends FButtonStyle with Diagnosticable { enabledBoxDecoration == other.enabledBoxDecoration && disabledBoxDecoration == other.disabledBoxDecoration && content == other.content && - icon == other.icon; + icon == other.icon && + iconContent == other.iconContent; @override - int get hashCode => enabledBoxDecoration.hashCode ^ disabledBoxDecoration.hashCode ^ content.hashCode ^ icon.hashCode; + int get hashCode => + enabledBoxDecoration.hashCode ^ + disabledBoxDecoration.hashCode ^ + content.hashCode ^ + icon.hashCode ^ + iconContent.hashCode; } /// [FButton] style for icon-button. @@ -321,7 +341,8 @@ class FButtonIconStyle extends FButtonStyle with Diagnosticable { }) => FButtonIconStyle( enabledBoxDecoration: enabledBoxDecoration ?? this.enabledBoxDecoration, - disabledBoxDecoration: disabledBoxDecoration ?? this.disabledBoxDecoration, + disabledBoxDecoration: + disabledBoxDecoration ?? this.disabledBoxDecoration, content: content ?? this.content, icon: icon ?? this.icon, ); @@ -347,7 +368,11 @@ class FButtonIconStyle extends FButtonStyle with Diagnosticable { icon == other.icon; @override - int get hashCode => enabledBoxDecoration.hashCode ^ disabledBoxDecoration.hashCode ^ content.hashCode ^ icon.hashCode; + int get hashCode => + enabledBoxDecoration.hashCode ^ + disabledBoxDecoration.hashCode ^ + content.hashCode ^ + icon.hashCode; } typedef _Data = ({FButtonCustomStyle style, bool enabled}); From 399ba3303f3f524852b9a67fb606e604f8461e5e Mon Sep 17 00:00:00 2001 From: sommye-ctr Date: Thu, 15 Aug 2024 05:11:08 +0000 Subject: [PATCH 22/31] Commit from GitHub Actions (Forui Presubmit) --- forui/lib/src/widgets/button/button.dart | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/forui/lib/src/widgets/button/button.dart b/forui/lib/src/widgets/button/button.dart index 94f4438ef..f754795d8 100644 --- a/forui/lib/src/widgets/button/button.dart +++ b/forui/lib/src/widgets/button/button.dart @@ -27,8 +27,7 @@ class FButton extends StatelessWidget { @useResult static _Data _of(BuildContext context) { final theme = context.dependOnInheritedWidgetOfExactType<_InheritedData>(); - return theme?.data ?? - (style: context.theme.buttonStyles.primary, enabled: true); + return theme?.data ?? (style: context.theme.buttonStyles.primary, enabled: true); } /// The style. Defaults to [FButtonStyle.primary]. @@ -142,8 +141,7 @@ class FButton extends StatelessWidget { onPress: onPress, onLongPress: onLongPress, child: DecoratedBox( - decoration: - enabled ? style.enabledBoxDecoration : style.disabledBoxDecoration, + decoration: enabled ? style.enabledBoxDecoration : style.disabledBoxDecoration, child: _InheritedData( data: (style: style, enabled: enabled), child: child, @@ -159,8 +157,7 @@ class FButton extends StatelessWidget { ..add(DiagnosticsProperty('style', style)) ..add(DiagnosticsProperty('onPress', onPress)) ..add(DiagnosticsProperty('onLongPress', onLongPress)) - ..add(FlagProperty('autofocus', - value: autofocus, defaultValue: false, ifTrue: 'autofocus')) + ..add(FlagProperty('autofocus', value: autofocus, defaultValue: false, ifTrue: 'autofocus')) ..add(DiagnosticsProperty('focusNode', focusNode)) ..add(DiagnosticsProperty('onFocusChange', onFocusChange)) ..add(DiagnosticsProperty('builder', child)); @@ -253,8 +250,7 @@ class FButtonCustomStyle extends FButtonStyle with Diagnosticable { }) => FButtonCustomStyle( enabledBoxDecoration: enabledBoxDecoration ?? this.enabledBoxDecoration, - disabledBoxDecoration: - disabledBoxDecoration ?? this.disabledBoxDecoration, + disabledBoxDecoration: disabledBoxDecoration ?? this.disabledBoxDecoration, content: content ?? this.content, icon: icon ?? this.icon, iconContent: iconContent ?? this.iconContent, @@ -269,8 +265,7 @@ class FButtonCustomStyle extends FButtonStyle with Diagnosticable { ..add(DiagnosticsProperty('content', content)) ..add(DiagnosticsProperty('icon', icon)) ..add( - DiagnosticsProperty( - 'iconContent', iconContent), + DiagnosticsProperty('iconContent', iconContent), ); } @@ -341,8 +336,7 @@ class FButtonIconStyle extends FButtonStyle with Diagnosticable { }) => FButtonIconStyle( enabledBoxDecoration: enabledBoxDecoration ?? this.enabledBoxDecoration, - disabledBoxDecoration: - disabledBoxDecoration ?? this.disabledBoxDecoration, + disabledBoxDecoration: disabledBoxDecoration ?? this.disabledBoxDecoration, content: content ?? this.content, icon: icon ?? this.icon, ); @@ -368,11 +362,7 @@ class FButtonIconStyle extends FButtonStyle with Diagnosticable { icon == other.icon; @override - int get hashCode => - enabledBoxDecoration.hashCode ^ - disabledBoxDecoration.hashCode ^ - content.hashCode ^ - icon.hashCode; + int get hashCode => enabledBoxDecoration.hashCode ^ disabledBoxDecoration.hashCode ^ content.hashCode ^ icon.hashCode; } typedef _Data = ({FButtonCustomStyle style, bool enabled}); From 094a11b535c16f59177a72b8b1e997f48ebba798 Mon Sep 17 00:00:00 2001 From: Pante Date: Thu, 15 Aug 2024 06:31:49 +0000 Subject: [PATCH 23/31] Commit from GitHub Actions (Forui Samples Presubmit) --- samples/pubspec.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/samples/pubspec.lock b/samples/pubspec.lock index c5a1244da..0c55bb373 100644 --- a/samples/pubspec.lock +++ b/samples/pubspec.lock @@ -367,18 +367,18 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" url: "https://pub.dev" source: hosted - version: "10.0.5" + version: "10.0.4" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" url: "https://pub.dev" source: hosted - version: "3.0.5" + version: "3.0.3" leak_tracker_testing: dependency: transitive description: @@ -407,18 +407,18 @@ packages: dependency: transitive description: name: material_color_utilities - sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.11.1" + version: "0.8.0" meta: dependency: transitive description: name: meta - sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" url: "https://pub.dev" source: hosted - version: "1.15.0" + version: "1.12.0" mime: dependency: transitive description: @@ -652,10 +652,10 @@ packages: dependency: transitive description: name: test_api - sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" url: "https://pub.dev" source: hosted - version: "0.7.2" + version: "0.7.0" timing: dependency: transitive description: @@ -708,10 +708,10 @@ packages: dependency: transitive description: name: vm_service - sha256: f652077d0bdf60abe4c1f6377448e8655008eef28f128bc023f7b5e8dfeb48fc + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" url: "https://pub.dev" source: hosted - version: "14.2.4" + version: "14.2.1" watcher: dependency: transitive description: From 70b886a432c88f03f74cf398cd9748be821a9cbb Mon Sep 17 00:00:00 2001 From: Somye Date: Thu, 15 Aug 2024 19:21:53 +0530 Subject: [PATCH 24/31] Minor Changes --- forui/lib/src/widgets/button/button.dart | 7 ++---- .../src/widgets/button/button_content.dart | 25 +++++++++++-------- .../widgets/button/button_golden_test.dart | 4 +-- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/forui/lib/src/widgets/button/button.dart b/forui/lib/src/widgets/button/button.dart index 94f4438ef..1c2aba4cd 100644 --- a/forui/lib/src/widgets/button/button.dart +++ b/forui/lib/src/widgets/button/button.dart @@ -215,7 +215,7 @@ class FButtonCustomStyle extends FButtonStyle with Diagnosticable { /// The icon's style. final FButtonIconStyle icon; - /// The icon-content's style + /// The icon content's style. final FButtonIconContentStyle iconContent; /// Creates a [FButtonCustomStyle]. @@ -268,10 +268,7 @@ class FButtonCustomStyle extends FButtonStyle with Diagnosticable { ..add(DiagnosticsProperty('disabledBoxDecoration', disabledBoxDecoration)) ..add(DiagnosticsProperty('content', content)) ..add(DiagnosticsProperty('icon', icon)) - ..add( - DiagnosticsProperty( - 'iconContent', iconContent), - ); + ..add(DiagnosticsProperty('iconContent', iconContent)); } @override diff --git a/forui/lib/src/widgets/button/button_content.dart b/forui/lib/src/widgets/button/button_content.dart index dbc0ce2e7..55ed5bdb5 100644 --- a/forui/lib/src/widgets/button/button_content.dart +++ b/forui/lib/src/widgets/button/button_content.dart @@ -18,7 +18,9 @@ final class _FButtonContent extends StatelessWidget { return Padding( padding: style.content.padding, child: DefaultTextStyle.merge( - style: enabled ? style.content.enabledTextStyle : style.content.disabledTextStyle, + style: enabled + ? style.content.enabledTextStyle + : style.content.disabledTextStyle, child: Row( mainAxisAlignment: MainAxisAlignment.center, children: separate( @@ -53,7 +55,7 @@ final class _FButtonIconContent extends StatelessWidget { } } -/// [FButton] icon's style. +/// [FButton] icon content's style. class FButtonIconContentStyle with Diagnosticable { /// The padding. final EdgeInsets padding; @@ -75,19 +77,21 @@ class FButtonIconContentStyle with Diagnosticable { padding: padding ?? this.padding, ); + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties.add(DiagnosticsProperty('padding', padding)); + } + @override bool operator ==(Object other) => identical(this, other) || - other is FButtonIconContentStyle && runtimeType == other.runtimeType && padding == other.padding; + other is FButtonIconContentStyle && + runtimeType == other.runtimeType && + padding == other.padding; @override int get hashCode => padding.hashCode; - - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - super.debugFillProperties(properties); - properties.add(DiagnosticsProperty('padding', padding)); - } } /// [FButton] content's style. @@ -174,5 +178,6 @@ class FButtonContentStyle with Diagnosticable { padding == other.padding; @override - int get hashCode => enabledTextStyle.hashCode ^ disabledTextStyle.hashCode ^ padding.hashCode; + int get hashCode => + enabledTextStyle.hashCode ^ disabledTextStyle.hashCode ^ padding.hashCode; } diff --git a/forui/test/src/widgets/button/button_golden_test.dart b/forui/test/src/widgets/button/button_golden_test.dart index d5fecce18..f930b55fe 100644 --- a/forui/test/src/widgets/button/button_golden_test.dart +++ b/forui/test/src/widgets/button/button_golden_test.dart @@ -189,6 +189,4 @@ void main() { } } }); -} - -//flutter test --update-goldens /Users/somyemahajan/Projects/forui/forui/test/src/widgets/button/button_golden_test.dart +} \ No newline at end of file From 4045bdb539751f35e67e592ba6aeade6c2be1374 Mon Sep 17 00:00:00 2001 From: Somye Date: Thu, 15 Aug 2024 19:22:20 +0530 Subject: [PATCH 25/31] Removed FButtonIconStyle from FButton --- forui/lib/src/widgets/button/button.dart | 81 ------------------------ 1 file changed, 81 deletions(-) diff --git a/forui/lib/src/widgets/button/button.dart b/forui/lib/src/widgets/button/button.dart index 1c2aba4cd..842b8d126 100644 --- a/forui/lib/src/widgets/button/button.dart +++ b/forui/lib/src/widgets/button/button.dart @@ -291,87 +291,6 @@ class FButtonCustomStyle extends FButtonStyle with Diagnosticable { iconContent.hashCode; } -/// [FButton] style for icon-button. -class FButtonIconStyle extends FButtonStyle with Diagnosticable { - /// The box decoration for an enabled button. - final BoxDecoration enabledBoxDecoration; - - /// The box decoration for a disabled button. - final BoxDecoration disabledBoxDecoration; - - /// The content's style. - final FButtonContentStyle content; - - /// The icon's style. - final FButtonIconStyle icon; - - /// Creates a [FButtonIconStyle]. - FButtonIconStyle({ - required this.enabledBoxDecoration, - required this.disabledBoxDecoration, - required this.content, - required this.icon, - }); - - /// Returns a copy of this [FButtonIconStyle] with the given properties replaced. - /// - /// ```dart - /// final style = FButtonIconStyle( - /// enabledBoxDecoration: ..., - /// disabledBoxDecoration: ..., - /// // other properties omitted for brevity - /// ); - /// - /// final copy = style.copyWith( - /// disabledBoxDecoration: ..., - /// ); - /// - /// print(copy.background); // Colors.blue - /// print(copy.border); // Colors.black - /// ``` - @useResult - FButtonIconStyle copyWith({ - BoxDecoration? enabledBoxDecoration, - BoxDecoration? disabledBoxDecoration, - FButtonContentStyle? content, - FButtonIconStyle? icon, - }) => - FButtonIconStyle( - enabledBoxDecoration: enabledBoxDecoration ?? this.enabledBoxDecoration, - disabledBoxDecoration: - disabledBoxDecoration ?? this.disabledBoxDecoration, - content: content ?? this.content, - icon: icon ?? this.icon, - ); - - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - super.debugFillProperties(properties); - properties - ..add(DiagnosticsProperty('enabledBoxDecoration', enabledBoxDecoration)) - ..add(DiagnosticsProperty('disabledBoxDecoration', disabledBoxDecoration)) - ..add(DiagnosticsProperty('content', content)) - ..add(DiagnosticsProperty('icon', icon)); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is FButtonCustomStyle && - runtimeType == other.runtimeType && - enabledBoxDecoration == other.enabledBoxDecoration && - disabledBoxDecoration == other.disabledBoxDecoration && - content == other.content && - icon == other.icon; - - @override - int get hashCode => - enabledBoxDecoration.hashCode ^ - disabledBoxDecoration.hashCode ^ - content.hashCode ^ - icon.hashCode; -} - typedef _Data = ({FButtonCustomStyle style, bool enabled}); class _InheritedData extends InheritedWidget { From 2462171bed7298371bfdedd1f2839b83f3bf3274 Mon Sep 17 00:00:00 2001 From: Somye Date: Thu, 15 Aug 2024 19:28:10 +0530 Subject: [PATCH 26/31] Resolved changes --- forui/lib/src/widgets/button/button.dart | 94 +++--------------------- 1 file changed, 10 insertions(+), 84 deletions(-) diff --git a/forui/lib/src/widgets/button/button.dart b/forui/lib/src/widgets/button/button.dart index f754795d8..842b8d126 100644 --- a/forui/lib/src/widgets/button/button.dart +++ b/forui/lib/src/widgets/button/button.dart @@ -27,7 +27,8 @@ class FButton extends StatelessWidget { @useResult static _Data _of(BuildContext context) { final theme = context.dependOnInheritedWidgetOfExactType<_InheritedData>(); - return theme?.data ?? (style: context.theme.buttonStyles.primary, enabled: true); + return theme?.data ?? + (style: context.theme.buttonStyles.primary, enabled: true); } /// The style. Defaults to [FButtonStyle.primary]. @@ -141,7 +142,8 @@ class FButton extends StatelessWidget { onPress: onPress, onLongPress: onLongPress, child: DecoratedBox( - decoration: enabled ? style.enabledBoxDecoration : style.disabledBoxDecoration, + decoration: + enabled ? style.enabledBoxDecoration : style.disabledBoxDecoration, child: _InheritedData( data: (style: style, enabled: enabled), child: child, @@ -157,7 +159,8 @@ class FButton extends StatelessWidget { ..add(DiagnosticsProperty('style', style)) ..add(DiagnosticsProperty('onPress', onPress)) ..add(DiagnosticsProperty('onLongPress', onLongPress)) - ..add(FlagProperty('autofocus', value: autofocus, defaultValue: false, ifTrue: 'autofocus')) + ..add(FlagProperty('autofocus', + value: autofocus, defaultValue: false, ifTrue: 'autofocus')) ..add(DiagnosticsProperty('focusNode', focusNode)) ..add(DiagnosticsProperty('onFocusChange', onFocusChange)) ..add(DiagnosticsProperty('builder', child)); @@ -212,7 +215,7 @@ class FButtonCustomStyle extends FButtonStyle with Diagnosticable { /// The icon's style. final FButtonIconStyle icon; - /// The icon-content's style + /// The icon content's style. final FButtonIconContentStyle iconContent; /// Creates a [FButtonCustomStyle]. @@ -250,7 +253,8 @@ class FButtonCustomStyle extends FButtonStyle with Diagnosticable { }) => FButtonCustomStyle( enabledBoxDecoration: enabledBoxDecoration ?? this.enabledBoxDecoration, - disabledBoxDecoration: disabledBoxDecoration ?? this.disabledBoxDecoration, + disabledBoxDecoration: + disabledBoxDecoration ?? this.disabledBoxDecoration, content: content ?? this.content, icon: icon ?? this.icon, iconContent: iconContent ?? this.iconContent, @@ -264,9 +268,7 @@ class FButtonCustomStyle extends FButtonStyle with Diagnosticable { ..add(DiagnosticsProperty('disabledBoxDecoration', disabledBoxDecoration)) ..add(DiagnosticsProperty('content', content)) ..add(DiagnosticsProperty('icon', icon)) - ..add( - DiagnosticsProperty('iconContent', iconContent), - ); + ..add(DiagnosticsProperty('iconContent', iconContent)); } @override @@ -289,82 +291,6 @@ class FButtonCustomStyle extends FButtonStyle with Diagnosticable { iconContent.hashCode; } -/// [FButton] style for icon-button. -class FButtonIconStyle extends FButtonStyle with Diagnosticable { - /// The box decoration for an enabled button. - final BoxDecoration enabledBoxDecoration; - - /// The box decoration for a disabled button. - final BoxDecoration disabledBoxDecoration; - - /// The content's style. - final FButtonContentStyle content; - - /// The icon's style. - final FButtonIconStyle icon; - - /// Creates a [FButtonIconStyle]. - FButtonIconStyle({ - required this.enabledBoxDecoration, - required this.disabledBoxDecoration, - required this.content, - required this.icon, - }); - - /// Returns a copy of this [FButtonIconStyle] with the given properties replaced. - /// - /// ```dart - /// final style = FButtonIconStyle( - /// enabledBoxDecoration: ..., - /// disabledBoxDecoration: ..., - /// // other properties omitted for brevity - /// ); - /// - /// final copy = style.copyWith( - /// disabledBoxDecoration: ..., - /// ); - /// - /// print(copy.background); // Colors.blue - /// print(copy.border); // Colors.black - /// ``` - @useResult - FButtonIconStyle copyWith({ - BoxDecoration? enabledBoxDecoration, - BoxDecoration? disabledBoxDecoration, - FButtonContentStyle? content, - FButtonIconStyle? icon, - }) => - FButtonIconStyle( - enabledBoxDecoration: enabledBoxDecoration ?? this.enabledBoxDecoration, - disabledBoxDecoration: disabledBoxDecoration ?? this.disabledBoxDecoration, - content: content ?? this.content, - icon: icon ?? this.icon, - ); - - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - super.debugFillProperties(properties); - properties - ..add(DiagnosticsProperty('enabledBoxDecoration', enabledBoxDecoration)) - ..add(DiagnosticsProperty('disabledBoxDecoration', disabledBoxDecoration)) - ..add(DiagnosticsProperty('content', content)) - ..add(DiagnosticsProperty('icon', icon)); - } - - @override - bool operator ==(Object other) => - identical(this, other) || - other is FButtonCustomStyle && - runtimeType == other.runtimeType && - enabledBoxDecoration == other.enabledBoxDecoration && - disabledBoxDecoration == other.disabledBoxDecoration && - content == other.content && - icon == other.icon; - - @override - int get hashCode => enabledBoxDecoration.hashCode ^ disabledBoxDecoration.hashCode ^ content.hashCode ^ icon.hashCode; -} - typedef _Data = ({FButtonCustomStyle style, bool enabled}); class _InheritedData extends InheritedWidget { From 1b8736d725d09257159b7a0e8ee82ba4e1b5dc3f Mon Sep 17 00:00:00 2001 From: sommye-ctr Date: Thu, 15 Aug 2024 13:59:54 +0000 Subject: [PATCH 27/31] Commit from GitHub Actions (Forui Presubmit) --- forui/lib/src/widgets/button/button.dart | 12 ++++-------- forui/lib/src/widgets/button/button_content.dart | 11 +++-------- .../test/src/widgets/button/button_golden_test.dart | 2 +- 3 files changed, 8 insertions(+), 17 deletions(-) diff --git a/forui/lib/src/widgets/button/button.dart b/forui/lib/src/widgets/button/button.dart index 842b8d126..5b478feaf 100644 --- a/forui/lib/src/widgets/button/button.dart +++ b/forui/lib/src/widgets/button/button.dart @@ -27,8 +27,7 @@ class FButton extends StatelessWidget { @useResult static _Data _of(BuildContext context) { final theme = context.dependOnInheritedWidgetOfExactType<_InheritedData>(); - return theme?.data ?? - (style: context.theme.buttonStyles.primary, enabled: true); + return theme?.data ?? (style: context.theme.buttonStyles.primary, enabled: true); } /// The style. Defaults to [FButtonStyle.primary]. @@ -142,8 +141,7 @@ class FButton extends StatelessWidget { onPress: onPress, onLongPress: onLongPress, child: DecoratedBox( - decoration: - enabled ? style.enabledBoxDecoration : style.disabledBoxDecoration, + decoration: enabled ? style.enabledBoxDecoration : style.disabledBoxDecoration, child: _InheritedData( data: (style: style, enabled: enabled), child: child, @@ -159,8 +157,7 @@ class FButton extends StatelessWidget { ..add(DiagnosticsProperty('style', style)) ..add(DiagnosticsProperty('onPress', onPress)) ..add(DiagnosticsProperty('onLongPress', onLongPress)) - ..add(FlagProperty('autofocus', - value: autofocus, defaultValue: false, ifTrue: 'autofocus')) + ..add(FlagProperty('autofocus', value: autofocus, defaultValue: false, ifTrue: 'autofocus')) ..add(DiagnosticsProperty('focusNode', focusNode)) ..add(DiagnosticsProperty('onFocusChange', onFocusChange)) ..add(DiagnosticsProperty('builder', child)); @@ -253,8 +250,7 @@ class FButtonCustomStyle extends FButtonStyle with Diagnosticable { }) => FButtonCustomStyle( enabledBoxDecoration: enabledBoxDecoration ?? this.enabledBoxDecoration, - disabledBoxDecoration: - disabledBoxDecoration ?? this.disabledBoxDecoration, + disabledBoxDecoration: disabledBoxDecoration ?? this.disabledBoxDecoration, content: content ?? this.content, icon: icon ?? this.icon, iconContent: iconContent ?? this.iconContent, diff --git a/forui/lib/src/widgets/button/button_content.dart b/forui/lib/src/widgets/button/button_content.dart index 55ed5bdb5..3d5e276c3 100644 --- a/forui/lib/src/widgets/button/button_content.dart +++ b/forui/lib/src/widgets/button/button_content.dart @@ -18,9 +18,7 @@ final class _FButtonContent extends StatelessWidget { return Padding( padding: style.content.padding, child: DefaultTextStyle.merge( - style: enabled - ? style.content.enabledTextStyle - : style.content.disabledTextStyle, + style: enabled ? style.content.enabledTextStyle : style.content.disabledTextStyle, child: Row( mainAxisAlignment: MainAxisAlignment.center, children: separate( @@ -86,9 +84,7 @@ class FButtonIconContentStyle with Diagnosticable { @override bool operator ==(Object other) => identical(this, other) || - other is FButtonIconContentStyle && - runtimeType == other.runtimeType && - padding == other.padding; + other is FButtonIconContentStyle && runtimeType == other.runtimeType && padding == other.padding; @override int get hashCode => padding.hashCode; @@ -178,6 +174,5 @@ class FButtonContentStyle with Diagnosticable { padding == other.padding; @override - int get hashCode => - enabledTextStyle.hashCode ^ disabledTextStyle.hashCode ^ padding.hashCode; + int get hashCode => enabledTextStyle.hashCode ^ disabledTextStyle.hashCode ^ padding.hashCode; } diff --git a/forui/test/src/widgets/button/button_golden_test.dart b/forui/test/src/widgets/button/button_golden_test.dart index f930b55fe..cd162e6af 100644 --- a/forui/test/src/widgets/button/button_golden_test.dart +++ b/forui/test/src/widgets/button/button_golden_test.dart @@ -189,4 +189,4 @@ void main() { } } }); -} \ No newline at end of file +} From dd55aeddff65cb0f2a39b1faab667ca44823d813 Mon Sep 17 00:00:00 2001 From: Somye Date: Thu, 15 Aug 2024 22:22:58 +0530 Subject: [PATCH 28/31] Resolved errors --- forui/lib/src/widgets/button/button_styles.dart | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/forui/lib/src/widgets/button/button_styles.dart b/forui/lib/src/widgets/button/button_styles.dart index 7b675e924..a124a21dd 100644 --- a/forui/lib/src/widgets/button/button_styles.dart +++ b/forui/lib/src/widgets/button/button_styles.dart @@ -24,7 +24,10 @@ class FButtonStyles with Diagnosticable { /// Creates a [FButtonCustomStyle] that inherits its properties from the provided [colorScheme], [typography], and /// [style]. - FButtonStyles.inherit({required FColorScheme colorScheme, required FTypography typography, required FStyle style}) + FButtonStyles.inherit( + {required FColorScheme colorScheme, + required FTypography typography, + required FStyle style}) : primary = FButtonCustomStyle( enabledBoxDecoration: BoxDecoration( borderRadius: style.borderRadius, @@ -43,6 +46,7 @@ class FButtonStyles with Diagnosticable { enabledColor: colorScheme.primaryForeground, disabledColor: colorScheme.primaryForeground.withOpacity(0.5), ), + iconContent: FButtonIconContentStyle(), ), secondary = FButtonCustomStyle( enabledBoxDecoration: BoxDecoration( @@ -62,6 +66,7 @@ class FButtonStyles with Diagnosticable { enabledColor: colorScheme.secondaryForeground, disabledColor: colorScheme.secondaryForeground.withOpacity(0.5), ), + iconContent: FButtonIconContentStyle(), ), destructive = FButtonCustomStyle( enabledBoxDecoration: BoxDecoration( @@ -81,6 +86,7 @@ class FButtonStyles with Diagnosticable { enabledColor: colorScheme.destructiveForeground, disabledColor: colorScheme.destructiveForeground.withOpacity(0.5), ), + iconContent: FButtonIconContentStyle(), ), outline = FButtonCustomStyle( enabledBoxDecoration: BoxDecoration( @@ -104,6 +110,7 @@ class FButtonStyles with Diagnosticable { enabledColor: colorScheme.secondaryForeground, disabledColor: colorScheme.secondaryForeground.withOpacity(0.5), ), + iconContent: FButtonIconContentStyle(), ); /// Returns a copy of this [FButtonStyles] with the given properties replaced. @@ -155,5 +162,9 @@ class FButtonStyles with Diagnosticable { outline == other.outline; @override - int get hashCode => primary.hashCode ^ secondary.hashCode ^ destructive.hashCode ^ outline.hashCode; + int get hashCode => + primary.hashCode ^ + secondary.hashCode ^ + destructive.hashCode ^ + outline.hashCode; } From 3e449db37d371e546e919dec86153ef7049099d1 Mon Sep 17 00:00:00 2001 From: sommye-ctr Date: Thu, 15 Aug 2024 16:54:41 +0000 Subject: [PATCH 29/31] Commit from GitHub Actions (Forui Presubmit) --- forui/lib/src/widgets/button/button_styles.dart | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/forui/lib/src/widgets/button/button_styles.dart b/forui/lib/src/widgets/button/button_styles.dart index a124a21dd..ef0b103a0 100644 --- a/forui/lib/src/widgets/button/button_styles.dart +++ b/forui/lib/src/widgets/button/button_styles.dart @@ -24,10 +24,7 @@ class FButtonStyles with Diagnosticable { /// Creates a [FButtonCustomStyle] that inherits its properties from the provided [colorScheme], [typography], and /// [style]. - FButtonStyles.inherit( - {required FColorScheme colorScheme, - required FTypography typography, - required FStyle style}) + FButtonStyles.inherit({required FColorScheme colorScheme, required FTypography typography, required FStyle style}) : primary = FButtonCustomStyle( enabledBoxDecoration: BoxDecoration( borderRadius: style.borderRadius, @@ -162,9 +159,5 @@ class FButtonStyles with Diagnosticable { outline == other.outline; @override - int get hashCode => - primary.hashCode ^ - secondary.hashCode ^ - destructive.hashCode ^ - outline.hashCode; + int get hashCode => primary.hashCode ^ secondary.hashCode ^ destructive.hashCode ^ outline.hashCode; } From 5f0da01a26573a0e0ba98d641672055cbe7c93d6 Mon Sep 17 00:00:00 2001 From: Somye Date: Fri, 16 Aug 2024 15:40:07 +0530 Subject: [PATCH 30/31] Added default value to FCustomButtonStyle.iconContent --- forui/lib/src/widgets/button/button.dart | 14 +++++++++----- forui/lib/src/widgets/button/button_content.dart | 2 +- forui/lib/src/widgets/button/button_styles.dart | 4 ---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/forui/lib/src/widgets/button/button.dart b/forui/lib/src/widgets/button/button.dart index 5b478feaf..507afeddc 100644 --- a/forui/lib/src/widgets/button/button.dart +++ b/forui/lib/src/widgets/button/button.dart @@ -27,7 +27,8 @@ class FButton extends StatelessWidget { @useResult static _Data _of(BuildContext context) { final theme = context.dependOnInheritedWidgetOfExactType<_InheritedData>(); - return theme?.data ?? (style: context.theme.buttonStyles.primary, enabled: true); + return theme?.data ?? + (style: context.theme.buttonStyles.primary, enabled: true); } /// The style. Defaults to [FButtonStyle.primary]. @@ -141,7 +142,8 @@ class FButton extends StatelessWidget { onPress: onPress, onLongPress: onLongPress, child: DecoratedBox( - decoration: enabled ? style.enabledBoxDecoration : style.disabledBoxDecoration, + decoration: + enabled ? style.enabledBoxDecoration : style.disabledBoxDecoration, child: _InheritedData( data: (style: style, enabled: enabled), child: child, @@ -157,7 +159,8 @@ class FButton extends StatelessWidget { ..add(DiagnosticsProperty('style', style)) ..add(DiagnosticsProperty('onPress', onPress)) ..add(DiagnosticsProperty('onLongPress', onLongPress)) - ..add(FlagProperty('autofocus', value: autofocus, defaultValue: false, ifTrue: 'autofocus')) + ..add(FlagProperty('autofocus', + value: autofocus, defaultValue: false, ifTrue: 'autofocus')) ..add(DiagnosticsProperty('focusNode', focusNode)) ..add(DiagnosticsProperty('onFocusChange', onFocusChange)) ..add(DiagnosticsProperty('builder', child)); @@ -221,7 +224,7 @@ class FButtonCustomStyle extends FButtonStyle with Diagnosticable { required this.disabledBoxDecoration, required this.content, required this.icon, - required this.iconContent, + this.iconContent = const FButtonIconContentStyle(), }); /// Returns a copy of this [FButtonCustomStyle] with the given properties replaced. @@ -250,7 +253,8 @@ class FButtonCustomStyle extends FButtonStyle with Diagnosticable { }) => FButtonCustomStyle( enabledBoxDecoration: enabledBoxDecoration ?? this.enabledBoxDecoration, - disabledBoxDecoration: disabledBoxDecoration ?? this.disabledBoxDecoration, + disabledBoxDecoration: + disabledBoxDecoration ?? this.disabledBoxDecoration, content: content ?? this.content, icon: icon ?? this.icon, iconContent: iconContent ?? this.iconContent, diff --git a/forui/lib/src/widgets/button/button_content.dart b/forui/lib/src/widgets/button/button_content.dart index 3d5e276c3..ea9091d1c 100644 --- a/forui/lib/src/widgets/button/button_content.dart +++ b/forui/lib/src/widgets/button/button_content.dart @@ -59,7 +59,7 @@ class FButtonIconContentStyle with Diagnosticable { final EdgeInsets padding; /// Creates a [FButtonIconContentStyle]. - FButtonIconContentStyle({ + const FButtonIconContentStyle({ this.padding = const EdgeInsets.symmetric( horizontal: 16, vertical: 12.5, diff --git a/forui/lib/src/widgets/button/button_styles.dart b/forui/lib/src/widgets/button/button_styles.dart index a124a21dd..ca882a6e4 100644 --- a/forui/lib/src/widgets/button/button_styles.dart +++ b/forui/lib/src/widgets/button/button_styles.dart @@ -46,7 +46,6 @@ class FButtonStyles with Diagnosticable { enabledColor: colorScheme.primaryForeground, disabledColor: colorScheme.primaryForeground.withOpacity(0.5), ), - iconContent: FButtonIconContentStyle(), ), secondary = FButtonCustomStyle( enabledBoxDecoration: BoxDecoration( @@ -66,7 +65,6 @@ class FButtonStyles with Diagnosticable { enabledColor: colorScheme.secondaryForeground, disabledColor: colorScheme.secondaryForeground.withOpacity(0.5), ), - iconContent: FButtonIconContentStyle(), ), destructive = FButtonCustomStyle( enabledBoxDecoration: BoxDecoration( @@ -86,7 +84,6 @@ class FButtonStyles with Diagnosticable { enabledColor: colorScheme.destructiveForeground, disabledColor: colorScheme.destructiveForeground.withOpacity(0.5), ), - iconContent: FButtonIconContentStyle(), ), outline = FButtonCustomStyle( enabledBoxDecoration: BoxDecoration( @@ -110,7 +107,6 @@ class FButtonStyles with Diagnosticable { enabledColor: colorScheme.secondaryForeground, disabledColor: colorScheme.secondaryForeground.withOpacity(0.5), ), - iconContent: FButtonIconContentStyle(), ); /// Returns a copy of this [FButtonStyles] with the given properties replaced. From fe6d68238705b3a607bfb24f6811455c55bcde87 Mon Sep 17 00:00:00 2001 From: sommye-ctr Date: Fri, 16 Aug 2024 10:12:06 +0000 Subject: [PATCH 31/31] Commit from GitHub Actions (Forui Presubmit) --- forui/lib/src/widgets/button/button.dart | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/forui/lib/src/widgets/button/button.dart b/forui/lib/src/widgets/button/button.dart index 507afeddc..f1d6637b9 100644 --- a/forui/lib/src/widgets/button/button.dart +++ b/forui/lib/src/widgets/button/button.dart @@ -27,8 +27,7 @@ class FButton extends StatelessWidget { @useResult static _Data _of(BuildContext context) { final theme = context.dependOnInheritedWidgetOfExactType<_InheritedData>(); - return theme?.data ?? - (style: context.theme.buttonStyles.primary, enabled: true); + return theme?.data ?? (style: context.theme.buttonStyles.primary, enabled: true); } /// The style. Defaults to [FButtonStyle.primary]. @@ -142,8 +141,7 @@ class FButton extends StatelessWidget { onPress: onPress, onLongPress: onLongPress, child: DecoratedBox( - decoration: - enabled ? style.enabledBoxDecoration : style.disabledBoxDecoration, + decoration: enabled ? style.enabledBoxDecoration : style.disabledBoxDecoration, child: _InheritedData( data: (style: style, enabled: enabled), child: child, @@ -159,8 +157,7 @@ class FButton extends StatelessWidget { ..add(DiagnosticsProperty('style', style)) ..add(DiagnosticsProperty('onPress', onPress)) ..add(DiagnosticsProperty('onLongPress', onLongPress)) - ..add(FlagProperty('autofocus', - value: autofocus, defaultValue: false, ifTrue: 'autofocus')) + ..add(FlagProperty('autofocus', value: autofocus, defaultValue: false, ifTrue: 'autofocus')) ..add(DiagnosticsProperty('focusNode', focusNode)) ..add(DiagnosticsProperty('onFocusChange', onFocusChange)) ..add(DiagnosticsProperty('builder', child)); @@ -253,8 +250,7 @@ class FButtonCustomStyle extends FButtonStyle with Diagnosticable { }) => FButtonCustomStyle( enabledBoxDecoration: enabledBoxDecoration ?? this.enabledBoxDecoration, - disabledBoxDecoration: - disabledBoxDecoration ?? this.disabledBoxDecoration, + disabledBoxDecoration: disabledBoxDecoration ?? this.disabledBoxDecoration, content: content ?? this.content, icon: icon ?? this.icon, iconContent: iconContent ?? this.iconContent,