Skip to content

Commit

Permalink
fix: Fix progress theme and Use latest version of the Zeta
Browse files Browse the repository at this point in the history
  • Loading branch information
ps9310 committed Nov 18, 2024
1 parent 6a36df0 commit d980cc8
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 23 deletions.
7 changes: 5 additions & 2 deletions example/lib/pages/components/default_flutter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ class DefaultFlutter extends StatelessWidget {
),
Card(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
LinearProgressIndicator(),
CircularProgressIndicator(),
Slider(
value: 50,
onChanged: (value) {},
Expand All @@ -62,7 +65,7 @@ class DefaultFlutter extends StatelessWidget {
min: 0,
max: 100,
),
],
].divide(const SizedBox(height: 8)).toList(growable: false),
),
),
Card(
Expand Down Expand Up @@ -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")),
],
),
Expand Down
2 changes: 0 additions & 2 deletions example/macos/Flutter/GeneratedPluginRegistrant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"))
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
29 changes: 12 additions & 17 deletions lib/src/components/atoms/circle_icon_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ class _CircleIconButton extends State<CircleIconButton> {

@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(
Expand All @@ -180,9 +181,9 @@ class _CircleIconButton extends State<CircleIconButton> {
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(
Expand All @@ -192,35 +193,29 @@ class _CircleIconButton extends State<CircleIconButton> {
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;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ extension ProgressIndicatorExtension on ZetaColorScheme {
return ProgressIndicatorThemeData(
/// Setting up the color.
color: secondary,
linearTrackColor: Colors.transparent,
circularTrackColor: Colors.transparent,
);
}
}
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit d980cc8

Please sign in to comment.