PackageTrack
Sign in Get early access

app_state

A state management solution on top of Router API for larger apps.

0.9.7 469 downloads/mo #822 most downloaded on pub.dev alexeyinkin/flutter-app-state

What this package is like to depend on

Last release 4 months ago

04 Apr 2026

Ships unpredictably

gaps range from 9 days to 1.4 years

Nearly every release is documented

notes for 46 of 47 stable releases

Nothing withdrawn

no release was ever pulled

5 years old

47 releases · first in 2022

1 release in the last 12 months

see the full history below

Release timeline

47 releases · Jan 2022 to Apr 2026
2023 2024 2025 2026
Release Pre-release

Releases

latest 47
  1. 0.9.7 04 Apr 2026
    Release notes

    Migrate from the deprecated Navigator.onPopPage, make PageStacksRoute…

    Open source →
    Release notes
    • Migrated Navigator integration from the deprecated onPopPage to onDidRemovePage and PopScope.
    • Made PageStacksRouterDelegate non-abstract and sufficient.
    • Deleted the old MaterialPageStacksRouterDelegate and created a deprecated typedef to use its parent PageStacksRouterDelegate.
    • Upgraded the mockito version to ^5.5.1 to support the latest SDK.
    • Re-created ios and android directories in the example app to support the recent Gradle and SDKs.
    • Deprecated PPageStatefulBloc. Create your own custom class or mix the Bloc from the bloc package. This solution is opinionated and limited and will not be maintained.
    • Deprecated PageStackBackButtonDispatcher.pageStackBloc in favor of pageStack.
    • Deprecated PPageStacksStackEvent.bloc in favor of stack.
    • Deprecated PPageStacksStackEvent.pageStackBlocEvent in favor of pageStackEvent.
    • Renamed the forgotten CStatelessMaterialPage to PStatelessMaterialPage in accordance with v0.7.0.
    Open source →
  2. 0.9.6 21 Nov 2024
    Release notes
    Open source →
  3. 0.9.5 23 Jun 2024
    Release notes

    Deprecate PagePath.location, use PagePath.uri, disallow PageStacks.se…

    Open source →
    Release notes
    • Using PagePath.uri instead of .location to construct RouteInformation.
    • Deprecated PagePath.location.
    • Disallowed PageStacks.setCurrentStackKey for a non-existent stack.
    • Added pub.dev topics: state-management, navigation, routing, urls, deep-linking.
    Open source →
  4. 0.9.4 08 Jun 2023
    Release notes
    • Require flutter_issue_108697_workaround: ^0.1.3 with a fix for WebKit.
    Open source →
  5. 0.9.3 16 Feb 2023
    Release notes
    • Added PPageStateMixin.pageStack, fill it when a page is added to the stack.
    Open source →
  6. 0.9.2 13 Feb 2023
    Release notes

    Added PageStackNavigator.navigatorKey, passed PageStackRouterDelegate…

    Open source →
    Release notes
    • Added PageStackNavigator.navigatorKey, passed PageStackRouterDelegate.navigatorKey.
    Open source →
  7. 0.9.1 28 Jan 2023
    Release notes

    Add library doc comment, fix linter issues, upgrade total_lints to 2.…

    Open source →
    Release notes
    Open source →
  8. 0.9.0 19 Jan 2023
    Release notes

    Change formatting, bump version to v0.9.0

    Open source →
    Release notes
    • BREAKING: restoreRouteInformation in PageStackConfiguration and PageStacksConfiguration are now nullable. They used to return / for null paths and that had been showing for an instant in the address bar when starting at a non-/ URL.
    Open source →
  9. 0.8.4 21 Dec 2022
    Release notes

    Support collection 1.17.0, v0.8.4

    Open source →
    Release notes
    • Support for collection v1.17.0.
    Open source →
  10. 0.8.3 08 Dec 2022
    Release notes

    Add PagePath.uri, PagePath.getUriAtBase(), relax mockito version requ…

    Open source →
    Release notes
    • Added PagePath.uri.
    • Added PagePath.getUriAtBase().
    • Relaxed mockito version requirement.
    Open source →
  11. 0.8.2 08 Nov 2022
    Release notes
    • Allow PageStack.replacePath without RouteInformationParser.
    Open source →
  12. 0.8.1 30 Sep 2022
    Release notes
    • Exports PageStacksStackEvent.
    Open source →
  13. 0.8.0 27 Aug 2022
    Release notes
    • BREAKING: Removed all functionality deprecated in v0.6 and v0.7.
    Open source →
  14. 0.7.4 27 Aug 2022
    Release notes
    Open source →
  15. 0.7.3 23 Aug 2022
    Release notes
    • Fixed image paths.
    Open source →
  16. 0.7.2 23 Aug 2022
    Release notes
    • Fixed linter issues, formatted examples, added the format check to the CI.
    • Moved to app_state subdirectory.
    Open source →
  17. 0.7.1 22 Aug 2022
    Release notes
    • Moved the examples to the package's repository.
    Open source →
  18. 0.7.0 22 Aug 2022
    Release notes

    Most of the references to BLoC were removed from the package to allow any implementation for state management: custom BLoC, BLoC or Cubit from the bloc package, ChangeNotifier, or anything else. Deprecated typedefs to the older classes and deprecated aliases to older members were added to soften the change.

    This is a short-lived major version to migrate from those deprecated API to the new one but to still be able to run your app in the process. Every deprecation in this version is scheduled for removal in v0.8.0.

    • BREAKING: While removing references to BLoC, named arguments to some constructors and methods could not be easily backed by anything backward compatible, and they were hard-renamed:
      • PageStackPageBlocEvent:
        • was renamed to PageStackPageEvent.
        • bloc was changed to PageStateMixin state.
        • pageBlocEvent was renamed to pageEvent.
      • PageStacksPageStackBlocEvent:
        • was renamed to PageStacksStackEvent.
        • bloc was renamed to stack.
        • pageStackBlocEvent was renamed to pageStackEvent.
      • MaterialPageStacksRouterDelegate.pageStacksBloc was changed from a named constructor argument to a positional one and renamed to pageStacks.
      • PageStackNavigator.bloc was renamed to stack.
    • BREAKING: PageStack.pages is now an UnmodifiableListView and not the actual list.
    • Renamings backed by deprecated typedefs and member aliases that are thus non-breaking:
      • PageBloc was changed to PageStateMixin mixin. To continue using custom blocs as in the previous versions, mix it in with with keyword instead of extending PageBloc. The newly deprecated PageBloc is changed to mix in this mixin.
      • PageBlocEvent was renamed to PageEvent.
      • PageBlocPathChangedEvent was renamed to PagePathChangedEvent.
      • In enum PopCause:
        • pageBloc was renamed to page.
        • pageStackBloc was renamed to pageStack.
      • PageBlocPopEvent was renamed to PagePopEvent.
      • PageStackBackButtonDispatcher.pageStackBloc was renamed to pageStack.
      • PageStacksBackButtonDispatcher.pageStacksBloc was renamed to pageStacks.
      • PageStackBlocEvent was renamed to PageStackEvent.
      • PageStackRouterDelegate.pageStackBloc was renamed to pageStack.
      • PageStacksBloc:
        • was renamed to PageStacks.
        • currentStackBloc was renamed to currentStack.
      • PageStacksBlocEvent was renamed to PageStacksEvent.
      • PageStacksRouterDelegate.pageStacksBloc was renamed to pageStacks.
      • CAbstractPage.bloc was changed to PageStateMixin.state.
    • PageStackEvent now has type parameter <P extends PagePath>.
    • PageState class is added as the default class that uses PageStateMixin.
    • All classes using C prefix were changed to P prefix. Deprecated typedefs added for backward compatibility. That prefix was historical when the term 'configuration' was used instead of 'path'. The new P stands for 'path'. These classes are meant for apps that have a common superclass under PagePath. All other apps should use the same classes without prefixes.
    Open source →
  19. 0.6.10 14 Aug 2022
    Release notes
    • Added PageStacksConfigurationChangedEvent.
    Open source →
  20. 0.6.9 13 Aug 2022
    Release notes
    • Preserves the state on browser refresh button press by using https://pub.dev/packages/flutter_issue_108697_workaround
    • Renamed PageStackBlocNavigator to PageStackNavigator. A deprecated typedef was added for backward compatibility.
    Open source →
  21. 0.6.8 10 Aug 2022
    Release notes
    • Added PageStackRouterDelegate.observers, PageStackRouterDelegate.transitionDelegate.
    Open source →
  22. 0.6.7 10 Aug 2022
    Release notes
    • Added PageStackBlocNavigator.observers, PageStackBlocNavigator.transitionDelegate.
    Open source →
  23. 0.6.6 08 Aug 2022
    Release notes
    • Updated example links.
    Open source →
  24. 0.6.5 08 Aug 2022
    Release notes
    • Added PageStackBloc.popUntilBottom(), it uses the new PopCause.pageStackBloc.
    • PageBlocPopEvent is now always created with the correct R type. Before it had been
    • const PageBlocPopEvent<Null> for pops without data.
    • Improved test coverage.
    • Fix formatting.
    • Add comparison to auto_route and go_router to README.
    Open source →
  25. 0.6.4 06 Aug 2022
    Release notes
    • Added PageStackBloc.replaceWith to declaratively navigate to a given path with two options:
      • Replacing the stack unconditionally with mode: PageStackMatchMode.none.
      • Preserving the states of pages that exist in both the old and the new stack with mode: PageStackMatchMode.keyOrNullPathNoGap.
    • Added mode argument to PageStackBloc.setConfiguration to choose the match mode the same way as in replaceWith.
    • Added PageBlocCloseEvent.cause to tell between the back button close, the bloc's own intention to close, and a kick-out as a result of stack diff.
    • BlocMaterialPage is now non-abstract.
    • Fixed issue when page stack was allowed to be emptied and stayed defunct afterwards Issue 3. The emptying operation is now reverted.
    • Removed code duplication by handling all page removals in PageStackBloc.handleRemoved().
    • Expand tests.
    Open source →
  26. 0.6.3 02 Aug 2022
    Release notes
    • Renamed PageBlocCloseEvent to PageBlocPopEvent to align with didPopNext method.
    • A deprecated typedef was created for backwards compatibility.
    Open source →
  27. 0.6.2 31 Jul 2022
    Release notes
    • Renamed PageConfiguration to PagePath. A typedef for backwards compatibility is added. Methods, getters, and arguments with pages' 'configuration' in its name were changed to use 'path', deprecated copies of the old ones were added for backwards compatibility. The PageConfiguration's name was a permanent source of confusion. Each doc had to start with a note that PageConfiguration corresponds to a URL, and it was not easy to memorize. This change will simplify the learning of this package. It has also stripped 9-13 characters from identifiers. Path is inspired by the original article announcing Router API (as well as app_state name itself was). Configuration earlier was inspired by Router docs where it means the configuration of the whole app (earlier versions of app_state were designed to allow storing only the top page's state, and so 'configuration' was extended to pages as well). 'Configuration' is still used in PageStackConfiguration and PageStacksConfiguration class names that do represent the whole app's state, and that is correct.
    • Deprecated PagePath.restoreRouteInformation. It used to allow overriding state and was confusing because it was not used in serializing for browser history (super.state is).
    Open source →
  28. 0.6.1 30 Jul 2022
    Release notes
    • Fix images in README.
    Open source →
  29. 0.6.0 30 Jul 2022
    Release notes
    • BREAKING: All classes that had a type parameter <C extends PageConfiguration> no longer have it. The idea of this type parameter is to have a subclass that is a superclass to all of your configurations. An example is when you store a language slug there, and it must be automatically present in all your configurations. These cases are rare, and most of the time <PageConfiguration... only clutters the code when you must provide some other typed parameters like PageBloc type or the return value. All such classes were renamed in a pattern of PageBloc<C, R> -> CPageBloc<C, R>. Then typedefs were added like typedef PageBloc<R> = CPageBloc<PageConfiguration, R>. If you need the common subclass of PageConfiguration, just add C before all such typed parent classes to get it back. Otherwise just remove <PageConfiguration> from your code.
    • BREAKING: When PageStackBloc compares pages to null PageConfiguration, it ignores the page keys and never disposes such pages. This is to allow non-web apps without any PageConfiguration classes. Otherwise the pages were always kicked out when comparing to null PageConfiguration. No practical use cases were affected.
    • PageConfiguration classes are now optional for all non-web apps and web apps that do not care for URLs.
    • PageConfiguration is now non-abstract and has / as the default location.
    • PageConfiguration objects no longer need to parse RouteInformation.state in their tryParse. To benefit from this, stop overriding parseRouteInformation in your parser and override one of the new methods instead: parsePageConfiguration, PageStackRouteInformationParser.parsePageStackConfiguration, PageStacksRouteInformationParser.parsePageStacksConfiguration. These methods are only called when failed to extract state from RouteInformation, i.e. when the URL is typed in, and so no non-URL state information is present.
    • PageStackConfiguration.getTopPageConfiguration() is now nullable and returns null if none of the pages in the stack have PageConfiguration.
    • PageStackRouteInformationParser and PageStacksRouteInformationParser can now be used without subclassing in all non-web apps and web apps that do not care for URLs. By return they parse null PageConfiguration objects.
    • PageStackRouteInformationParser and PageStacksRouteInformationParser in their restoreRouteInformation now return all their stack/stacks states to store in browser history and not only that of the top PageConfiguration.
    • Added const constructors to PageStackRouteInformationParser and PageStacksRouteInformationParser.
    • PageStackRouteInformationParser and PageStacksRouteInformationParser now have parsePageConfiguration to only parse the single PageConfiguration. This way the superclasses call defaultStackConfiguration and defaultStacksConfiguration so you don't have to. They are the recommended replacements to respective parseRouteInformation methods. They are called only when failed to recover from RouteInformation.state. To use them, stop overriding parseRouteInformation.
    • PageStackRouteInformationParser now has parsePageStackConfiguration, and PageStacksRouteInformationParser now has parsePageStacksConfiguration. They are the alternative replacements to respective parseRouteInformation methods in case you need additional logic to recover the stack state that cannot be derived from your PageConfiguration alone. They are called only when failed to recover RouteInformation.state. To use them, stop overriding parseRouteInformation.
    Open source →
  30. 0.5.1 29 Jul 2022
    Release notes
    • Added PageConfiguration.location.
    • Added PageConfiguration.defaultStackConfigurations.
    Open source →
  31. 0.5.0 27 Jul 2022
    Release notes
    • BREAKING: Pages, Blocs an PageBlocCloseEvent have a new R type parameter for the return result. The actual result is of R? with null if closing without data.
    • BREAKING: PageBlocCloseEvent has a new required data property of type R. It is encouraged to use it instead of subclassing PageBlocCloseEvent.
    • BREAKING: Page classes no longer have const constructors because they have Completers now.
    • Added PageBloc.pop(data).
    • Added PageBloc.didPopNext(page, event).
    • PageStackBloc.push returns a Future that completes when the page is popped.
    • Deprecated PageBloc.onForegroundClosed in favor of didPopNext.
    • Deprecated PageBloc.closeScreen and PageBloc.closeScreenWith in favor of pop.
    Open source →
  32. 0.4.0 19 Jul 2022
    Release notes
    • BREAKING: Require Flutter 3.
    • Re-licensed under MIT No Attribution.
    • Using total_lints, fix linter issues.
    Open source →
  33. 0.3.5 13 May 2022
    Release notes
    • Fix duplicate page key handling.
    Open source →
  34. 0.3.4 09 May 2022
    Release notes
    • Call const constructors where possible.
    • Applied dart format.
    • Added features to README.md
    Open source →
  35. 0.3.3 04 May 2022
    Release notes
    • Added MaterialPageStacksRouterDelegate.
    • Added StatefulBlocWidget.
    Open source →
  36. 0.3.2 03 Apr 2022
    Release notes
    • Const constructors for PageBlocCloseEvent, PageBlocConfigurationChangedEvent, PageStackConfiguration.
    • Link to tutorials.
    Open source →
  37. 0.3.1 01 Apr 2022
    Release notes
    • Wrap PageStackBlocEvent as PageStacksBlocEvent.
    Open source →
  38. 0.3.0 01 Apr 2022
    Release notes
    • BREAKING: Remove AppBloc.
    • Add PageStacksBloc, PageStacksConfiguration, PageStacksRouteInformationParser, PageStacksRouterDelegate.
    • Add PageConfiguration.defaultStackKey, defaultStacksConfiguration.
    Open source →
  39. 0.2.1 30 Mar 2022
    Release notes
    • An accidental debug print removed.
    Open source →
  40. 0.2.0 30 Mar 2022
    Release notes
    • BREAKING: PageConfiguration is now abstract, added restoreRouteInformation().
    • Added PageConfiguration.defaultStackConfiguration.
    • Added PageStackConfiguration.getTopPageConfiguration().
    • Added PageStackRouteInformationParser.
    Open source →
  41. 0.1.6 25 Mar 2022
    Release notes
    • Fix onPopRoute in PageStackBlocNavigator.
    Open source →
  42. 0.1.5 23 Mar 2022
    Release notes
    • Added PageStackRouterDelegate.
    Open source →
  43. 0.1.4 23 Mar 2022

    Nothing published for this version

  44. 0.1.3 20 Mar 2022
    Release notes
    • Added PageBloc.closeScreenWith, PageBloc.onForegroundClosed.
    Open source →
  45. 0.1.2 18 Jan 2022
    Release notes
    • BREAKING: Renamed AppBlocNormalizedState to AppConfiguration.
    • BREAKING: Renamed PageStackBlocNormalizedState to PageStackConfiguration.
    • BREAKING: Renamed ScreenBlocNormalizedState to PageConfiguration.
    • BREAKING: Renamed Screen... events to Page... events.
    • BREAKING: Extracted PageBloc.states to the new PageStatefulBloc subclass.
    • PageBloc is not abstract.
    • Allow to specify duplicate key behavior per push.
    • Allow null for page keys.
    • Added docs.
    Open source →
  46. 0.1.1 12 Jan 2022
    Release notes
    • BREAKING: Removed ScreenBlocConfigurationChangedEvent.configuration.
    • Added AppBloc.
    • Added AppBlocNormalizedState, PageStackBlocNormalizedState, ScreenBlocNormalizedState.
    • Normalize and denormalize state.
    • Create pages in PageStackBloc.
    Open source →
  47. 0.1.0 06 Jan 2022
    Release notes
    • Initial release.
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive