Fix Sliver crash in Demo Website (Resolves #2329) #2461
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix Sliver crash in Demo Website. Resolves #2329
The original ticket mentions a different issue, which I could not reproduce. With the latest main, the editor is crashing immediately with the following exception:
The issue is that, when the editor has an ancestor
Scrollable
, it doesn't add it's ownCustomScrollView
to the widget tree. In the demo website, there is an ancestorSingleChildScrollView
, which doesn't work for scrolling the editor anymore, since nowSuperEditor
is a sliver.This PR removes the
SingleChildScrollView
and places aCustomScrollView
directly aboveSuperEditor
.We cannot just remove the
SingleChildScrollView
because the editor will then try to scroll the page's scrollable, which will also cause a crash, because the page's scrollable isn't aCustomScrollView
.Maybe we need a way to signal to the editor that it should ignore the ancestor scrollable.