minor fixes

This commit is contained in:
2026-06-01 14:54:10 +02:00
parent 59c96d889a
commit 7b5b962fe6

View File

@@ -93,15 +93,16 @@ class _StepLoadingWidgetState extends State<StepLoadingWidget>
const SizedBox(height: 60), const SizedBox(height: 60),
// Animated loader // Animated loader
if (widget.status != 'FAILED' && if (widget.status != 'FAILED' && widget.status != 'SUCCESS')
widget.status != 'SUCCESS')
AnimatedBuilder( AnimatedBuilder(
animation: Listenable.merge( animation: Listenable.merge([
[_pulseController, _spinController]), _pulseController,
_spinController,
]),
builder: (context, child) { builder: (context, child) {
return SizedBox( return SizedBox(
width: 120, width: 80,
height: 120, height: 80,
child: CustomPaint( child: CustomPaint(
painter: _LoadingPainter( painter: _LoadingPainter(
pulseValue: _pulseAnimation.value, pulseValue: _pulseAnimation.value,
@@ -113,11 +114,9 @@ class _StepLoadingWidgetState extends State<StepLoadingWidget>
}, },
), ),
if (widget.status == 'SUCCESS') if (widget.status == 'SUCCESS') _buildCheckIcon(primaryColor),
_buildCheckIcon(primaryColor),
if (widget.status == 'FAILED') if (widget.status == 'FAILED') _buildErrorIcon(theme),
_buildErrorIcon(theme),
const SizedBox(height: 40), const SizedBox(height: 40),
@@ -152,8 +151,7 @@ class _StepLoadingWidgetState extends State<StepLoadingWidget>
Column( Column(
children: [ children: [
Text( Text(
widget.errorMessage ?? widget.errorMessage ?? 'Something went wrong',
'Something went wrong',
style: TextStyle( style: TextStyle(
fontSize: 16, fontSize: 16,
color: theme.colorScheme.error, color: theme.colorScheme.error,
@@ -172,10 +170,7 @@ class _StepLoadingWidgetState extends State<StepLoadingWidget>
horizontal: 32, horizontal: 32,
vertical: 14, vertical: 14,
), ),
side: BorderSide( side: BorderSide(color: primaryColor, width: 1.5),
color: primaryColor,
width: 1.5,
),
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12), borderRadius: BorderRadius.circular(12),
), ),
@@ -195,24 +190,20 @@ class _StepLoadingWidgetState extends State<StepLoadingWidget>
Widget _buildCheckIcon(Color primaryColor) { Widget _buildCheckIcon(Color primaryColor) {
return Container( return Container(
width: 120, width: 80,
height: 120, height: 80,
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.circle, shape: BoxShape.circle,
color: primaryColor.withValues(alpha: 0.1), color: primaryColor.withValues(alpha: 0.1),
), ),
child: Icon( child: Icon(Icons.check_circle_rounded, size: 80, color: primaryColor),
Icons.check_circle_rounded,
size: 80,
color: primaryColor,
),
); );
} }
Widget _buildErrorIcon(ThemeData theme) { Widget _buildErrorIcon(ThemeData theme) {
return Container( return Container(
width: 120, width: 80,
height: 120, height: 80,
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.circle, shape: BoxShape.circle,
color: theme.colorScheme.error.withValues(alpha: 0.1), color: theme.colorScheme.error.withValues(alpha: 0.1),
@@ -264,9 +255,7 @@ class _StepIndicator extends StatelessWidget {
height: 2, height: 2,
margin: const EdgeInsets.symmetric(horizontal: 8), margin: const EdgeInsets.symmetric(horizontal: 8),
decoration: BoxDecoration( decoration: BoxDecoration(
color: currentStep >= 2 color: currentStep >= 2 ? primaryColor : Colors.grey.shade300,
? primaryColor
: Colors.grey.shade300,
borderRadius: BorderRadius.circular(1), borderRadius: BorderRadius.circular(1),
), ),
), ),
@@ -323,10 +312,7 @@ class _StepIndicator extends StatelessWidget {
Container( Container(
width: 32, width: 32,
height: 32, height: 32,
decoration: BoxDecoration( decoration: BoxDecoration(shape: BoxShape.circle, color: circleColor),
shape: BoxShape.circle,
color: circleColor,
),
child: Center(child: circleChild), child: Center(child: circleChild),
), ),
const SizedBox(height: 6), const SizedBox(height: 6),
@@ -335,9 +321,7 @@ class _StepIndicator extends StatelessWidget {
style: TextStyle( style: TextStyle(
fontSize: 12, fontSize: 12,
fontWeight: isActive ? FontWeight.w600 : FontWeight.normal, fontWeight: isActive ? FontWeight.w600 : FontWeight.normal,
color: isActive color: isActive ? theme.colorScheme.tertiary : Colors.grey.shade500,
? theme.colorScheme.tertiary
: Colors.grey.shade500,
), ),
), ),
], ],
@@ -404,4 +388,4 @@ class _LoadingPainter extends CustomPainter {
return oldDelegate.pulseValue != pulseValue || return oldDelegate.pulseValue != pulseValue ||
oldDelegate.spinValue != spinValue; oldDelegate.spinValue != spinValue;
} }
} }