Skip to main content

Stepper 2

Image

import 'package:easy_stepper/easy_stepper.dart';
import 'package:flutter/material.dart';
int activeIndex = 0;
final list = [
{
'title': 'Process',
},
{
'title': 'Packing',
},
{
'title': 'Shipping',
},
{
'title': 'Arrived',
},
];
EasyStepper(
activeStep: activeIndex,
internalPadding: 12,
defaultStepBorderType: BorderType.normal,
finishedStepBorderColor: Colors.green,
activeStepBorderColor: Colors.green,
unreachedStepBorderColor: Colors.grey,
finishedStepTextColor: Colors.black87,
activeStepTextColor: Colors.deepPurple,
unreachedStepTextColor: Colors.black45,
finishedStepBackgroundColor: Colors.deepPurple,
activeStepBackgroundColor: Colors.purple.shade600,
unreachedStepBackgroundColor: Colors.black12,
finishedStepIconColor: Colors.white,
activeStepIconColor: Colors.white,
unreachedStepIconColor: Colors.black12,
stepRadius: 15,
showLoadingAnimation: false,
lineStyle: const LineStyle(
unreachedLineColor: Colors.black38,
defaultLineColor: Colors.grey,
activeLineColor: Colors.deepPurple,
),
onStepReached: (index) {
activeIndex = index;
setState(() {});
},
steps: List.generate(list.length, (index) {
final item = list[index];
return EasyStep(
finishIcon: const Icon(Icons.check),
activeIcon: const Icon(Icons.adjust),
icon: const Icon(Icons.circle),
title: item['title'],
topTitle: index.isOdd,
);
}),
),