lifecycle
A flutter package that let you easily add hooks for widget lifecycle.
0.10.0
4.1K downloads/mo
#4122 most downloaded on pub.dev
chenenyu/lifecycle
What this package is like to depend on
Last release today
24 Aug 2026
Release timing varies
gaps range from 2 weeks to 1.4 years
Nearly every release is documented
notes for 25 of 26 stable releases
Nothing withdrawn
no release was ever pulled
6 years old
27 releases · first in 2020
1 release in the last 12 months
see the full history below
Release timeline
27 releases · Sep 2020 to Aug 2026Releases
latest 27-
1.0.0-alpha124 Aug 2026 pre-releaseRelease notes
Open source →Complete, API-incompatible redesign of the package.
Breaking changes
- Replace the 0.x observer and wrapper APIs with a composable lifecycle tree
built around
LifecycleController,LifecycleScope, normalizedLifecycleConstraint, and immutableLifecycleSnapshotvalues. - Use deterministic
LifecycleEventandLifecycleTransitionnotifications through the standardChangeNotifierAPI. - Defer viewport activation until scrolling settles by default; use
ViewportLifecycleActivationPolicy.immediatefor immediate activation. - Require Flutter 3.32 or newer.
Added
- Support App, Navigator 1.0/2.0, PageView, TabBarView, and scrollable viewport lifecycle composition.
- Add
LifecycleApp,LifecycleBoundary,LifecycleListener,LifecycleBuilder, andLifecycleStateMixin. - Add stable page identity, nested Navigator support, batched viewport measurement, an interactive example, and comprehensive test suites.
- Replace the 0.x observer and wrapper APIs with a composable lifecycle tree
built around
-
0.10.028 Mar 2025Release notes
Open source →- Fix issue #27: Custom
initialPageinPageController(alsoinitialIndexinTabController)
will not triggervisibleandactive. - Migrate to new flutter's gradle plugins.
Release notes
Open source →- Fix issue #27: Custom
initialPageinPageController(alsoinitialIndexinTabController) will not triggervisibleandactive. - Migrate to new flutter's gradle plugins.
- Fix issue #27: Custom
-
0.9.004 Sep 2024Release notes
Open source →- Fix issue #26: both onVisible and onInvisible were not called on web platform.
- Bump flutter version to 3.13.0.
-
0.8.023 Aug 2023Release notes
Open source →- Fix: use
addPostFrameCallbackto avoid unnecessary frame callback. - The param
wantKeepAliveinChildPageLifecycleWrapperis not required now. - Export some mixins.
Release notes
Open source →- Fix: use
addPostFrameCallbackto avoid unnecessary frame callback. - The param
wantKeepAliveinChildPageLifecycleWrapperis not required now. - Export some mixins.
- Fix: use
-
0.7.023 Apr 2023Release notes
Open source →Added:
iterateRoutes(bool Function(Route route) callback)andremoveRoute<T>(Route route, [T? result]).Deprecated:
findRoute(String routeName)andremoveNamed<T>(String routeName, [T? result]).Release notes
Open source →- Added:
iterateRoutes(),removeRoute(). - Deprecated:
findRoute(),removeNamed().
- Added:
-
0.6.001 Jul 2022 -
0.5.016 May 2022 -
0.4.420 Apr 2022 -
0.4.317 Feb 2022 -
0.4.203 Dec 2021 -
0.4.104 Nov 2021 -
0.4.022 Oct 2021Release notes
Open source →- ScrollView item lifecycle support.
- Rename
ParentPageLifecycleWrappertoPageViewLifecycleWrapperand remove required paramcontroller.
-
0.3.409 Oct 2021 -
0.3.329 Sep 2021 -
0.3.223 Sep 2021 -
0.3.101 Sep 2021 -
0.3.031 Aug 2021Release notes
Open source →Breaking changes:
- More reasonable lifecycle events just like Android platform.
-
0.2.012 Apr 2021 -
0.1.129 Dec 2020Nothing published for this version
-
0.1.1+130 Dec 2020 -
0.1.021 Dec 2020Release notes
Open source →- Emit
pushafterinitStateandpopbeforedispose. - Optimize events delivery in nested page view.
- Emit
-
0.0.628 Oct 2020 -
0.0.515 Oct 2020 -
0.0.427 Sep 2020 -
0.0.324 Sep 2020 -
0.0.223 Sep 2020 -
0.0.123 Sep 2020