Skip to content

Display Flutter errors (or similar) when the layout is broken #1575

@Hamza5

Description

@Hamza5

Please Describe The Problem To Be Solved

In Flutter, if we make a problematic layout where a child widget tries to take the maximum height/width of a parent widget that does not have a maximum height/width, a viewport was given an unbounded height/width error will be printed in the console.

unbounded error

More information about this problem can be found in this video on the Flutter YouTube channel:

flutter_video

Also, if a widget is trying to get more space than what is available (overflow), we get a visual indicator on how many pixels are not displayed:

overflow error

Unfortunately, we don't have this important feedback in Flet. All we get is a layout that has something unexpected (no scrolling or incomplete control). Beginners often struggle a lot to learn Flet because of these problems (especially the first). In fact, if you check the Discord server, almost every new one is facing these problems and does not know how to solve them or even how to properly describe them because no error is shown. It would be very useful to have feedback similar to what we get in Flutter.

(Optional): Suggest A Solution

Show similar errors to what Flutter shows for its users.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementImprovement/Optimizationfeature requestSuggestion/Request for additional feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions