Step progress
A step indicator shows progress through a short, predictable sequence. Use step names that describe what the reader does at each stage.
Review an order
#Start at Cart, continue to Address and Review, then start again. The current step and its name change together.
components/step-progress/appliance/review_order.dart
import 'package:flutter/widgets.dart';
import 'package:appliance_ui/appliance_ui.dart';
class ReviewOrder extends StatefulWidget {
const ReviewOrder({super.key});
@override
State<ReviewOrder> createState() => _ReviewOrderState();
}
class _ReviewOrderState extends State<ReviewOrder> {
int step = 0;
static const steps = ['Cart', 'Address', 'Review'];
@override
Widget build(BuildContext context) => ConstrainedBox(
constraints: const BoxConstraints(maxWidth: 520),
child: SingleChildScrollView(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
ApplianceStepProgress(steps: steps, current: step),
const SizedBox(height: 12),
Text('Step ${step + 1}: ${steps[step]}'),
const SizedBox(height: 12),
ApplianceButton(
step == steps.length - 1 ? 'Start again' : 'Continue',
onPressed: () => setState(() => step = (step + 1) % steps.length),
),
],
),
),
);
}
Parameters
ApplianceStepProgress API ↗steps- Step labels in the order they are completed.
current- Zero-based index of the current step.
Shared behaviour
- Keyboard and focus. Tab to Continue and activate it to advance. At Review the same action becomes Start again.
- Screen readers. Read the indicator and the current step’s name. The action below it identifies what happens next.
- Direction and type. In RTL, inspect the sequence from the reading start. At 200% text compare the step labels with the current-step readout.