Created
March 26, 2020 18:22
-
-
Save vijayinyoutube/cea72036c47cd2cd74df379c7ca42e29 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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