使用fish_redux flutter页面的生命周期

要在effect里去监听

page要混入with WidgetsBindingObserverMixin

Lifecycle.didChangeAppLifecycleState监听flutter生命周期的变化

AppLifecycleState.inactive: // 处于这种状态的应用程序应该假设它们可能在任何时候暂停。 AppLifecycleState.resumed:// 应用程序可见,前台
AppLifecycleState.paused: // 应用程序不可见,后台
AppLifecycleState.detached://Navigator.pop执行之后

你可能感兴趣的:(使用fish_redux flutter页面的生命周期)