Skip to main content

Stepper 1

Image

import 'package:flutter/material.dart';
int currentIndex = 0;
final list = [
{
'title': 'Dart',
'description': 'Learn what is Dart programming and the syntax',
},
{
'title': 'OOP',
'description': 'Learn concept of object oriented programming',
},
{
'title': 'Functional Programming',
'description':
'Dart also support functional paradigm then combine with oop concept',
},
{
'title': 'Basic UI',
'description': 'Practice slicing UI Design to Flutter Code',
},
{
'title': 'State Management',
'description':
'Implement state changes with reactive programming then use design pattern',
},
{
'title': 'Rest API Integration',
'description':
'Implement http as core to access network to fetch and request manya of data',
},
{
'title': 'Deploy',
'description': 'Learn how to upload app to Play Store & App Store',
},
];
Stepper(
currentStep: currentIndex,
connectorThickness: 1.5,
connectorColor: const WidgetStatePropertyAll(Colors.deepPurple),
stepIconWidth: 24,
stepIconHeight: 24,
onStepTapped: (value) {
currentIndex = value;
setState(() {});
},
onStepContinue: () {
if (currentIndex == list.length - 1) return;
currentIndex += 1;
setState(() {});
},
onStepCancel: () {
if (currentIndex == 0) return;
currentIndex -= 1;
setState(() {});
},
steps: List.generate(list.length, (index) {
final item = list[index];
return Step(
title: Text(item['title']!),
content: Text(item['description']!),
);
}),
),