Am I doing something wrong with this super simple app?
I have CupertinoTabView with two tabs. The first one shows a Page which holds a textfield. Problem is when I tap on the textfield, the keyboard is showing for a fraction of a second and then hides again.
Link to issue on flutter github
Related
I am using Android Studio. I have created my app in flutter. I have a Windows 10 machine.
When I run the app on the Android emulator and click in a TextField widget the soft keyboard comes up. Sometimes it is fine but other times there is a white, blank portion above the keyboard that covers everything above the keyboard. If I hide the keyboard the TextField is there. I can type and enter text into the TextField but I can not see what I am typing.
How do I fix this?
Thanks
There are atleast 2 ways to fix this:
Wrap your parent container of the TextField in a SingleChildScrollView so that it will allow to scroll when the keboard comes up.
Use the package flutter_keyboard_visibility. From the package listen to the event KeyboardVisibility.onChange and then you can change the height and top padding of your container, so the textfield will not get behind the keyboard
I tried a bottom navigation bar with Floating Action button as in the following link
https://codewithandrea.com/articles/2018-09-13-bottom-bar-navigation-with-fab/
It works well but when I move to next screen the floating button gets displayed and its funtion's are still working
I found a same type of issue(question) but no answer
Flutter - FloatingActionButton isn't shown after going back a screen
how to block the floating button visibility in upcoming screens
please put your code. I am not aware of this problem but if you don't want it to be visible in a specific screen you can do so for example
_currentIndex==2? FloatingActionButton():Container()
I have a form with multiple text fields and dropdowns. When I switch the focus between different textfields, the focus changes as expected.
But when a textfield has focus and right after I tap on a dropdown, the soft keyboard is dismissed and the focus is back in the textfield. The dropdown does not open on first tap. Only when I tap the dropdown again the textfield looses focus and the dropdown opens.
When the focus was not in the textfield before, tapping once on the dropdown opens it as expected.
Is there a way the make the dropdown open on first tap?
Same question asked here:
Flutter / Android - moving focus from a dropdownbutton to a textField
And there is also some discussion on it here:
https://github.com/flutter/flutter/issues/22075
I'm new to Flutter, trying to build my first app.
my main app body contains a one level ExpansionTile list, which can be filterable by a searchbar.
I'm trying to implement the following behavior -
after a user press a tile to reveal the expanded info
1. the keyboard, if present, should hide
2. previously open tile if expanded should collapse
I have tried using GestureDetector on the root widget with on tap function taking focus, but it does not detect tapping on tiles.
using expansionList onExpansionChanged seems logical but i don't understand how to use it
advice will be greatly appreciated..
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.