fstate 0.8.0+2 copy "fstate: ^0.8.0+2" to clipboard
fstate: ^0.8.0+2 copied to clipboard

Metaprogramming-based dependency injection and state management packages for Flutter.

This is not production ready. Please wait for the first release.

Fstate - Flutter-first State Management #

This project is an experimental state management library for Flutter. You can find a roadmap here.

Separation of State and UI #

Develop state and UI separately and wire them up declaratively.

f(state) = UI #

Declarative Dependency Injection with Reactive State #

No imperative dependency #

No imperative reactivity #

Easy timing control #

(TODO) Safe side-effect #

On lifecycle #

On Actions #

(TODO) Fstate Inspector - Easy to Debug #

(TODO) Definitely Declarative Routing - File-based routing #

Router also has a state and is reactive to the state. Flutter provides declarative routing via Router API, but it's cumbersome to implement.

TODO #

  • Simple injection
  • Simple selector
  • Simple alternator
  • Simple widget builder
  • Async selector
  • Async action
  • State from the selector
  • Family
  • Error/Loading widget builder
  • Auto dispose
  • Observer - "Side-effect" (state lifecycle)
    • before init
    • after init
    • before action
    • after action
    • before dispose
    • after dispose
  • Isolate-based
    • Since v3.7, flutter supports background isolate platform channels. This is a good opportunity to make fstate isolate-based.
  • Error/Loading Boundary Widget
  • Testability
    • Overridable state
    • State only test
    • Widget test
  • Reset state
  • Enhance DX
    • Multi step generation for better DX - reduce the number of annotations
    • Static State Inspector
    • Live State Inspector
    • VScode extension
  • File-based routing

Contributions #

Run test #

Install dependencies for tests #

dart pub global activate coverage
dart pub global activate full_coverage

and install lcov and genhtml for coverage report.

Run tests #

Each package has scripts/run_test.sh to run tests.

Coverage #

Disclaimer #

0
likes
120
pub points
0%
popularity

Publisher

unverified uploader

Metaprogramming-based dependency injection and state management packages for Flutter.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

async, flutter, fstate_annotation, meta, rxdart

More

Packages that depend on fstate