Width is always calculated by the size of screen, not by parent widgets

Widgets & Design

I am trying to do a very basic task, create a container of 50% width within a 90% width parent.
The 50% width containers size is 50% of the screen size and not of its parent.

When viewing the code I see that my 50% is created like so:

width: MediaQuery.sizeOf(context).width * 0.5

I am running the latest version of FlutterFlow on a Mac.

Can others create this and inform me of their result.

What have you tried so far?
  1. Create a container 100px high and 90% wide directly off of the a new blank page. Align it to middle/middle - the center of the screen

  2. Within the container, create a Row with no customization

  3. Within the Row create a Stack that is Expanded

  4. Create a container (within the Stack) with a width of 50% and with a Fill color of Blue

  5. Create another container (within the Stack) with a width of 100%, with no Fill color, but with a border of 4px and a color of Green

    Clearly the 50% width container is greater than 50%

    I have tried many variations of creating this with the same result.

Did you check FlutterFlow's Documentation for this topic?
No
3
4 replies