From 1684e8a686eb12272079b847df8041b1e141e2d4 Mon Sep 17 00:00:00 2001 From: Osman Date: Thu, 22 Feb 2024 16:24:14 +0000 Subject: [PATCH 1/5] Add progress circle --- example/lib/home.dart | 1 - .../pages/components/progress_example.dart | 121 ++++++++++------- .../components/progress/progress_circle.dart | 126 ++++++++++++++++++ lib/zeta_flutter.dart | 1 + 4 files changed, 203 insertions(+), 46 deletions(-) create mode 100644 lib/src/components/progress/progress_circle.dart diff --git a/example/lib/home.dart b/example/lib/home.dart index 19b41578..4ff245a3 100644 --- a/example/lib/home.dart +++ b/example/lib/home.dart @@ -11,7 +11,6 @@ import 'package:zeta_example/pages/components/chip_example.dart'; import 'package:zeta_example/pages/theme/color_example.dart'; import 'package:zeta_example/pages/components/password_input_example.dart'; import 'package:zeta_example/pages/components/progress_example.dart'; - import 'package:zeta_example/pages/assets/icons_example.dart'; import 'package:zeta_example/widgets.dart'; import 'package:zeta_flutter/zeta_flutter.dart'; diff --git a/example/lib/pages/components/progress_example.dart b/example/lib/pages/components/progress_example.dart index 84167758..c5c8c69d 100644 --- a/example/lib/pages/components/progress_example.dart +++ b/example/lib/pages/components/progress_example.dart @@ -20,29 +20,48 @@ class ProgressExampleState extends State { child: SingleChildScrollView( child: SizedBox( width: double.infinity, - child: Column(children: [ - Wrapper( - stepsCompleted: 10, - isThin: true, - ), - SizedBox( - height: 20, - ), - Wrapper( + child: Column( + children: [ + Text('Progress Bars', style: ZetaTextStyles.displayMedium), + SizedBox( + height: 20, + ), + Wrapper( + stepsCompleted: 10, + isThin: true, + ), + SizedBox( + height: 20, + ), + Wrapper( + stepsCompleted: 0, + type: ZetaBarType.standard, + isThin: false, + stateChangeable: true), + SizedBox( + height: 20, + ), + Wrapper( stepsCompleted: 0, - type: ZetaBarType.standard, + type: ZetaBarType.indeterminate, isThin: false, - stateChangeable: true), - SizedBox( - height: 20, - ), - Wrapper( - stepsCompleted: 0, - type: ZetaBarType.indeterminate, - isThin: false, - label: "UPLOADING ...", - ), - ]), + label: "UPLOADING ...", + ), + SizedBox( + height: 20, + ), + Text('Progress CIrcles', style: ZetaTextStyles.displayMedium), + SizedBox( + height: 80, + ), + Wrapper( + stepsCompleted: 0, + circleSize: ZetaCircleSizes.xl, + rounded: false, + isCircle: true, + ), + ], + ), ), ), ), @@ -51,21 +70,26 @@ class ProgressExampleState extends State { } class Wrapper extends StatefulWidget { - const Wrapper( - {super.key, - required this.stepsCompleted, - this.type = ZetaBarType.standard, - this.isThin = false, - this.rounded = true, - this.stateChangeable = false, - this.label}); + const Wrapper({ + super.key, + required this.stepsCompleted, + this.type = ZetaBarType.standard, + this.isThin = false, + this.rounded = true, + this.stateChangeable = false, + this.label, + this.isCircle = false, + this.circleSize, + }); final int stepsCompleted; - final bool rounded; - final ZetaBarType type; - final bool isThin; + final bool? rounded; + final ZetaBarType? type; + final bool? isThin; final String? label; - final bool stateChangeable; + final bool? stateChangeable; + final bool isCircle; + final ZetaCircleSizes? circleSize; @override State createState() => _WrapperState(); @@ -79,7 +103,7 @@ class _WrapperState extends State { @override void initState() { super.initState(); - type = widget.type; + type = widget.type!; stepsCompleted = widget.stepsCompleted; progress = stepsCompleted / 10; } @@ -105,15 +129,22 @@ class _WrapperState extends State { return Column( // Replace with a Column for vertical children: [ - SizedBox( - width: 400, - child: ZetaProgressBar( - progress: progress, - rounded: widget.rounded, - type: type, - isThin: widget.isThin, - label: widget.label), - ), + widget.isCircle + ? Center( + child: ZetaProgressCircle( + progress: progress, + size: widget.circleSize!, + ), + ) + : SizedBox( + width: 400, + child: ZetaProgressBar( + progress: progress, + rounded: widget.rounded!, + type: type, + isThin: widget.isThin!, + label: widget.label), + ), const SizedBox(width: 40), Row( mainAxisAlignment: MainAxisAlignment.center, @@ -123,10 +154,10 @@ class _WrapperState extends State { onPressed: increasePercentage, child: Text("Increase")) : Container(), const SizedBox(width: 40), - widget.stateChangeable + widget.stateChangeable! ? FilledButton( onPressed: setLoading, child: Text("Start Buffering")) - : Container() + : SizedBox.shrink() ], ) ], diff --git a/lib/src/components/progress/progress_circle.dart b/lib/src/components/progress/progress_circle.dart new file mode 100644 index 00000000..b95758d0 --- /dev/null +++ b/lib/src/components/progress/progress_circle.dart @@ -0,0 +1,126 @@ +import 'dart:math' as math; +import 'package:flutter/foundation.dart'; +import 'package:flutter/material.dart'; + +import '../../../zeta_flutter.dart'; +import 'progress.dart'; + +/// Sizes for [ZetaProgressCircle] +enum ZetaCircleSizes { + ///24 X 24 + xs, + + /// 36 X 36 + s, + + /// 40 x 40 + m, + + /// 48 X 48 + l, + + /// 64 X 64 + xl +} + +///Class definition for [ZetaProgressCircle] +class ZetaProgressCircle extends ZetaProgress { + /// Constructor for [ZetaProgressCircle] + const ZetaProgressCircle({ + super.key, + super.progress = 0, + this.size = ZetaCircleSizes.xl, + this.rounded = true, + }); + + ///Size of [ZetaProgressCircle] + final ZetaCircleSizes size; + + /// Border Type for [ZetaWidgetBorder] + final bool rounded; + + @override + State createState() => ZetaProgressCircleState(); + + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties + ..add(EnumProperty('size', size)) + ..add(DoubleProperty('progress', progress)) + ..add(DiagnosticsProperty('rounded', rounded)); + } +} + +///Class definition for [ZetaProgressCircleState] +class ZetaProgressCircleState extends ZetaProgressState { + @override + Widget build(BuildContext context) { + return AnimatedBuilder( + animation: controller, + builder: (context, child) { + return CustomPaint( + size: _getSize(), + painter: CirclePainter( + progress: animation.value, + rounded: widget.rounded, + ), + ); + }, + ); + } + + Size _getSize() { + switch (widget.size) { + case ZetaCircleSizes.xs: + return const Size(24, 24); + case ZetaCircleSizes.s: + return const Size(36, 36); + case ZetaCircleSizes.m: + return const Size(40, 40); + case ZetaCircleSizes.l: + return const Size(48, 48); + case ZetaCircleSizes.xl: + return const Size(64, 64); + } + } + + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties + ..add(DoubleProperty('progress', progress)) + ..add(DiagnosticsProperty('controller', controller)) + ..add(DiagnosticsProperty>('animation', animation)); + } +} + +///Class definition for [CirclePainter] +class CirclePainter extends CustomPainter { + ///Constructor for [CirclePainter] + CirclePainter({this.progress = 0, this.rounded = true}); + + ///Percentage of progress in decimal value, defaults to 0 + final double progress; + + ///Is circle rounded, defaults to true + final bool rounded; + + final _paint = Paint() + ..color = Colors.blue + ..strokeWidth = 4 + ..style = PaintingStyle.stroke; + + @override + void paint(Canvas canvas, Size size) { + if (rounded) _paint.strokeCap = StrokeCap.round; + + const double fullCircle = 2 * math.pi; + + canvas.drawArc(Rect.fromLTRB(0, 0, size.width, size.height), + 3 * math.pi / 2, progress * fullCircle, false, _paint); + } + + @override + bool shouldRepaint(CustomPainter oldDelegate) => false; +} diff --git a/lib/zeta_flutter.dart b/lib/zeta_flutter.dart index 3bffd1dd..ae853ad5 100644 --- a/lib/zeta_flutter.dart +++ b/lib/zeta_flutter.dart @@ -22,6 +22,7 @@ export 'src/components/checkbox/checkbox.dart'; export 'src/components/chips/chip.dart'; export 'src/components/password/password_input.dart'; export 'src/components/progress/progress_bar.dart'; +export 'src/components/progress/progress_circle.dart'; export 'src/theme/color_extensions.dart'; export 'src/theme/color_scheme.dart'; export 'src/theme/color_swatch.dart'; From 14ddb66aacff64eb37859aa42ac0e27240ac7ef1 Mon Sep 17 00:00:00 2001 From: Osman Date: Mon, 26 Feb 2024 11:08:09 +0000 Subject: [PATCH 2/5] Handle state outside --- lib/src/components/progress/progress_circle.dart | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/src/components/progress/progress_circle.dart b/lib/src/components/progress/progress_circle.dart index b95758d0..3e52667d 100644 --- a/lib/src/components/progress/progress_circle.dart +++ b/lib/src/components/progress/progress_circle.dart @@ -1,6 +1,7 @@ import 'dart:math' as math; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; +import 'package:flutter/widgets.dart'; import '../../../zeta_flutter.dart'; import 'progress.dart'; From 37e7e7d9e8fe4ce2223a8a21672a712396b29cb6 Mon Sep 17 00:00:00 2001 From: Osman Date: Tue, 5 Mar 2024 14:10:36 +0000 Subject: [PATCH 3/5] Fix lint errors and add tokens --- lib/src/components/progress/progress.dart | 2 +- lib/src/components/progress/progress_bar.dart | 14 ++++++------- .../components/progress/progress_circle.dart | 20 +++++++++++-------- 3 files changed, 20 insertions(+), 16 deletions(-) diff --git a/lib/src/components/progress/progress.dart b/lib/src/components/progress/progress.dart index 8730a303..40503d2d 100644 --- a/lib/src/components/progress/progress.dart +++ b/lib/src/components/progress/progress.dart @@ -35,7 +35,7 @@ abstract class ZetaProgressState extends State super.initState(); progress = widget.progress; controller = AnimationController( - vsync: this, duration: const Duration(milliseconds: 200)); + vsync: this, duration: const Duration(milliseconds: 200),); animation = Tween( begin: widget.progress, // Start value end: widget.progress, // End value (initially same as start value) diff --git a/lib/src/components/progress/progress_bar.dart b/lib/src/components/progress/progress_bar.dart index f7793fc8..0a81e61f 100644 --- a/lib/src/components/progress/progress_bar.dart +++ b/lib/src/components/progress/progress_bar.dart @@ -26,7 +26,7 @@ class ZetaProgressBar extends ZetaProgress { required this.rounded, required this.type, required this.isThin, - this.label}); + this.label,}); /// Constructs a standard progress bar const ZetaProgressBar.standard( @@ -34,7 +34,7 @@ class ZetaProgressBar extends ZetaProgress { required super.progress, this.rounded = true, this.isThin = false, - this.label}) + this.label,}) : type = ZetaBarType.standard; /// Constructs buffering example @@ -43,7 +43,7 @@ class ZetaProgressBar extends ZetaProgress { required super.progress, this.rounded = true, this.isThin = false, - this.label}) + this.label,}) : type = ZetaBarType.buffering; /// Constructs indeterminate example @@ -52,7 +52,7 @@ class ZetaProgressBar extends ZetaProgress { required super.progress, this.rounded = true, this.isThin = false, - this.label}) + this.label,}) : type = ZetaBarType.indeterminate; /// Is progress bar rounded or sharp. @@ -108,7 +108,7 @@ class _ZetaProgressBarState extends ZetaProgressState { ), ), _extraWidgets(), - ]) + ],), ], ); } @@ -130,9 +130,9 @@ class _ZetaProgressBarState extends ZetaProgressState { height: _weight, decoration: const BoxDecoration( color: Color.fromRGBO(224, 227, 233, 1), - borderRadius: ZetaRadius.rounded), + borderRadius: ZetaRadius.rounded,), ), - ]); + ],); final Widget extraWidgets = Row( children: widget.type == ZetaBarType.buffering diff --git a/lib/src/components/progress/progress_circle.dart b/lib/src/components/progress/progress_circle.dart index 3e52667d..28b546c1 100644 --- a/lib/src/components/progress/progress_circle.dart +++ b/lib/src/components/progress/progress_circle.dart @@ -1,7 +1,6 @@ import 'dart:math' as math; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/widgets.dart'; import '../../../zeta_flutter.dart'; import 'progress.dart'; @@ -74,15 +73,15 @@ class ZetaProgressCircleState extends ZetaProgressState { Size _getSize() { switch (widget.size) { case ZetaCircleSizes.xs: - return const Size(24, 24); + return const Size(ZetaSpacing.x6, ZetaSpacing.x6); case ZetaCircleSizes.s: - return const Size(36, 36); + return const Size(ZetaSpacing.x9, ZetaSpacing.x9); case ZetaCircleSizes.m: - return const Size(40, 40); + return const Size(ZetaSpacing.x10, ZetaSpacing.x10); case ZetaCircleSizes.l: - return const Size(48, 48); + return const Size(ZetaSpacing.x12, ZetaSpacing.x12); case ZetaCircleSizes.xl: - return const Size(64, 64); + return const Size(ZetaSpacing.x16, ZetaSpacing.x16); } } @@ -118,8 +117,13 @@ class CirclePainter extends CustomPainter { const double fullCircle = 2 * math.pi; - canvas.drawArc(Rect.fromLTRB(0, 0, size.width, size.height), - 3 * math.pi / 2, progress * fullCircle, false, _paint); + canvas.drawArc( + Rect.fromLTRB(0, 0, size.width, size.height), + 3 * math.pi / 2, + progress * fullCircle, + false, + _paint, + ); } @override From d4678207f10af06a2202ce81ecd7cd9ae48c5c47 Mon Sep 17 00:00:00 2001 From: Osman Date: Wed, 6 Mar 2024 14:19:18 +0000 Subject: [PATCH 4/5] Resolve issues --- .../pages/components/progress_widgetbook.dart | 12 +- lib/src/components/buttons/button_group.dart | 266 ++++++++++++++++++ .../components/progress/progress_circle.dart | 36 ++- 3 files changed, 291 insertions(+), 23 deletions(-) create mode 100644 lib/src/components/buttons/button_group.dart diff --git a/example/widgetbook/pages/components/progress_widgetbook.dart b/example/widgetbook/pages/components/progress_widgetbook.dart index 2a9166ac..3dfcbb83 100644 --- a/example/widgetbook/pages/components/progress_widgetbook.dart +++ b/example/widgetbook/pages/components/progress_widgetbook.dart @@ -25,12 +25,8 @@ Widget progressBarUseCase(BuildContext context) => WidgetbookTestWidget( ); Widget progressCircleUseCase(BuildContext context) => - WidgetbookTestWidget(widget: LayoutBuilder(builder: (context, constraints) { - return SizedBox( - width: constraints.maxWidth - ZetaSpacing.xl, - height: constraints.maxHeight, - child: Center( - child: ZetaProgressCircle( + WidgetbookTestWidget(widget: + ZetaProgressCircle( progress: context.knobs.double .slider(label: 'Progress', min: 0, max: 1, initialValue: 0.5) .toDouble(), @@ -41,6 +37,4 @@ Widget progressCircleUseCase(BuildContext context) => options: ZetaCircleSizes.values, labelBuilder: (value) => value.name), ), - ), - ); - })); + ); diff --git a/lib/src/components/buttons/button_group.dart b/lib/src/components/buttons/button_group.dart new file mode 100644 index 00000000..232ce60d --- /dev/null +++ b/lib/src/components/buttons/button_group.dart @@ -0,0 +1,266 @@ +import 'package:flutter/foundation.dart'; +import 'package:flutter/material.dart'; + +import '../../../zeta_flutter.dart'; + +/// Zeta Button Group +class ZetaButtonGroup extends StatelessWidget { + /// Constructs [ZetaButtonGroup] from a list of [GroupButton]s + const ZetaButtonGroup( + {super.key, + required this.buttons, + required this.rounded, + required this.isLarge,}); + + /// Determines size of [GroupButton] + final bool isLarge; + + /// Determinses border radius of [GroupButton] + final bool rounded; + + /// [GroupButton]s to be rendered in list + final List buttons; + + @override + Widget build(BuildContext context) { + return Row( + mainAxisAlignment: MainAxisAlignment.center, + children: getButtons(), + ); + } + + /// Returns [GroupButton]s with there appropriate styling. + List getButtons() { + for (final element in buttons) { + element + .._isInitial = element._isFinal = false + .._isLarge = isLarge + .._rounded = rounded; + } + + buttons.first._isInitial = true; + buttons.last._isFinal = true; + + return buttons; + } + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties + ..add(DiagnosticsProperty('isLarge', isLarge)) + ..add(DiagnosticsProperty('rounded', rounded)) + ; + } +} + +/// Group Button item +// ignore: must_be_immutable +class GroupButton extends StatefulWidget { + /// Constructs [GroupButton] + GroupButton({ + super.key, + this.label, + this.icon, + this.onPress, + }); + + /// Constructs dropdown group button + GroupButton.dropdown({ + super.key, + required this.onPress, + this.icon, + this.label, + }); + + ///Constructs group button with icon + GroupButton.icon({ + super.key, + required this.icon, + this.onPress, + this.label, + }); + + /// Label for [GroupButton] + final String? label; + + /// Optional icon for [GroupButton] + final IconData? icon; + + /// Function for when [GroupButton] is clicked. + final VoidCallback? onPress; + + ///If [GroupButton] is large + bool _isLarge = false; + + ///If [GroupButton] is rounded + bool _rounded = false; + + /// If [GroupButton] is the first button in its list. + bool _isInitial = false; + + /// If [GroupButton] is the final button in its list. + bool _isFinal = false; + + @override + State createState() => _GroupButtonState(); + + /// Returns copy of [GroupButton] with fields. + GroupButton copyWith({bool? isFinal, bool? isInitial}) { + return GroupButton( + key: key, + label: label, + icon: icon, + onPress: onPress, + // isFinal: isFinal ?? this.isFinal, + // isInitial: isInitial ?? this.isInitial, + ); + } + + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties + ..add(StringProperty('Label', label)) + ..add(DiagnosticsProperty('icon', icon)) + ..add(ObjectFlagProperty.has('onPress', onPress)); + } +} + +class _GroupButtonState extends State { + late bool selected; + late MaterialStatesController controller; + + @override + void initState() { + super.initState(); + selected = false; + controller = MaterialStatesController(); + } + + void onPress() { + widget.onPress!(); + setState(() { + selected = !selected; + }); + } + + @override + Widget build(BuildContext context) { + final colors = Zeta.of(context).colors; + + final borderType = + widget._rounded ? ZetaWidgetBorder.rounded : ZetaWidgetBorder.sharp; + + final BorderSide borderSide = + _getBorderSide(controller.value, colors, false); + + return Container( + decoration: BoxDecoration( + border: Border( + top: borderSide, + left: borderSide, + bottom: borderSide, + right: (widget._isFinal) ? borderSide : BorderSide.none, + ), + borderRadius: _getRadius(borderType), + ), + padding: EdgeInsets.zero, + child: FilledButton( + statesController: controller, + onPressed: onPress, + style: getStyle(borderType, colors), + child: SelectionContainer.disabled( + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + if (widget.icon != null) Icon(widget.icon), + Text(widget.label!), + if (widget.onPress != null) + const Icon(ZetaIcons.expand_more_round), + ], + ).paddingAll(_padding), + ), + ), + ); + } + + double get _padding => widget._isLarge ? ZetaSpacing.x4 : ZetaSpacing.x3; + + BorderSide _getBorderSide( + Set states, + ZetaColors colors, + bool finalButton, + ) { + if (states.contains(MaterialState.disabled)) { + return BorderSide(color: colors.cool.shade40); + } + if (states.contains(MaterialState.focused)) { + return BorderSide(color: colors.blue, width: ZetaSpacing.x0_5); + } + return BorderSide( + color: finalButton ? colors.borderDefault : colors.borderSubtle, + ); + } + + BorderRadius _getRadius(ZetaWidgetBorder borderType) { + if (widget._isInitial) { + return borderType.radius.copyWith( + topRight: Radius.zero, + bottomRight: Radius.zero, + ); + } + if (widget._isFinal) { + return borderType.radius.copyWith( + topLeft: Radius.zero, + bottomLeft: Radius.zero, + ); + } + return ZetaRadius.none; + } + + ButtonStyle getStyle(ZetaWidgetBorder borderType, ZetaColors colors) { + final ZetaColorSwatch color = + selected ? colors.cool : ZetaColorSwatch.fromColor(colors.black); + + return ButtonStyle( + shape: MaterialStateProperty.all( + RoundedRectangleBorder( + borderRadius: borderType.radius, + ), + ), + backgroundColor: MaterialStateProperty.resolveWith((states) { + if (selected) return colors.black; + + if (states.contains(MaterialState.disabled)) { + return colors.surfaceDisabled; + } + if (states.contains(MaterialState.pressed)) { + return colors.primary.shade10; + } + if (states.contains(MaterialState.hovered)) { + return colors.cool.shade20; + } + return colors.white; + }), + foregroundColor: MaterialStateProperty.resolveWith((states) { + if (states.contains(MaterialState.disabled)) { + return colors.textDisabled; + } + if (selected) return color.onColor; + return colors.textDefault; + }), + elevation: const MaterialStatePropertyAll(0), + padding: MaterialStateProperty.all(EdgeInsets.zero), + ); + } + + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties + ..add(DiagnosticsProperty('selected', selected)) + ..add( + DiagnosticsProperty('controller', controller), + ); + } +} diff --git a/lib/src/components/progress/progress_circle.dart b/lib/src/components/progress/progress_circle.dart index 28b546c1..9934a477 100644 --- a/lib/src/components/progress/progress_circle.dart +++ b/lib/src/components/progress/progress_circle.dart @@ -36,7 +36,7 @@ class ZetaProgressCircle extends ZetaProgress { ///Size of [ZetaProgressCircle] final ZetaCircleSizes size; - /// Border Type for [ZetaWidgetBorder] + ///{@macro zeta-component-rounded} final bool rounded; @override @@ -56,17 +56,21 @@ class ZetaProgressCircle extends ZetaProgress { class ZetaProgressCircleState extends ZetaProgressState { @override Widget build(BuildContext context) { - return AnimatedBuilder( - animation: controller, - builder: (context, child) { - return CustomPaint( - size: _getSize(), - painter: CirclePainter( - progress: animation.value, - rounded: widget.rounded, - ), - ); - }, + return ConstrainedBox( + constraints: BoxConstraints.tight(_getSize()), + child: AnimatedBuilder( + animation: controller, + builder: (context, child) { + return CustomPaint( + size: _getSize(), + painter: CirclePainter( + progress: animation.value, + rounded: widget.rounded, + colors: Zeta.of(context).colors + ), + ); + }, + ), ); } @@ -98,7 +102,7 @@ class ZetaProgressCircleState extends ZetaProgressState { ///Class definition for [CirclePainter] class CirclePainter extends CustomPainter { ///Constructor for [CirclePainter] - CirclePainter({this.progress = 0, this.rounded = true}); + CirclePainter({this.progress = 0, this.rounded = true,required this.colors}); ///Percentage of progress in decimal value, defaults to 0 final double progress; @@ -106,14 +110,18 @@ class CirclePainter extends CustomPainter { ///Is circle rounded, defaults to true final bool rounded; + /// ZetaColors + final ZetaColors colors; + final _paint = Paint() - ..color = Colors.blue ..strokeWidth = 4 ..style = PaintingStyle.stroke; @override void paint(Canvas canvas, Size size) { if (rounded) _paint.strokeCap = StrokeCap.round; + _paint.color = colors.primary; + const double fullCircle = 2 * math.pi; From 00e02cc47306e3c24cf097e2cd68d2cd7611a073 Mon Sep 17 00:00:00 2001 From: Osman Date: Wed, 6 Mar 2024 14:22:13 +0000 Subject: [PATCH 5/5] lint --- lib/src/components/progress/progress_circle.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/components/progress/progress_circle.dart b/lib/src/components/progress/progress_circle.dart index 9934a477..0156ffcc 100644 --- a/lib/src/components/progress/progress_circle.dart +++ b/lib/src/components/progress/progress_circle.dart @@ -66,7 +66,7 @@ class ZetaProgressCircleState extends ZetaProgressState { painter: CirclePainter( progress: animation.value, rounded: widget.rounded, - colors: Zeta.of(context).colors + colors: Zeta.of(context).colors, ), ); },