felangel / felangel/flow_builder
Page Animations not inverted when navigating back
- Dominant language
- Dart
- Stars
- 416
- Forks
- 68
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
When using the provided example to implement custom page transitions: https://github.com/felangel/flow_builder/issues/29 the animation for "forward" and "backward" navigation remains the same.
This only happens when handling the back navigation with the FlowBuilder state (context.flow().update...), but the animation behaves correctly if I use `Navigator.pop(context);`
This is a snipped of my `onGeneratePages`, where I tested the back navigation from `OnboardingFlowPage.commuteDays` to `OnboardingFlowPage.enterAddress` by calling `context.flow.update((state) => OnboardingInitial(page: OnboardingFlowPage.enterAddress)`.
```
case OnboardingFlowPage.enterAddress:
return [
CustomPage.createWithoutAnalytics(
EnterAddressFlow(isOnboarding: isOnboarding))
];
case OnboardingFlowPage.commuteDays:
return [
CustomPage.createWithoutAnalytics(
EnterAddressFlow(isOnboarding: isOnboarding)),
CustomPage.createWithAnalytics(
CommuteDaysPage(isOnboarding: isOnboarding)),
];
```
**To Reproduce**
Steps to reproduce the behavior:
Implement the given example with a custom page transition and do a back navigation by calling `context.flow().update()`.
**Expected behavior**
A clear and concise description of what you expected to happen.
Inverted animation plays
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Logs **
Run `flutter analyze` and attach any output of that command below.
If there are any analysis errors, try resolving them before filing this issue.
Paste the output of running `flutter doctor -v` here.
Doctor log
[✓] Flutter (Channel stable, 2.5.2, on macOS 11.6.1 20G224 darwin-x64, locale en-GB)
• Flutter version 2.5.2 at /Users/floriandaniel/Documents/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 3595343e20 (3 months ago), 2021-09-30 12:58:18 -0700
• Engine revision 6ac856380f
• Dart version 2.14.3
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at /Users/floriandaniel/Library/Android/sdk
• Platform android-31, build-tools 30.0.3
• ANDROID_HOME = /Users/floriandaniel/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
✗ Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[✓] Xcode - develop for iOS and macOS
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 13.2.1, Build version 13C100
• CocoaPods version 1.11.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2020.3)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
[✓] IntelliJ IDEA Community Edition (version 2021.3)
• IntelliJ at /Applications/IntelliJ IDEA CE.app
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
[✓] VS Code (version 1.63.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.29.0
[✓] Connected device (2 available)
• Android SDK built for x86 (mobile) • emulator-5554 • android-x86 • Android 8.1.0 (API 27) (emulator)
• Chrome (web) • chrome • web-javascript • Google Chrome 96.0.4664.110
! Doctor found issues in 1 category.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.