-
Notifications
You must be signed in to change notification settings - Fork 189
/
stepper_page.dart
68 lines (62 loc) · 1.91 KB
/
stepper_page.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
import 'package:flutter/material.dart';
import 'custom_stepper.dart';
import 'custom_stepper2.dart';
class StepperPage extends StatefulWidget {
@override
_StepperPageState createState() => _StepperPageState();
}
class _StepperPageState extends State<StepperPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('StepperPage'),
),
body: _buildCustomStepper2());
}
Widget _buildCustomStepper(){
return CustomStepper(
currentStep: 2,
type: CustomStepperType.horizontal,
steps: ['提交任务', '本金返款', '评价返佣金', '追评返佣金', '任务完结']
.map(
(s) => CustomStep(title: Text(s), content: Container(), isActive: true),
)
.toList(),
controlsBuilder: (BuildContext context,
{VoidCallback onStepContinue, VoidCallback onStepCancel}) {
return Container();
},
);
}
Widget _buildCustomStepper2(){
return CustomStepper2(
currentStep: 2,
type: CustomStepperType2.horizontal,
steps: ['提交任务', '本金返款', '评价返佣金', '追评返佣金', '任务完结']
.map(
(s) => CustomStep2(title: Text(s), content: Container(), isActive: true),
)
.toList(),
controlsBuilder: (BuildContext context,
{VoidCallback onStepContinue, VoidCallback onStepCancel}) {
return Container();
},
);
}
Widget _buildStepper(){
return Stepper(
currentStep: 2,
type: StepperType.horizontal,
steps: ['提交任务', '本金返款', '任务完结']
.map(
(s) => Step(title: Text(s), content: Container(), isActive: true),
)
.toList(),
controlsBuilder: (BuildContext context,
{VoidCallback onStepContinue, VoidCallback onStepCancel}) {
return Container();
},
);
}
}