Skip to content

Support capturing back button #21

Description

@mehmetf

I see no way of capturing the back button press in the app. Currently this closes the Sky Engine.

It would be great if this can be combined with the request to have framework level support for page transitions (with animations). Back button can then be handled within framework and transition to the previous page.

Activity

  1. eseidelGoogle commented on May 18, 2015

    @eseidelGoogle
    Contributor

    Agreed. @mpcomplete looked into this briefly, but we don't yet have a way to override this behavior.

  2. mehmetf commented on May 19, 2015

    @mehmetf
    ContributorAuthor

    This should be relatively easy since all you really need is to capture this in java layer and call some dart hook to decide whether the app should handle it or not. See http://developer.android.com/reference/android/app/Activity.html#onBackPressed() The only thing is I am not sure if it can be done in an async way and whether that's a requirement for you.

  3. Hixie commented on May 19, 2015

    @Hixie
    Contributor

    The reason it's hard is that we need to figure out what it should mean.

  4. Hixie commented on May 19, 2015

    @Hixie
    Contributor

    Anyway, this is covered by https://github.com/domokit/mojo/issues/155 .

  5. b-cancel commented on Jun 13, 2018

    @b-cancel

    I'm posting this here in case anyone out there finds this and wishes they would find a simple example
    https://gist.github.com/b-cancel/0ca372017a25f0c120b14dfca3591aa5

  6. github-actions commented on Sep 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.

  7. locked as resolved and limited conversation to collaborators on Sep 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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions