Comments (3)
Regarding your original issue, KeyboardAvoider
works by wrapping your content in a ScrollView
to make it scrollable. So your content has to play nice inside a ScrollView
, which means no widgets with unbounded height.
Re: your most recent comment: you can still use a Scaffold
for the other features it offers (app bar, drawer, etc.). Just set resizeToAvoidBottomInset
to false
. Or you can give your TextField
an explicit Material
ancestor widget.
from keyboard_avoider.
The issue is the Expanded
widget inside your Column
. That effectively gives the column infinite height. You can't have a widget of unbounded height inside a ScrollView
, which is what KeyboardAvoider
uses to scroll your content. Replace KeyboardAvoider
with SingleChildScrollView
and you'll get the same result. If you remove the Expanded
widget, it will work fine.
from keyboard_avoider.
But KeyboardAvoider is meant to avoid the keyboard automatically when text fields get focus, am I right.
In this post,
https://medium.com/flutter-nyc/avoiding-the-on-screen-keyboard-in-flutter-ae0e46ecb96c
you said we can use it instead of "Scaffold", if remove the scaffold widget, you will get an error that the "TextField" needs a wrapping Material widget.
from keyboard_avoider.
Related Issues (11)
- In the menifest file, set the theme of FlutterActivity to "fullscreen" and "keyboard_ avoid" is not working HOT 1
- IOS not working
- Option to give padding between keyboard and input field HOT 1
- Null Safety HOT 3
- pub.dev integration
- autoscroll: true not working HOT 7
- auto dismiss when click outside of keyboard HOT 1
- Scrolls much more than needed but comes back into focus after delay. HOT 3
- AppBar support?
- Incorrect keyboard behaviour HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from keyboard_avoider.