Skip to content

Calling showSnackBar() twice in a row will fail #374

Closed

Description

@Hixie

If I'm reading the code right, if you call showSnackBar() while an existing snack bar is up, we'll just replace the previous one with the new one, rather than doing a transition or something. Then later we'll set the placeholder to null even while one of the snack bars is still up.

Activity

  1. added
    frameworkflutter/packages/flutter repository. See also f: labels.
    on Nov 13, 2015
  2. added this to the milestone on Nov 13, 2015
  3. self-assigned this
    on Nov 14, 2015
  4. HansMuller commented on Nov 14, 2015

    @HansMuller
    Contributor

    #376 adds an assert() for this case

    I think the right thing to do would be to dismiss the old snackbar and show the new one. Exactly what "dismiss" means in this context is TBD.

  5. assigned and unassigned on Nov 17, 2015
  6. HansMuller commented on Nov 18, 2015

    @HansMuller
    Contributor

    http://www.google.com/design/spec/components/snackbars-toasts.html#snackbars-toasts-usage

    There is only ever one snackbar displayed. When a second snackbar is triggered while the first is displayed, the first should start the contraction motion downwards before the second one animates upwards.

  7. github-actions commented on Aug 17, 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.

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

Metadata

Metadata

Assignees

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