# hhlifecycle_flutter **Repository Path**: hhyq520/hhlifecycle_flutter ## Basic Information - **Project Name**: hhlifecycle_flutter - **Description**: No description available - **Primary Language**: Unknown - **License**: BSD-3-Clause - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-11-24 - **Last Updated**: 2021-11-24 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README **已知问题:存在不继承LifeCycleBaseState的widget,onPause onResume也会走,如果有页面不继承请自行判断当前路由** **使用方法** ```dart class _Page1State extends LifeCycleBaseState { @override Widget onBuild(BuildContext context) { return Scaffold( appBar: AppBar( title: const Text("Page2"), ), body: Center( child: InkWell( onTap: (){ Get.to(Page2(),preventDuplicates: false); }, child: const Text( "Page2" ), ), ), ); } @override void onStart() { // TODO: implement onStart super.onStart(); } @override void onDestory() { // TODO: implement onDestory super.onDestory(); } @override void onPause() { // TODO: implement onPause super.onPause(); } @override void onResume() { // TODO: implement onResume super.onResume(); } } ```