flowchart LR
Widget --> SideEffect
SideEffect --> stores
subgraph stores
Store...
end
stores --> SideEffect
stores ---> Widget
SideEffect --> Repository
One way state management. Thin wrapper. Use StateNotifier and RiverPods.
Add baguette and flutter_riverpod to Pubspec.yaml.
Store and SideEffect in the upper figure use this library.State extends BState, so that a Model is called from State.
. State should call Model.
State and Model uses freezed etc., Repository could be anything.
Store subscription uses Riverpods.
See the example for details.
baguette
git: https://github.com/mi6ock/baguette.git