solid_x 2.1.1 copy "solid_x: ^2.1.1" to clipboard
solid_x: ^2.1.1 copied to clipboard

Inspired by Kotlin's `ViewModel + StateFlow` pattern, Solid provides a clean architecture to manage your application's state with zero code generation and zero boilerplate.

2.1.1 #

  • Changed: initial parameter in MutationBuilder is now optional. If omitted, the mutation is automatically triggered in initState and the widget falls back to displaying the loading builder state until the mutation resolves.

2.1.0 #

  • Added: Mutation<T> — a reactive wrapper around async functions that automatically tracks initial → loading → success / empty / error lifecycle, with zero manual state management.
  • Added: mutation<T>(fn) helper on Solid — throw-based, declares a mutation in one line inside a ViewModel.
  • Added: mutationEither<L, T>(fn) helper on Solid — Either-based, compatible with dartz Either<L, R>, Left maps to error state, Right maps to success.
  • Added: MutationBuilder<T> widget — renders the correct widget per mutation state with optional onSuccess/onError side-effect hooks and buildWhen filtering.
  • Added: MutationState<T> sealed class with 5 subtypes: MutationInitial, MutationLoading, MutationSuccess, MutationEmpty, MutationError.
  • Updated: Example app — new Mutation tab (⚡) demonstrating all mutation variants.

2.0.3 #

  • Major Redesign: Solid is now a StateFlow/ViewModel pattern library.
  • Added: SolidViewModel<S> – single-state ViewModel base class with emit(S).
  • Added: SolidConsumer<T> – combines SolidBuilder and SolidListener in one widget.
  • Removed: Granular state management (SolidState, Mutation, Solid base class).
  • Simplified: The widget API (SolidProvider, SolidBuilder, SolidListener) now supports any ChangeNotifier.
  • Updated: Added context.solid<T>() extension for easy ViewModel lookup.

1.0.0 #

  • Initial release.
  • Granular state management with SolidState<T> and Mutation<T>.
  • Solid abstract base class with auto-disposal.
  • 8 widget variants for state and mutations.
1
likes
0
points
298
downloads

Publisher

unverified uploader

Weekly Downloads

Inspired by Kotlin's `ViewModel + StateFlow` pattern, Solid provides a clean architecture to manage your application's state with zero code generation and zero boilerplate.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on solid_x