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
Remove an assertion from CupertinoTabBar widget #42430
"Tabs need at least 2 items to conform to Apple's HIG",
Therefore when single item exists (we have a legitimise use case for that), the widget's assertion will fail resulting whole screen being bloody red in debug.
Proposal
I do not think Cupertino widgets should error when something does not conform to Apple's HIG. Warning message yes, but error? No thanks.
Therefore, I propose to remove the assertion and warn or log down for developer instead.
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
DanielEdrisian commentedon Oct 30, 2020
@xster this seems legit. Should we drop the assert?
xster commentedon Oct 31, 2020
Ya plausibly. Is it possible to have 1 tab item in Xcode?
DanielEdrisian commentedon Oct 31, 2020
Yes it is
xster commentedon Nov 2, 2020
Sure, removing that assert sounds reasonable to me.
thennothinghappened commentedon Aug 6, 2023
Any update on this?
flutter-triage-bot commentedon Feb 12, 2024
This issue is missing a priority label. Please set a priority label when adding the
triaged-designlabel.[cupertino_ui] Remove two items assert to allow CupertinoTabBar to ha…
[cupertino_ui] Remove two items assert to allow CupertinoTabBar to ha…
[cupertino_ui] Remove two items assert to allow CupertinoTabBar to ha…
github-actions commentedon Sep 8, 2026
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.