Skip to content

Instantly share code, notes, and snippets.

@vijayinyoutube
Created March 26, 2020 18:22
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vijayinyoutube/cea72036c47cd2cd74df379c7ca42e29 to your computer and use it in GitHub Desktop.
Save vijayinyoutube/cea72036c47cd2cd74df379c7ca42e29 to your computer and use it in GitHub Desktop.
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: MyPage(),
);
}
}
class MyPage extends StatefulWidget {
@override
_MyPageState createState() => _MyPageState();
}
class _MyPageState extends State<MyPage> {
int _index = 0;
@override
Widget build(BuildContext context) {
return Scaffold(
body: Container(
child: Stepper(
steps: [
Step(
title: Text("Task-1"),
content: Text(""),
subtitle: Text("Compled"),
isActive: true,
state: StepState.complete),
Step(
title: Text("Task-2"),
content: Text(""),
subtitle: Text("Compled"),
isActive: true,
state: StepState.complete),
Step(
title: Text("Task-3"),
content: Text(""),
subtitle: Text("Compled"),
isActive: true,
state: StepState.disabled),
Step(
title: Text("Task-4"),
content: Text(""),
subtitle: Text("Compled"),
isActive: true,
state: StepState.editing),
Step(
title: Text("Task-5"),
content: Text(""),
subtitle: Text("Compled"),
isActive: true,
state: StepState.error),
Step(
title: Text("Task-6"),
content: Text(""),
subtitle: Text("Compled"),
isActive: true,
state: StepState.complete),
Step(
title: Text("Task-7"),
content: Text(""),
subtitle: Text("Compled"),
isActive: true,
state: StepState.complete),
],
currentStep: _index,
onStepTapped: (index) {
setState(() {
_index = index;
});
},
controlsBuilder: (BuildContext context,{VoidCallback onStepContinue,VoidCallback onStepCancel})=>Container(),
)));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment