So at the core of what I'm saying is that I thought that Scaffold was creating the PSC, but you are saying that is not true. Having multiple parallel Scaffold like this helps to keep everything isolated and tidy, except for this scroll to top issue. The problem is that we then get very bad behavior with multiple list views attached to the same PSC, either with outright errors or all the list views on all tabs simultaneously scrolling up when the top bar is tapped. Now yes the easiest answer is: hey then don't use a top level scaffold, use the Stack! But it presents a whole lot of other problems with the bottom navigation bar overlapping content, especially the floating action button and things like snack bars getting misplacedĪnother thing someone might say is, hey why not just remove the Scaffold from each subpage, OR pass the top level PSC down to each of those tabs. Pages.map((page) => page ? SizedBox.shrink()).toList(),Īlign(alignment:Alignment.bottomCenter,child:widget.bottomNavigationBar()), So let me take a step back, this is quoted from what you wrote in that thread: It's rare to construct a Scrollable directly. Here I was hoping for something a little different and more simple, but I may be misunderstanding. Scrollable implements the interaction model for a scrollable widget, including gesture recognition, but does not have an opinion about how the viewport, which actually displays the children, is constructed. The problem does at its core revolve around #85603 but over there, most of the solutions seem to have dead-ended on requesting a change to the core relationship between Scaffold and PSC. Thanks!Īh ok, yes I'm likely misunderstanding the relationship between Scaffold and PSC. Letâs discuss 5 important ways to make a screen scrollable. So you need to make the screen scrollable which scrolls the screen depending on the contents length. More information will help us resolve this issue. If your content on a screen is excess the size of the flutter app screen then you will get an error like â BOTTOM OVERFLOWED BY 240 PIXELS â. Can you please provide a minimal sample of code that demonstrates your issue? It sounds like you have a nested Navigator like #85603.Ī default PrimaryScrollController is provided in every route - so that may be where you are experiencing your issue, not in the Scaffold. I am not entirely sure what this issue is requesting, the referenced issues are all slightly different. It only looks up the closest enclosing PSC to animate the scroll view. The Scaffold does not add a PrimaryScrollController to the tree. I may not be understanding your request, so can you share what you mean? How would you handle it yourself? What would you expect the API to look like that allows you to manage it?Ī nested Scaffold will have its own PrimaryScrollController I am not sure that this will resolve your issue, the Scaffold is not attached to a PrimaryScrollController. Here the idea is a bool flag to have Scaffold simply not attach a primaryscrollcontroller and let us deal with things on our own. The question is, can we simply have an optional flag to choose if we want the PrimaryScrollController to be attached to a Scaffold when we create it? That way we could very easily and in a straightforward way avoid this problem? There have so far been a few Issues made about this problem: So far the only solution is to switch to a CupertinoPageScaffold, however it presents some problems with maintaining fluid cross platform support when the app is run on Android When the status bar is tapped, the very top most Scaffold used to build the framework and navigation bar soaks up the tap, and it doesn't work on the actual content page a user is looking at Within the app content, there may be a series of sub-pages that each contain a Scaffold. Usually there is a topmost Scaffold that contains the app content and the bottomnavigationbar. Text( of us are still having ongoing problems with losing scroll to top functionality in iOS as part of a nested Scaffold structure when it is part of a bottom navigation bar. make scaffold scrollable flutter Code Example Novem8:34 AM / Dart make scaffold scrollable flutter Cledoux return new Container ( child: new SingleChildScrollView ( child: new Column ( children: showChild1 (), showChild2 ().Padding: const EdgeInsets.only(top: 1.0, left: 10), This is my Code for Body of Scaffold of the Screen Container(
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |