From d980cc86a989dbd8257168bc44a1d211a471fcfa Mon Sep 17 00:00:00 2001 From: Prashant Sawant Date: Mon, 18 Nov 2024 09:15:53 -0500 Subject: [PATCH 1/2] fix: Fix progress theme and Use latest version of the Zeta --- .../lib/pages/components/default_flutter.dart | 7 +++-- .../Flutter/GeneratedPluginRegistrant.swift | 2 -- example/pubspec.yaml | 2 +- .../components/atoms/circle_icon_button.dart | 29 ++++++++----------- .../progress_indicator_theme.dart | 2 ++ pubspec.yaml | 2 +- 6 files changed, 21 insertions(+), 23 deletions(-) diff --git a/example/lib/pages/components/default_flutter.dart b/example/lib/pages/components/default_flutter.dart index c059420..42ce351 100644 --- a/example/lib/pages/components/default_flutter.dart +++ b/example/lib/pages/components/default_flutter.dart @@ -47,7 +47,10 @@ class DefaultFlutter extends StatelessWidget { ), Card( child: Column( + crossAxisAlignment: CrossAxisAlignment.center, children: [ + LinearProgressIndicator(), + CircularProgressIndicator(), Slider( value: 50, onChanged: (value) {}, @@ -62,7 +65,7 @@ class DefaultFlutter extends StatelessWidget { min: 0, max: 100, ), - ], + ].divide(const SizedBox(height: 8)).toList(growable: false), ), ), Card( @@ -144,7 +147,7 @@ class DefaultFlutter extends StatelessWidget { TextButton(onPressed: () {}, child: Text("Cancel")), const Spacer(), OutlinedButton(onPressed: () {}, child: Text("Reset")), - SizedBox(width: ZetaSpacing.small), + SizedBox(width: Zeta.of(context).spacing.small), ElevatedButton(onPressed: () {}, child: Text("Next")), ], ), diff --git a/example/macos/Flutter/GeneratedPluginRegistrant.swift b/example/macos/Flutter/GeneratedPluginRegistrant.swift index a5fa519..c267112 100644 --- a/example/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/example/macos/Flutter/GeneratedPluginRegistrant.swift @@ -15,7 +15,6 @@ import irondash_engine_context import just_audio import package_info_plus import path_provider_foundation -import quill_native_bridge_macos import record_darwin import share_plus import shared_preferences_foundation @@ -37,7 +36,6 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { JustAudioPlugin.register(with: registry.registrar(forPlugin: "JustAudioPlugin")) FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) - QuillNativeBridgePlugin.register(with: registry.registrar(forPlugin: "QuillNativeBridgePlugin")) RecordPlugin.register(with: registry.registrar(forPlugin: "RecordPlugin")) SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin")) SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) diff --git a/example/pubspec.yaml b/example/pubspec.yaml index eb6f9b6..284947a 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -23,7 +23,7 @@ dependencies: table_calendar: ^3.0.9 zds_flutter: path: ../ - zeta_flutter: ^0.15.2 + zeta_flutter: ^0.18.0 flutter: uses-material-design: true diff --git a/lib/src/components/atoms/circle_icon_button.dart b/lib/src/components/atoms/circle_icon_button.dart index 5c983da..a051c9f 100644 --- a/lib/src/components/atoms/circle_icon_button.dart +++ b/lib/src/components/atoms/circle_icon_button.dart @@ -168,7 +168,8 @@ class _CircleIconButton extends State { @override Widget build(BuildContext context) { - final colors = Zeta.of(context).colors; + final zeta = Zeta.of(context); + final colors = zeta.colors; final bool toggled = type == CircleButtonType.toggled; return Column( @@ -180,9 +181,9 @@ class _CircleIconButton extends State { decoration: _animatedStyle(colors, isPressed), child: Icon( toggled ? widget.activeIcon : widget.icon, - size: _iconSize, + size: _iconSize(zeta), color: type.foregroundColor(colors), - ).padding(_iconPadding), + ).padding(_iconPadding(zeta)), ), ), Text( @@ -192,35 +193,29 @@ class _CircleIconButton extends State { fontSize: widget.size == ButtonSize.small ? 14 : 16, ), ), - ] - .divide( - const SizedBox( - height: ZetaSpacing.minimum, - ), - ) - .toList(), + ].divide(SizedBox(height: zeta.spacing.minimum)).toList(), ); } - double get _iconPadding { + double _iconPadding(Zeta zeta) { switch (widget.size) { case ButtonSize.large: - return ZetaSpacing.xl_1; + return zeta.spacing.xl; case ButtonSize.medium: return 15; case ButtonSize.small: - return ZetaSpacing.minimum; + return zeta.spacing.minimum; } } - double get _iconSize { + double _iconSize(Zeta zeta) { switch (widget.size) { case ButtonSize.large: - return ZetaSpacing.xl_6; + return zeta.spacing.xl_6; case ButtonSize.medium: - return ZetaSpacingBase.x7_5; + return zeta.spacing.xl_3; case ButtonSize.small: - return ZetaSpacing.xl_1; + return zeta.spacing.xl; } } diff --git a/lib/src/utils/theme/theme_builders/progress_indicator_theme.dart b/lib/src/utils/theme/theme_builders/progress_indicator_theme.dart index 49335b1..acbee26 100644 --- a/lib/src/utils/theme/theme_builders/progress_indicator_theme.dart +++ b/lib/src/utils/theme/theme_builders/progress_indicator_theme.dart @@ -14,6 +14,8 @@ extension ProgressIndicatorExtension on ZetaColorScheme { return ProgressIndicatorThemeData( /// Setting up the color. color: secondary, + linearTrackColor: Colors.transparent, + circularTrackColor: Colors.transparent, ); } } diff --git a/pubspec.yaml b/pubspec.yaml index 582ab0a..8f7d0ab 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -74,7 +74,7 @@ dependencies: video_compress: ^3.1.3 video_player: ^2.8.6 vsc_quill_delta_to_html: ^1.0.5 - zeta_flutter: ^0.15.2 + zeta_flutter: ^0.18.0 dev_dependencies: flutter_test: From f88f2ce8b3018b0b66571fe691406e49e08d2519 Mon Sep 17 00:00:00 2001 From: github-actions Date: Mon, 18 Nov 2024 14:38:48 +0000 Subject: [PATCH 2/2] chore(automated): Lint commit and format --- example/macos/Flutter/GeneratedPluginRegistrant.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/example/macos/Flutter/GeneratedPluginRegistrant.swift b/example/macos/Flutter/GeneratedPluginRegistrant.swift index c267112..a5fa519 100644 --- a/example/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/example/macos/Flutter/GeneratedPluginRegistrant.swift @@ -15,6 +15,7 @@ import irondash_engine_context import just_audio import package_info_plus import path_provider_foundation +import quill_native_bridge_macos import record_darwin import share_plus import shared_preferences_foundation @@ -36,6 +37,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { JustAudioPlugin.register(with: registry.registrar(forPlugin: "JustAudioPlugin")) FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) + QuillNativeBridgePlugin.register(with: registry.registrar(forPlugin: "QuillNativeBridgePlugin")) RecordPlugin.register(with: registry.registrar(forPlugin: "RecordPlugin")) SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin")) SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))