You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Size.isEmpty description should be "Whether this size encloses a zero area." #172004
/// Whether this size encloses a non-zero area. /// /// Negative areas are considered empty.boolget isEmpty => width <=0.0|| height <=0.0;
When width is <= 0.0, then the result is true. But a size that has a width that is equal to or less than zero is not a "non-zero" area; I think it is a "zero area".
When height is <= 0.0, then the result is true. But a size that has a height that is equal to or less than zero is not a "non-zero" area; I think it is a "zero area".
/// An empty size, one with a zero width and a zero height.staticconstSize zero =Size(0.0, 0.0);
print(zero.isEmpty) // true
So, I think that the correct description should be: "Whether this size encloses a zero area.".
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
tirth-patel-nc commentedon Jul 11, 2025
hi @ahmedsameha1, thanks for the report. labelling it as a docs proposal. you're welcome to submit a PR if you'd like.
ahmedsameha1 commentedon Jul 11, 2025
Ok, I will create a PR to fix this.
Fix Size.isEmpty description (#172021)
Fix Size.isEmpty description (flutter#172021)
github-actions commentedon Jul 31, 2025
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.Fix Size.isEmpty description (flutter#172021)
Fix Size.isEmpty description (flutter#172021)
Fix Size.isEmpty description (flutter#172021)