Coder Social home page Coder Social logo

Comments (3)

martinrybak avatar martinrybak commented on August 15, 2024 1

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.

martinrybak avatar martinrybak commented on August 15, 2024

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.

omarsawalhah avatar omarsawalhah commented on August 15, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.