![]() ![]() 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: ![]() Here I was hoping for something a little different and more simple, but I may be misunderstanding. 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. More information will help us resolve this issue. 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. You could implement it manually, or have the bottom bar hidden when they keyboard is up. 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? right now the scroll view doesn't know about the keyboard in the case where the Scaffold isn't resizing, and the Scaffold doesn't know about the scroll view, so nothing knows to scroll or how much to scroll. 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. Adjust the height of the bottom sheet, make the bottom sheet scrollable. Constructors of Scaffold() widget: Scaffold(,),Įxample of Scaffold widget: import 'package:flutter/material.Many 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. Use the Flutter Draggable Modal Bottom Sheet to display extra information within a custom height sheet in Flutter. ![]() ![]() You can easily build an app using Scaffold and implement basic components with very less code, it can allow you to put all the material components to give look and feel to your app. You can easily implement functional widgets like AppBar, FloatingActionButton, ButtonNavigationBar, Drawer, and many more widgets on the app using the Scaffold widget. It is used to implement the basic functional layout structure of an app. The Scaffold widget is the base of the screen for a single page. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |