From 7b5b962fe618d660f8a10357884afd862ff37671 Mon Sep 17 00:00:00 2001 From: Vusumuzi Khoza Date: Mon, 1 Jun 2026 14:54:10 +0200 Subject: [PATCH] minor fixes --- lib/widgets/step_loading_widget.dart | 56 ++++++++++------------------ 1 file changed, 20 insertions(+), 36 deletions(-) diff --git a/lib/widgets/step_loading_widget.dart b/lib/widgets/step_loading_widget.dart index 6755701..076be52 100644 --- a/lib/widgets/step_loading_widget.dart +++ b/lib/widgets/step_loading_widget.dart @@ -93,15 +93,16 @@ class _StepLoadingWidgetState extends State const SizedBox(height: 60), // Animated loader - if (widget.status != 'FAILED' && - widget.status != 'SUCCESS') + if (widget.status != 'FAILED' && widget.status != 'SUCCESS') AnimatedBuilder( - animation: Listenable.merge( - [_pulseController, _spinController]), + animation: Listenable.merge([ + _pulseController, + _spinController, + ]), builder: (context, child) { return SizedBox( - width: 120, - height: 120, + width: 80, + height: 80, child: CustomPaint( painter: _LoadingPainter( pulseValue: _pulseAnimation.value, @@ -113,11 +114,9 @@ class _StepLoadingWidgetState extends State }, ), - if (widget.status == 'SUCCESS') - _buildCheckIcon(primaryColor), + if (widget.status == 'SUCCESS') _buildCheckIcon(primaryColor), - if (widget.status == 'FAILED') - _buildErrorIcon(theme), + if (widget.status == 'FAILED') _buildErrorIcon(theme), const SizedBox(height: 40), @@ -152,8 +151,7 @@ class _StepLoadingWidgetState extends State Column( children: [ Text( - widget.errorMessage ?? - 'Something went wrong', + widget.errorMessage ?? 'Something went wrong', style: TextStyle( fontSize: 16, color: theme.colorScheme.error, @@ -172,10 +170,7 @@ class _StepLoadingWidgetState extends State horizontal: 32, vertical: 14, ), - side: BorderSide( - color: primaryColor, - width: 1.5, - ), + side: BorderSide(color: primaryColor, width: 1.5), shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(12), ), @@ -195,24 +190,20 @@ class _StepLoadingWidgetState extends State Widget _buildCheckIcon(Color primaryColor) { return Container( - width: 120, - height: 120, + width: 80, + height: 80, decoration: BoxDecoration( shape: BoxShape.circle, color: primaryColor.withValues(alpha: 0.1), ), - child: Icon( - Icons.check_circle_rounded, - size: 80, - color: primaryColor, - ), + child: Icon(Icons.check_circle_rounded, size: 80, color: primaryColor), ); } Widget _buildErrorIcon(ThemeData theme) { return Container( - width: 120, - height: 120, + width: 80, + height: 80, decoration: BoxDecoration( shape: BoxShape.circle, color: theme.colorScheme.error.withValues(alpha: 0.1), @@ -264,9 +255,7 @@ class _StepIndicator extends StatelessWidget { height: 2, margin: const EdgeInsets.symmetric(horizontal: 8), decoration: BoxDecoration( - color: currentStep >= 2 - ? primaryColor - : Colors.grey.shade300, + color: currentStep >= 2 ? primaryColor : Colors.grey.shade300, borderRadius: BorderRadius.circular(1), ), ), @@ -323,10 +312,7 @@ class _StepIndicator extends StatelessWidget { Container( width: 32, height: 32, - decoration: BoxDecoration( - shape: BoxShape.circle, - color: circleColor, - ), + decoration: BoxDecoration(shape: BoxShape.circle, color: circleColor), child: Center(child: circleChild), ), const SizedBox(height: 6), @@ -335,9 +321,7 @@ class _StepIndicator extends StatelessWidget { style: TextStyle( fontSize: 12, fontWeight: isActive ? FontWeight.w600 : FontWeight.normal, - color: isActive - ? theme.colorScheme.tertiary - : Colors.grey.shade500, + color: isActive ? theme.colorScheme.tertiary : Colors.grey.shade500, ), ), ], @@ -404,4 +388,4 @@ class _LoadingPainter extends CustomPainter { return oldDelegate.pulseValue != pulseValue || oldDelegate.spinValue != spinValue; } -} \ No newline at end of file +}