Skip to content

SnackBars show behind the keyboard #143

Description

@FlutterIssues

Issue by eseidelGoogle
Tuesday Aug 25, 2015 at 20:39 GMT
Originally opened as https://github.com/flutter/engine/issues/810


Not sure if they're supposed to sit above the keyboard or what? Or maybe we're supposed to use a different widget when the keyboard is visible?

I discovered this by entering an invalid number in the fitness app.

Activity

  1. FlutterIssues commented on Nov 9, 2015

    @FlutterIssues
    Author

    Comment by j9brown
    Tuesday Aug 25, 2015 at 21:06 GMT


    FWIW, Android won't tell you whether the keyboard is visible.

    So in general the application is left with deciding how it wants to deal
    with incursions into its space by an IME or other parts of the system UI
    based on other information provided during layout, particularly the content
    insets.

    The Android window manager provides the application with content inserts
    which represent what part of the window will be visible. The app may be
    able to draw outside of that region but what it draws there may or may not
    be visible since it might be covered by decorations like the status bar but
    that's how translucent decorations work. Typically the app will adjust its
    content view's layout to fit that region (the framework can do this
    automatically).

    If you've got a snack bar, you'll want to anchor it to the bottom of the
    content region of the window.

    It may help to think of the app's layout as having both an outer decor part
    (which contains the background and decor elements like the title bar which
    fill the window) and an inner content part (which fits within the decor and
    adjusts as the content region changes).

    NB. I might be getting the details slightly wrong. There are also
    affordances for things like overscan regions but I think most of that is
    hidden from the API.

    See also:
    https://developer.android.com/reference/android/view/View.html#setFitsSystemWindows(boolean)

    On Tue, Aug 25, 2015 at 1:39 PM Eric Seidel [email protected]
    wrote:

    Not sure if they're supposed to sit above the keyboard or what? Or maybe
    we're supposed to use a different widget when the keyboard is visible?

    I discovered this by entering an invalid number in the fitness app.

    —
    Reply to this email directly or view it on GitHub
    https://github.com/domokit/sky_engine/issues/810.

  2. FlutterIssues commented on Nov 9, 2015

    @FlutterIssues
    Author

    Comment by Hixie
    Monday Aug 31, 2015 at 21:14 GMT


    See also #147.

  3. mohammedhasna2015 commented on Mar 28, 2021

    @mohammedhasna2015

    this worked for me : remove this line : resizeToAvoidBottomInset:false
    from Scaffold

  4. github-actions commented on Aug 3, 2021

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  5. locked as resolved and limited conversation to collaborators on Aug 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    frameworkflutter/packages/flutter repository. See also f: labels.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions