I would like to have a tab bar that looks like this:
Note the center "My ID" button.
So here is my main problem:
Obviously I need a SafeArea to deal with irregular shaped screens, which itself need to be embedded in a Container so I can give the bar its background color. But, by doing this, how can I create the "oversized" button at the center?
After spending several hours banging my head against the wall, found a not so elegant solution. (Hey, but it works)
Here's a picture of the result.
So the way I made it work is actually by having two layers.
On the base of the widget tree is a Stack which contains everything that is currently seen on this page.
The actual bar widget has the text and icons, (the My ID part has only text no icon, but a placeholder SizedBox is used in place of the icon otherwise would be there)
By using the stack, I am able lay the round icon on top of the entire bar much like a FloatingActionButton
Related
Can anyone suggest to me how can I build a pull-down appbar. I searched the whole net but can't find any idea regarding this. It would be great if anyone could guide or suggest to me to build the appbar.
Edit:-
Many developers are saying to use SliverAppBar. SliverAppBar basically collapses the app bar when we scroll up the listview or any other widget, whereas I want an app bar that pulls down i.e when we tap the app bar and scroll it down only the app bar grows on top of the body. So basically when we navigate to the home screen the app bar should look like the second referred image i.e it must be closed. But we can pull down that appbar to view the hidden contents of the appbar. I am attaching an image for reference.
I Think what you mean what pull down App is an Appbar that expands try.
the silver Appbar
https://youtu.be/mSc7qFzxHDw
0
in my case I have a bunch of questions and each question have a list to choose one of the existing answers displayed in overlay widget.
for my list i used an overlay.
the problem is if there is other overlay, they will hide each other same as stack order its child (the last child widget will be overlapping above the other children of stack) the
the result of my code looks like:
before click the first overlay to animate to the big size
after click the overlay widget
I cant use the entry.remove() cause I want the overlay stay shown but only the size will change to small size after user choose one of the displayed answers. (I'm using animatedContainer for that)
I'm looking for a way to make the selected widget overlay above the other overlay widgets
so any suggestions to solve this? or maybe the way of implementation is wrong ? and thanks
something like this (the selected one will always shown at the top)
https://pub.dev/packages/indexed
I have tried everything. But I can't find a permanent solution How to put the title in the center while my back icon button on the left side. I want to use this secondary app bar on every screen of my app.
Please check the image below for a better understanding.
This is the problem that I am facing
Take a ListView Widget at body of Scaffold and in its children put first widget as a ListTile that comes under AppBar. So that there will be a leading icon and title in center. After that take a Column and add your needed widgets for every page.
As you can see in the below image, the search box is at the top right corner.
Sometimes this image will cover up the text underneath it. Is there a way to move the search box to some other place? For example, like Atom's or Sublime's search box.
NO, there is currently no way to move it.
There was discussion on this amongst the vscode developers: Find Widget UI enhancement.
We should definitely not make this move both vertically and
horizontally since we do not do this anywhere else in our UX.
Introducing such a new concept does not align well with our general
workbench UX which is not very flexible
Looking at the pictures the docked find widget at the top / bottom
feel too heavy for me.
The current find widget solution I like because it is similar to the
chrome experience which every user on the planet is familiar with
While implementing the docking solution, we found we can actually
split this two issues completely. For the issue of covering search
result, we can allow users to scroll beyond the first line by the
height of Find Widget. It doesn't change Find Widget at all, you can
only scroll beyond first line only when the Find Widget is visible so
it won't cover anything.
I made two changes to the Find Widget for this work item.
You can resize the Find widget horizontally
You can scroll beyond the first line when the find widget is visible.
Which gives us the only customizations we can do to the search/find widget if it (as you said) "covers up text underneath it":
You can adjust the width horizontally
You can set "editor.find.addExtraSpaceOnTop": true to allow "scroll beyond the first line when the Find Widget is visible"
I'm asking how to disable Overlays to move when a Scaffold.of(context).showSnackBar is called like on my video below.
The same thing is happening when the keyboard appear. Sometime the blue floattingButton (+) don't come back to it's original position :-(
Thx in advance.
Problem animation
The FloatingActionButton going up when the Scaffold is displayed is something common to all default implementations.
Give a look to the "Bootom app bar" demo in the Gallery app. Press on the search button and you will see it coming up. Or just add a Scaffold to the app that is built with flutter create command.
This happens because of the way the FAB button is placed on the screen and the effect of displaying the Snackbar by the Scaffold.
The FAB button is displayed at the bottom of the content area of the Scaffold content. When the content area is shrinked to include the BottomAppBar, the FAB goes up with it. It has nothing to do with Overlay.
You have two options:
Either you create your own versiĆ³n of the FAB which is not
controlled by the Scaffold.
Or you hack the Scaffold so the size of the SnackBar is not taken
into account.
For this second option you can try the following:
Go to the file /lib/src/material/scaffold.dart in your flutter installation and look for the line with the code snackBarSize: snackBarSize, inside the _ScaffoldLayout class.
Replace it with snackBarSize: Size(0.0, 0.0),
You will see that the FAB stays in its place.