-
Notifications
You must be signed in to change notification settings - Fork 26.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Left aligned title for SlicerAppBar and FlexibleSpace #11951
Comments
cc @HansMuller |
this is brought up a year ago, and I'd still very much like to see this |
Any solution? |
In |
@crushman1 this solution would overlap title and left icon in the appbar. We need to find another solution for the same. I asked question in s.o also . |
@Unfreeze-kk , @balazsgerlei Found the solution on my own and added answer there as well. Check it. |
@crushman1's answer actually fits the request of @balazsgerlei, but a more flexible option is possible with a scroll controller: |
See my answer over https://stackoverflow.com/a/62137478 |
@xJon I tried your anwser, it's nto work like this, not smooth.. |
Unfortunately, this answer does not work for SliverAppBar with kExpandedHeight value of less than around 250. |
@prazeblaze Do u have a better solution on this? my kExpandedHeight actually less than 250, (100) |
Checkout my solution at https://stackoverflow.com/a/64583870/6591585. It only rebuilds what is necessary and will work for smaller expanded heights. |
@percula Do u have gif to post? |
No gif, just copy/paste. I ended up creating a better solution that utilizes the transformations already happening within the FlexibleSpaceBar. Just provide a titlePaddingTween: EdgeInsetsTween(begin: EdgeInsets.only(left: 16.0, bottom: 16), end: EdgeInsets.only(left: 72.0, bottom: 16)) instead of I also added a |
@percula Can u make it a github repo or pub.dev lib for quickly usage? |
To left align your SliverAppBar title, just use property "centerTitle" of SliverAppBar SliverAppBar( |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
Hi!
I'm trying to implement a "Collapsing Toolbar", or the "Flexible space with image" scrolling technique from the Material Design spec, but I don't have a back button or navigation drawer. So I would like the title to be near the left edge, without any left padding/space. When I use the SliverAppBar and FlexibleSpace I can only get it to display the title with a considerable left padding, which when collapsed gives space to a back button or navigation drawer (hamburger) icon. This is not the behaviour I want, I would like to do something similar to the Android Contacts app:
Is this possible (without implementing my new SicerAppBar and FlexibleSpace class from scratch), and if so, how to do it?
The text was updated successfully, but these errors were encountered: