Skip to content

Commit

Permalink
Add ValueNotifier & InheritedNotifier as state management option (flu…
Browse files Browse the repository at this point in the history
…tter#10307)

A solution using the built-in functionality in the Flutter SDK such as
InheritedNotifier and ValueNotifier.

The other documentation doesn't reference the use of these two together
which results in a simple approach to immutable state management

## Presubmit checklist

- [x] This PR doesn’t contain automatically generated corrections
(Grammarly or similar).
- [x] This PR follows the [Google Developer Documentation Style
Guidelines](https://developers.google.com/style) — for example, it
doesn’t use _i.e._ or _e.g._, and it avoids _I_ and _we_ (first person).
- [x] This PR uses [semantic line
breaks](https://github.com/dart-lang/site-shared/blob/main/doc/writing-for-dart-and-flutter-websites.md#semantic-line-breaks)
of 80 characters or fewer.

Co-authored-by: Brett Morgan <[email protected]>
  • Loading branch information
2 people authored and atsansone committed Apr 5, 2024
1 parent 2c5e851 commit 87a35b2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/data-and-backend/state-mgmt/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,15 @@ The low-level approach to use for widget-specific, ephemeral state.
[Adding interactivity to your Flutter app]: /ui/interactivity
[Basic state management in Google Flutter]: {{site.medium}}/@agungsurya/basic-state-management-in-google-flutter-6ee73608f96d

## ValueNotifier &amp; InheritedNotifier

An approach using only Flutter provided tooling to update state and notify the UI of changes.


* [State Management using ValueNotifier and InheritedNotifier][], by Tadas Petra

[State Management using ValueNotifier and InheritedNotifier]: https://www.hungrimind.com/articles/flutter-state-management

## InheritedWidget &amp; InheritedModel

The low-level approach used to communicate between ancestors and children
Expand Down

0 comments on commit 87a35b2

Please sign in to comment.