How to change long tap text of the drawer (flutter) - flutter

I have a drawer in my
app. When I long tap it, "Open navigator menu" pops up. How can I change this? I already tried changing somethings in drawer.dart etc. but it didn't work.

it depends which action you use.
if you want different tap behaviour you can user GestureDetector

with Default drawer class, use Scaffold.of(context).openDrawer(); to open drawer with text in GestureDetector.

Related

Custom widget dropdown

If I do not click:
When I press the button in the red circle:
Hello, I want to ask. What widget can I use to get a design like this? When the red circle is pressed, another menu will appear and can be pressed to go to another menu. I tried using the dropdown button but it doesn't work as I want. I have also used ListTileTheme and ExpansionTile but it still doesn't work as I want. Anyone can share an opinion.
Flutter's core dropdown widget works almost exactly like your example, and there is a widget that extends it even further. You should then be able to nest further menus if that's what you need it to do. Flutter DropdownButton2

Please tell me name of this action in flutter (when pressing on item in tabbar)

When I tap on a item on tab bar a circle will appear and disappear, please tell me name of this animation and how could I implement it in a flutter
click for seeing sample
The effect is called a ripple. And you can get it by wrapping a widget in an Inkwell.
See more here about it here: https://docs.flutter.dev/cookbook/gestures/ripples
Hi In Scaffold BottomNavigationBar() has inbuilt properties of circle appear and disappear
You can use a widget called Gesture Detector which also has ripple effect

DropdownButton - don't show popup on tap

I want to show my own page on dropdown button tap, then item selected on page should be set as dropdown button value.
So basically, I need DropdownButton without any popup on tap. When I use onTap still default popup will be shown, how to prevent that?
why you don't use a button instead? or you can try to create an Inkwell put a container on its child and make it look like a button and write your code inside Inkwell OnTap(){}
1- Pass null to items parameter to disable the button.
2- You'll notice icon's color will be grey with disabled button, you can change it by setting color of the icon you send to icon parameter or send color directly to iconDisabledColor parameter.
3- You'll not use value parameter, instead you'll just use hint to show both your hint and your value. and update it using your state management after you pick new value from your own page.
4- Wrap your DropdownButton with GestureDetector or InkWell to show your own page when you tap on the button.
5- If you want to customize your DropdownButton shape, size and more. You can try my new package DropdownButton2. It's simple, easy, based on Flutter's core DropdownButton and have lots of features.

Update BottomNavigationBar when tapping on Button

I'm looking for a way to update the backgroundColor of the BottomNavigationBar when the user taps on a button. The problem here is the BottomNavigationBar aren't in the same file as the button. My application is divided into two files. The first file, main.dart, includes a StatefulWidget with a BottomNavigationBar. The other file, home.dart, has a StatefulWidget too with a button. The question is how to update the BottomNavigationBar when the user tapping on the button? Basically with calling setState() everything is fine, but as I said the BottomNavigationBar is located in an other file. I've absolutely no idea and I'm not sure if this is even possible.
I added no code because I'm not really asking for code snippets but rather food for thought or explanations what I can do.
Make your bottom navigation bar file as Stateless shown in this dart pad example
Example on Github
In this on click of press button color of bottom navigation bar changes
Let me know if it work out or not for you.

Flutter overlay is moving

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.