Skip to content

Back button in feedback window does not close the feedback window, instead goes back in app until navigation stack is empty, then crashes the app.  #346

Open
@Sofiety

Description

@Sofiety

Describe the bug
First I navigate around the app, open up the feedback window.

When I click the back button on my phone upon having the feedback window open, it pops the navigation stack (goes back to previous screen). I can see it go back on the little preview at the bottom.
Expected behavior would be to close down the feedback window.

If I keep "popin" the stack until I am on the first stack and nothing left to pop, if I go back again, it crashes with error:

'package:flutter/src/widgets/navigator.dart': Failed assertion: line 3803 pos 12: '_history.isNotEmpty': is not true

I expect first that the back button should close the feedback window, NOT go back in my app. When a window comes up like the feedback window, back button expects to close it, go back to where I was in the app.

Secondly, how can I use "Navigator.of(context)
.maybePop();"
so that it does not pop the last stack and crash the app.

Wiredash SDK Info
Which SDK are you using?
wiredash:
version: "2.1.2"
_On which platform are you seeing the crash?
Oneplus9, OxygenOS 14.0

Flutter SDK
Which Flutter version are you using? Run flutter doctor -v
• Flutter version 3.19.6 on channel stable at C:\Flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 54e66469a9 (12 days ago), 2024-04-17 13:08:03 -0700
• Engine revision c4cd48e186
• Dart version 3.3.4
• DevTools version 2.31.1

Thanks guys!! :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions