Last active
March 30, 2020 19:12
-
-
Save horgag/8ed4c8308a43078168565fff4e6298fa to your computer and use it in GitHub Desktop.
Revisions
-
horgag renamed this gist
Mar 30, 2020 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
horgag revised this gist
Mar 30, 2020 . No changes.There are no files selected for viewing
-
horgag created this gist
Mar 30, 2020 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,70 @@ import 'package:flutter/material.dart'; void main(){ runApp(MyApp()); } class MyApp extends StatefulWidget { @override _MyAppState createState() => new _MyAppState(); } class _MyAppState extends State<MyApp> { int _currentStep = 0; @override Widget build(BuildContext context) { return new MaterialApp( title: 'App', home: new Scaffold( appBar: new AppBar(title: new Text('App')), body: new Stepper( currentStep: _currentStep, onStepTapped: (int step) => setState(() => _currentStep = step), onStepContinue: _currentStep < 6 ? () => setState(() => _currentStep += 1) : null, onStepCancel: _currentStep > 0 ? () => setState(() => _currentStep -= 1) : null, steps: <Step>[ new Step( title: new Text('Gender'), content: new Text('This is the first step.'), isActive: _currentStep >= 0, state: _currentStep >= 0 ? StepState.complete : StepState.disabled, ), new Step( title: new Text('Year of birth'), content: new Text('This is the second step.'), isActive: _currentStep >= 0, state: _currentStep >= 1 ? StepState.complete : StepState.disabled, ), new Step( title: new Text('Education'), content: new Text('This is the third step.'), isActive: _currentStep >= 0, state: _currentStep >= 2 ? StepState.complete : StepState.disabled, ), new Step( title: new Text('Marital Status'), content: new Text('This is the third step.'), isActive: _currentStep >= 0, state: _currentStep >= 3 ? StepState.complete : StepState.disabled, ), new Step( title: new Text('Living situation'), content: new Text('This is the third step.'), isActive: _currentStep >= 0, state: _currentStep >= 4 ? StepState.complete : StepState.disabled, ), new Step( title: new Text('Employment status'), content: new Text('This is the last step.'), isActive: _currentStep >= 0, state: _currentStep >= 5 ? StepState.complete : StepState.disabled, ), ], ), ), ); } }