@@ -60,6 +60,7 @@ class MultiStepperView extends StatelessWidget {
6060
6161 @override
6262 Widget build (BuildContext context) {
63+ var indicatorTheme = theme.stepIndicatorTheme;
6364 if (! showAllSteps) {
6465 return Row (
6566 crossAxisAlignment: CrossAxisAlignment .start,
@@ -78,7 +79,7 @@ class MultiStepperView extends StatelessWidget {
7879 child: Center (
7980 child: Text (
8081 (currentStep + (zeroIndexed ? 0 : 1 )).toString (),
81- style: theme.stepIndicatorTextStyleActive ??
82+ style: indicatorTheme.activeTextStyle ??
8283 Theme .of (context).textTheme.bodyText2,
8384 ),
8485 ),
@@ -129,57 +130,69 @@ class MultiStepperView extends StatelessWidget {
129130 height: theme.stepIndicatorSize,
130131 decoration: BoxDecoration (
131132 shape: BoxShape .circle,
132- border: Border .all (
133- color: theme
134- .stepIndicatorTextStyleInactive
135- ? .color ??
136- Colors .black,
137- ),
133+ border: currentStep == i
134+ ? indicatorTheme.activeBorder
135+ : currentStep >=
136+ (i + (zeroIndexed ? 0 : 1 ))
137+ ? indicatorTheme.completedBorder
138+ : indicatorTheme
139+ .inactiveBorder ??
140+ Border .all (
141+ color: Theme .of (context)
142+ .primaryColor,
143+ ),
138144 color: currentStep == i
139- ? theme
140- .stepIndicatorTextStyleInactive
141- ? .color
145+ ? indicatorTheme
146+ .activeBackgroundColor
142147 : currentStep >=
143148 (i + (zeroIndexed ? 0 : 1 ))
144- ? theme
145- .stepIndicatorTextStyleInactive
146- ? .color
147- : theme
148- .stepIndicatorTextStyleActive
149- ? .color ,
149+ ? indicatorTheme
150+ .completedBackgroundColor
151+ : indicatorTheme
152+ .inactiveBackgroundColor ??
153+ Theme . of (context)
154+ .primaryColor ,
150155 ),
151156 child: Center (
152157 child: currentStep >=
153- (i + (zeroIndexed ? 0 : 1 ))
158+ _getIndexNumber (
159+ index: i,
160+ zeroIndexed: zeroIndexed,
161+ )
154162 ? Icon (
155163 theme.iconDone,
156164 size: theme.iconSize,
157165 color: currentStep == i
158- ? theme
159- .stepIndicatorTextStyleActive
166+ ? indicatorTheme
167+ .completedTextStyle
160168 ? .color
161169 : currentStep >=
162- (i +
163- (zeroIndexed
164- ? 0
165- : 1 ))
166- ? theme
167- .stepIndicatorTextStyleActive
170+ _getIndexNumber (
171+ index: i,
172+ zeroIndexed:
173+ zeroIndexed,
174+ )
175+ ? indicatorTheme
176+ .completedTextStyle
168177 ? .color
169- : theme.stepIndicatorTextStyleInactive
178+ : indicatorTheme
179+ .inactiveTextStyle
170180 ? .color ??
171181 Theme .of (context)
172182 .textTheme
173183 .bodyText2
174184 ? .color,
175185 )
176186 : Text (
177- (i + (zeroIndexed ? 0 : 1 ))
178- .toString (),
187+ _getIndexNumber (
188+ index: i,
189+ zeroIndexed: zeroIndexed,
190+ ).toString (),
179191 style: currentStep == i
180- ? theme
181- .stepIndicatorTextStyleActive
182- : theme.stepIndicatorTextStyleInactive ??
192+ ? indicatorTheme
193+ .activeTextStyle
194+ : indicatorTheme
195+ .inactiveTextStyle ??
183196 Theme .of (context)
184197 .textTheme
185198 .bodyText2,
@@ -263,4 +276,11 @@ class MultiStepperView extends StatelessWidget {
263276 );
264277 }
265278 }
279+
280+ int _getIndexNumber ({
281+ required int index,
282+ required bool zeroIndexed,
283+ }) {
284+ return index + (zeroIndexed ? 0 : 1 );
285+ }
266286}
0 commit comments