felangel / flow_builder

Flutter Flows made easy! A Flutter package which simplifies navigation flows with a flexible, declarative API.
https://pub.dev/packages/flow_builder
MIT License
389 stars 63 forks source link

fix: android back button pops the whole flow instead of popping pushed routes #43

Closed Kirpal closed 3 years ago

Kirpal commented 3 years ago

Status

READY

Breaking Changes

NO

Description

We've run into an issue where clicking the android back button in a route that has been pushed from a page in a flow builder cancels the flow.

Example (example):

  1. Tap "Authentication Flow"
  2. Tap "Settings", which pushes a route using: Navigator.of(context).push(SettingsPage.route());
  3. Tap android back button
    • Expected: pop SettingsPage, go back to SplashPage
    • Actual: pops the base FlowBuilder and goes to app home

Example with fix applied

Type of Change