我用几个步骤实现了一个非常简单的水平步进器。但是我得到了溢出横幅,指出我的步骤不适合该视图。
如何使步骤滚动条变为可滚动状态?
import 'package:flutter/material.dart';
class SetupPage extends StatefulWidget {
@override
_SetupPageState createState() => _SetupPageState();
}
class _SetupPageState extends State<SetupPage> {
List<Step> steps = [
new Step(title: Text('Step 1'), content: new Container()),
new Step(title: Text('Step 2'), content: new Container()),
new Step(title: Text('Step 3'), content: new Container()),
new Step(title: Text('Step 4'), content: new Container()),
new Step(title: Text('Step 5'), content: new Container()),
new Step(title: Text('Step 6'), content: new Container()),
new Step(title: Text('Step 7'), content: new Container()),
];
@override
Widget build(BuildContext context) {
return new Scaffold(
appBar: AppBar(title: Text('Setup'),),
body: new Stepper(steps: steps, type: StepperType.horizontal, currentStep: 0,),
);
}
}