-
Notifications
You must be signed in to change notification settings - Fork 29.2k
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listcustomer: crowdAffects or could affect many people, though not necessarily a specific customer.Affects or could affect many people, though not necessarily a specific customer.f: scrollingViewports, list views, slivers, etc.Viewports, list views, slivers, etc.frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work on
Description
Hello,
I found a bug where if a StreamBuilder is the first child of a CustomScrollView it will throw these two errors randomly.
flutter: Another exception was thrown: 'package:flutter/src/rendering/viewport.dart': Failed assertion: line 1213 pos 12: 'center.parent == this': is not true.
flutter: Another exception was thrown: NoSuchMethodError: The getter 'visible' was called on null.
It does not matter if the StreamBuilder is returning a sliver or not.
What's worse is it's not consistent. Out of 10 tries it will happen maybe 6 times and in seemingly random order. Possible race condition?
The workaround is to place a SliverToBoxAdapter()
as the first child, then the problem goes away.
meysammahfouzi, jogboms, mcrovero, andrescr94, sarthak1singhal and 12 more
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listcustomer: crowdAffects or could affect many people, though not necessarily a specific customer.Affects or could affect many people, though not necessarily a specific customer.f: scrollingViewports, list views, slivers, etc.Viewports, list views, slivers, etc.frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work on