Stepper 有以下常用屬性:
currentStep → int - 步驟位置。
onStepCancel → VoidCallback - 點擊 cancel 時觸發。
onStepContinue → VoidCallback - 點擊 continue 時觸發。
onStepTapped → ValueChanged - 狀態改變時觸發。
steps → List - 步驟內容。
type → StepperType - 擺放方向,默認是垂直的,可以設置爲水平的。
Stepper(
currentStep: 0, // <-- 激活的下標
steps: <Step>[
new Step(
title: new Text('第一步'),
content: new Text('第一步內容'),
state: StepState.complete,
isActive: true,
subtitle: new Text('第一步小標題'),
),
new Step(
title: new Text('第二步'),
content: new Text('第二步內容'),
),
new Step(
title: new Text('第三步'),
content: new Text('第三步內容'),
),
],
)