步驟條(Stepper)

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('第三步內容'),
        ),
    ],
)

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章