Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Navigator.of(context).pop timing #647

Merged
merged 5 commits into from
Jul 15, 2022

Conversation

bannzai
Copy link
Owner

@bannzai bannzai commented Jul 13, 2022

Abstract

Navigator.of(context).pop()を利用した後でcontextを使用している処理が無いようにする
回避策としてはNavigator.of(context).pop()の前で行う。もしくは、final navigator = Navigator.of(context); を作って必要な処理が済んだら pop メソッドを呼ぶ。になるが今回は後者の必要はなさそうだったので前者のみで調整する

Why

popされた後に、popずみのContextを見ることで挙動が変になる

Links

Checked

  • Analyticsのログを入れたか
  • 境界値に対してのUnitTestを書いた
  • パターン分岐が発生するWidgetに対してWidgetTestを書いた
  • リリースノートを追加した

@bannzai bannzai force-pushed the refactor/flow/navigator-of-pop branch from 83679c0 to d046889 Compare July 14, 2022 23:36
@bannzai bannzai merged commit a6e3a6d into main Jul 15, 2022
@bannzai bannzai deleted the refactor/flow/navigator-of-pop branch July 15, 2022 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant