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: SystemNavigator.pop respects PopScope(canPop: true) #122

Closed furaiev closed 1 month ago

furaiev commented 2 months ago

Status

READY

Breaking Changes

NO

Description

This PR fixes 1st page in the Flow SystemNavigator.pop for Android. During migration from WillPopScope to PopScope (v.0.1.0) there was missed a bug that reproduces on Androids SystemNavigator.pop:

Proposed fix:

This fix doesn't look like ideal, but it works and I haven't find other way to call onPopInvoked.

Type of Change

felangel commented 2 months ago

@furaiev can you share a minimal reproduction sample? I tried to reproduce but was not able using the example app by wrapping the first page in the onboarding flow with a PopScope and using the system back button on Android.

furaiev commented 1 month ago

@felangel you are correct. I can not reproduce this in example, it looks like something with my configuration. Will check, thank you!