Step 1 / 5
The one rule
Constraints go down. Sizes go up. Parent sets position. A parent tells each child the minimum and maximum size it may be. The child picks a size within that range and reports it back. The parent then decides where to put it.
Learn the single rule behind every Flutter layout, and fix the errors that come from breaking it.
BoxConstraints(0 ≤ w ≤ 240)Wants 300, gets 240: clamped to max.
Constraints go down. Sizes go up. Parent sets position. A parent tells each child the minimum and maximum size it may be. The child picks a size within that range and reports it back. The parent then decides where to put it.