Cupertino modal bottom sheet fit with inside navigation

2.8k Views Asked by At

Is it possible to have two modal bottom sheets with inside navigation but different height? For instance, the first bottom sheet has 3 elements and sized to its child (Column with 3 List Tiles) and the second bottom sheet is the same but has 5 elements (Column with 5 List Tiles)? Like on the image with navigation between them.

I have a feeling that when I add a Navigator it expands, takes all the available space and I can't size it to its content. A container with constraints helps, but then again both bottom sheets have the same height.

enter image description here

1

There are 1 best solutions below

1
On BEST ANSWER

When you mention two bottom sheets, I would assume you want to say a single bottom sheet with inside navigation, no?

It is not possible to achieve by using a Navigator. This widget is designed to always expand to the maximum available.

You could try to use another approach, like using a Stack widget or a AnimatedCrossFade one