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/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: