Repository navigation
Some of our controls can't handle being built in 0x0 environments #6537
Description
Activity
- addedframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.p: material_uimaterial_ui package in flutter/packagesmaterial_ui package in flutter/packages
on Oct 26, 2016 See also #5259 which triggers this in release and debug --no-hot mode.
- modified the milestones: 2: Make Early Adopters happy, This milestone has been deleted
on Nov 14, 2016 - modified the milestones: This milestone has been deleted, 2: Make Early Adopters happy
on Feb 27, 2017 - added a commit that references this issue
on Oct 15, 2018 310 remaining items
Load more actionsThis issue is assigned to @ahmedsameha1 but has had no recent status updates. Please consider unassigning this issue if it is not going to be addressed in the near future. This allows people to have a clearer picture of what work is actually planned. Thanks!
This issue is assigned to @ahmedsameha1 but has had no recent status updates. Please consider unassigning this issue if it is not going to be addressed in the near future. This allows people to have a clearer picture of what work is actually planned. Thanks!
I am actively working on the issue, as you can see from the linked PRs.
This issue was assigned to @ahmedsameha1 but has had no status updates in a long time. To remove any ambiguity about whether the issue is being worked on, the assignee was removed.
Reacted by Ahmed Mohamed SamehThis issue was assigned to @ahmedsameha1 but has had no status updates in a long time. To remove any ambiguity about whether the issue is being worked on, the assignee was removed.
I am actively working on this issue.
@victorsanni @dkwingsmtThere sure has been tons of status updates, which can be seen from the related PRs. :)
Reacted by Ahmed Mohamed SamehThis issue was assigned to @ahmedsameha1 but has had no status updates in a long time. To remove any ambiguity about whether the issue is being worked on, the assignee was removed.
Hi @loic-sharma, would you reassign this issue to me?
Done!
Done!
Thank you.
These are widgets that I think need to be handled in this issue. I will work on them one by one as I can, and if I fail, I will report my attempt here.
Magnifier
SliverReorderableList
SnackBar
TextSelectionToolbar
CupertinoAdaptiveTextSelectionToolbar
CupertinoDatePicker
CupertinoActionSheet
CupertinoTextMagnifier
CupertinoSliverNavigationBar
CupertinoNavigationBarBackButton
CupertinoSlidingSegmentedControl
CupertinoSliverRefreshControl
CupertinoPageTransition
CupertinoFullscreenDialogTransition
CupertinoSheetTransition
CupertinoTheme
RenderObjectToWidgetAdapter
DecoratedSliver
PinnedHeaderSliver
PreferredSize
SliverAnimatedOpacity
SliverAnimatedList
SliverAnimatedGrid
ViewAnchor
ViewCollection
RawView: Failed assertion
SliverReorderableList
SliverSafeArea
RawScrollbar
SliverFillViewport
SliverFillRemaining
SliverVisibility
SliverFadeTransition
SystemContextMenu
SliverToBoxAdapter
SliverPadding
SliverSemantics
ListBody
I think that there are no widgets other than the above list and these widgets that are not handled for this issue.
Please notice that I have a pending work that contains 8 widgets, and I am waiting to complete the suggested 10 widgets.
@dkwingsmt @victorsanniThis is my attempt to handle this issue for SnackBar:
testWidgets('SnackBar does not crash at zero area', (WidgetTester tester) async { tester.view.physicalSize = Size.zero; addTearDown(tester.view.reset); await tester.pumpWidget( MaterialApp( home: Center( child: Scaffold(body: Builder( builder: (context) { Timer.run( () => [ScaffoldMessenger.of](http://scaffoldmessenger.of/)(context).showSnackBar(const SnackBar(content: Text('X'))), ); return const Placeholder(); }, ), ), ), ), ); await tester.pumpAndSettle(); expect(tester.getSize(find.byType(SnackBar)), Size.zero); });
The test fails with:
The _ScaffoldLayout custom multichild layout delegate tried to lay out the child with id "_ScaffoldSlot.snackBar" more than once. Each child must be laid out exactly once.
I need further guidance.
This is my attempt to handle this issue for SnackBar:testWidgets('SnackBar does not crash at zero area', (WidgetTester tester) async { tester.view.physicalSize = Size.zero; addTearDown(tester.view.reset); await tester.pumpWidget( MaterialApp( home: Center( child: Scaffold(body: Builder( builder: (context) { Timer.run( () => [ScaffoldMessenger.of](http://scaffoldmessenger.of/)(context).showSnackBar(const SnackBar(content: Text('X'))), ); return const Placeholder(); }, ), ), ), ), ); await tester.pumpAndSettle(); expect(tester.getSize(find.byType(SnackBar)), Size.zero); });
The test fails with:
The _ScaffoldLayout custom multichild layout delegate tried to lay out the child with id "_ScaffoldSlot.snackBar" more than once. Each child must be laid out exactly once.
I need further guidance.This issue is assigned to @ahmedsameha1 but has had no recent status updates. Please consider unassigning this issue if it is not going to be addressed in the near future. This allows people to have a clearer picture of what work is actually planned. Thanks!
This issue is assigned to @ahmedsameha1 but has had no recent status updates. Please consider unassigning this issue if it is not going to be addressed in the near future. This allows people to have a clearer picture of what work is actually planned. Thanks!
@ahmedsameha1 any idea where our progress is on getting this fixed for all of our relevant widgets?
@justinmc Please check #6537 (comment)
The 8 widgets that I did not push in a PR are: Viewport, ColoredBox, StatefulBuilder, Builder, RawImage, RichText, Flow, Wrap.
Clearly I have not work on this issue for a while and I think I will need some help if I will complete the remaining widgets.Got it, thanks! I'll go ahead and unassign you.
We should create tests that put each UI control into a 0x0 container and make sure they don't crash.
See #6535.