flutter - How can text on stack not up when keyboard appears? - forms

Im making an authentication screen where there are Text widgets and TextField wrapped in Stack.
However, when writing in the Textfield, following the activation code (Text) below is pulled up when the keyboard appears;
How to keep the following code position constant at the bottom and when the keyboard appears it is overwritten?
Any answell will appreciated.

Wrap You Stack widget inside a listview, this way the keyboard won't have any effect on its position.

Related

Screen resizing after keyboard is shown on TextField tap

Widget Tree - https://i.imgur.com/xZjMRm2.png
So I have this widget tree, the TextField in question is inside the column where it shows a RenderFlex error(please ignore the error, it's only there because I animate the column to appear and disappear on button pressed).
The problem is every time I tap on the TextField my screen is pushed up from the bottom as the keyboard is pushing their way through.
To fix this issue I tried to put the Scaffold property resizeToAvoidBottomInset: false, but it did not fix the issue.
Also when I close the keyboard, the background of my screen changes.
If you need code snippets please let me know.
Thank you for your time :)
i need a code snippets, but you can add SingleChildScrollView at the top of the column.
and for when you close the keyboard, the background of your screen changes, my guess for that is when the keyboard opens the screen rebuilds and this will call the build function so if you initialized any variables or anything related to the background change inside the build function it will rebuild or re-initialized.
i do not know if my answer helps but it will be better to share a code snippest, have a great day.

How to prevent Expanded to shrink GestureDetector's tap area?

I've been trying to make Bookmark button's onTap work because it was working only sometimes.
I'm using the Expanded widget in the Bookmark button but when I toggle debug point on, I saw that its area is shrunk and that's why taps are not working. I give this widget size and added HitTestBehavior.translucent on GestureDetector but no luck.
Any idea how I can fit this button without losing its tap area?

Is there any way to push Widget above of the Keyboard when it shows up?

I uses TextFormField with Scrollable parent, when the keyboard shows up, is there any way to have the Widgets to be above the keyboard? Is it FocusNode that I should be using?
Current Situation
From this, you can see that when my keyboard shows up, the Button will be covered.
If you can, just put all widgets which needs to stay over the keyboard in a SingleChildScrollView, and set reverse property of the SingleChildScrollView to true

Hiding widgets when the keyboard is active

How do you hide certain widgets when the keyboard is activated? I have an app that overflows when a textfield is activated and instead of just compressing everything I would like to hide several of the widgets that are not necessary when filling out the fields.
I'd first suggest to use SingleChildScrollView as parent. It allows you to show the whole view and make it scrollable when keyboard appears.
If you still want to hide elements, you can know if keyboard is on screen by checking if MediaQuery.of(context).viewInsets.bottom > 100.

ExpansionTile - how to collapse other tiles, hide keyboard on press

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..