Flutter:“步骤”小部件无法容纳“展开”

时间:2018-08-06 07:07:48

标签: dart widget flutter

Widget stepPickerData(BuildContext context, SwapRequest snapData) {
final makeSwapRequestBloc = MakeSwapRequestProvider.of(ctx);
Widget child1 = Container(
child: Column(
   children: <Widget>[
     Expanded(
       child:  ListTile(title: Text("w"),)
      )
    ],
  ),
);
List<Step> mySteps = [
  new Step(
    // Title of the Step
      title: Text("Step 1"),
      content: child1,
      isActive: true),
  new Step(
      title: new Text("Step 2"),
      content: child2,
      isActive: true),
];
return new Container(
  child: new Stepper(
    currentStep: this.currentStep,
    steps: mySteps,
    type: StepperType.horizontal,
    onStepContinue: () {
       if (currentStep < mySteps.length - 1) {
        currentStep = currentStep + 1;
      } else {
        currentStep = currentStep;
      }
    },
  ),
 );
}

我有带有步骤的步进器小部件,并且步骤小部件包含扩展子级。扩展子级不包含在步骤小部件中。

抛出的错误是:

  

RenderFlex子级具有非零的flex,但是传入的高度限制   是无界的。

0 个答案:

没有答案