We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
example:
class MainAppPage extends StatelessWidget { MainAppPage({super.key}); var mainProvider = Get.put(MainAppProvider()); @override Widget build(BuildContext context) { return Container( alignment: Alignment.center, child: Text("这是app主页"), ); } }
class MainAppProvider extends FullLifeCycleController with FullLifeCycleMixin { @override void onDetached() { // TODO: implement onDetached print("testxp.mixin.onDetached"); } @override void onHidden() { // TODO: implement onHidden print("testxp.mixin.onHidden"); } @override void onInactive() { // TODO: implement onInactive print("testxp.mixin.onInactive"); } @override void onPaused() { // TODO: implement onPaused print("testxp.mixin.onPaused"); } @override void onResumed() { // TODO: implement onResumed print("testxp.mixin.onResumed"); } }
To Reproduce 上面是我的代码,我这么用这个代码在一个新建的项目里面print里面的日志可以打印, 但是如果吧上面的代码放在我的项目里面,print不会执行,我不知道是什么原因导致的。 想问一下,什么可以影响到WidgetsFlutterBinding的回调。
The text was updated successfully, but these errors were encountered:
我找到问题的原因了。是因为我用了SystemChannels.lifecycle这个方法来监听页面生命周期,导致getx自带的FullLifecycler失效了。
Sorry, something went wrong.
jonataslaw
No branches or pull requests
example:
To Reproduce
上面是我的代码,我这么用这个代码在一个新建的项目里面print里面的日志可以打印,
但是如果吧上面的代码放在我的项目里面,print不会执行,我不知道是什么原因导致的。
想问一下,什么可以影响到WidgetsFlutterBinding的回调。
The text was updated successfully, but these errors were encountered: