@@ -41,10 +41,15 @@ class Lesson1TestsState extends State<SummativeTests> {
4141 List <String > subjects = ["english" , "maths" , "evs" , "telegu" , "biology" ];
4242
4343 for (String sub in subjects) {
44+ mySteps.add (
45+ Step (
46+ content: TransitionPage (subject: sub),
47+ isActive: true ,
48+ title: Text (sub.toUpperCase ()),
49+ state: StepState .indexed,
50+ ),
51+ );
4452
45- mySteps.add (Step (
46- title: Text ('' ),
47- content: TransitionPage (subject: sub),isActive: true ));
4853 if (sub == "maths" ) {
4954 mySteps.add (Step (
5055 title: Text ('' ),
@@ -169,11 +174,8 @@ class Lesson1TestsState extends State<SummativeTests> {
169174 }
170175 }
171176
172- mySteps.add (Step (
173- title: Text ('' ),
174- content: WellDonePage (),
175- isActive: true ,
176- state: StepState .indexed));
177+ mySteps.add (
178+ Step (title: Text ('' ), content: WellDonePage (), isActive: true , state: StepState .indexed));
177179 }
178180
179181 LessonData lessonData;
@@ -245,8 +247,11 @@ class Lesson1TestsState extends State<SummativeTests> {
245247 child: Padding (
246248 padding: EdgeInsets .fromLTRB (0 , 0 , 20 , 0 ),
247249 child: FloatingActionButton .extended (
248- backgroundColor: Colors .white,
249- splashColor: Colors .lightBlueAccent,
250+ backgroundColor:
251+ (currentStep == mySteps.length - 1 ) ? Colors .blueAccent : Colors .white,
252+ splashColor: (currentStep == mySteps.length - 1 )
253+ ? Colors .white54
254+ : Colors .lightBlueAccent,
250255 heroTag: 'NextStep' ,
251256 onPressed: () {
252257 if (currentStep < mySteps.length - 1 ) {
@@ -258,19 +263,21 @@ class Lesson1TestsState extends State<SummativeTests> {
258263 }
259264 },
260265 label: Text (
261- "Next" ,
266+ (currentStep == mySteps.length - 1 ) ? "Finish" : "Next" ,
262267 style: TextStyle (
263- color: Colors .blue,
268+ color: (currentStep == mySteps.length - 1 ) ? Colors .white : Colors .blue,
264269 fontSize: 16 ,
265270 fontWeight: FontWeight .bold),
266271 ),
267272 shape: RoundedRectangleBorder (
268273 side: BorderSide (color: Colors .blue, width: 1 ),
269274 borderRadius: BorderRadius .circular (40 )),
270- icon: Icon (
271- Icons .navigate_next,
272- color: Colors .blue,
273- ),
275+ icon: (currentStep == mySteps.length - 1 )
276+ ? null
277+ : Icon (
278+ Icons .navigate_next,
279+ color: Colors .blue,
280+ ),
274281 ),
275282 ),
276283 ),
@@ -291,8 +298,7 @@ class Lesson1TestsState extends State<SummativeTests> {
291298 Navigator .pop (context);
292299 }
293300 },
294- shape: CircleBorder (
295- side: BorderSide (color: Colors .blue, width: 1 )),
301+ shape: CircleBorder (side: BorderSide (color: Colors .blue, width: 1 )),
296302 child: Icon (
297303 Icons .arrow_back,
298304 color: Colors .blue,
0 commit comments