Flutter : Step widget can not hold Expanded
Clash Royale CLAN TAG#URR8PPP
Flutter : Step widget can not hold Expanded
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;
,
),
);
I have stepper widget with steps and step widget consists Expanded child.The expanded child isnot hold in step widget.
The error throwing is:
RenderFlex children have non-zero flex but incoming height constraints
are unbounded.
Its a simple stepper widget with listview.builder inside it. Step 1: select the date Step 2 : show the selected date. Thats it. Step 2 has a listview buider inside expanded widget.
– Binay thapa
Aug 7 at 2:44
The code you've shared doesn't include the
ListView
builder. RenderFlex
layout issues are to do with a lack of constraints (in this case height) which prevents it from working out how to lay out and size the widgets. It will be important to have the full widget tree in order to provide a complete answer.– Derek Lakin
Aug 7 at 13:01
ListView
RenderFlex
Also, the overall layout that you're trying to achieve is important; what's in the ListView, how many items, etc? What are you trying to achieve by using
Expanded
(which is part of the cause of the error you're seeing)?– Derek Lakin
Aug 7 at 13:49
Expanded
Thnank you derek for the lovely response. Here is the link for my widgets overview pasteboard.co/HyavrFs.png
– Binay thapa
Aug 8 at 4:31
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
What is the layout that you are trying to achieve? Perhaps a diagram would help.
– Derek Lakin
Aug 6 at 15:32