Skip to content

Would like instructions on how to implement onSaveInstanceState #16799

Closed

Description

@eseidelGoogle

https://twitter.com/championswimmer/status/987327881960357889

My understanding is that FlutterView will handle the config change if AndroidManifest.xml contains:
android:configChanges="orientation|screenSize"
https://developer.android.com/guide/topics/resources/runtime-changes.html

But I'm not sure that we've written that down anywhere in our docs. I believe some of our sample are locked to portrait for historical reasons too?

Activity

  1. eseidelGoogle commented on Apr 20, 2018

    @eseidelGoogle
    ContributorAuthor

    I'm aware of at least one bug reported with Flutter's rotation code: #16322 there may be others.

  2. championswimmer commented on Apr 20, 2018

    @championswimmer

    There needs to be documentation regarding how onSaveInstanceState is to be implented in Flutter as well.

  3. championswimmer commented on Apr 20, 2018

    @championswimmer

    Also pertinent : #6827
    And dupe: #3427

  4. Sfshaza commented on May 18, 2018

    @Sfshaza

    Yes, added to doc content plan.

  5. Sfshaza commented on May 31, 2018

    @Sfshaza

    OK, PR flutter/website#1037 handles documenting how to configure landscape view, and also that android should not restart a Flutter app.

    The onSaveInstanceState doc is not yet written.

  6. changed the title [-]Would like instructions on how to handle landscape transitions with Flutter[/-] [+]Would like instructions on how to implement onSaveInstanceState[/+] on May 31, 2018
  7. mzgreen commented on Jun 27, 2018

    @mzgreen

    Please note that onSaveInstanceState is not only about persisting state during config changes. More important part is that it's used it to persist transient app state when OS kills the app.
    https://developer.android.com/topic/libraries/architecture/saving-states#system_initiated_ui_state_dismissal

  8. zoechi commented on Dec 11, 2018

    @zoechi
    Contributor

    Issue moved to flutter/website #2004 via ZenHub

  9. github-actions commented on Sep 1, 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.

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

    c: new featureNothing broken; request for a new capabilityplatform-androidAndroid applications specifically

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions