levit_flutter 0.0.5 copy "levit_flutter: ^0.0.5" to clipboard
levit_flutter: ^0.0.5 copied to clipboard

Utility mixins and tools for Levit Flutter applications. Re-exports levit_dart_utility.

levit_flutter #

Pub Version Platforms License: MIT codecov

Official Flutter integration for the Levit ecosystem.

levit_flutter provides the necessary glue to connect Levit's high-performance reactive state (levit_reactive) and hierarchical dependency injection (levit_scope) with the Flutter widget tree.


Purpose & Scope #

levit_flutter is the primary entry point for Flutter developers. It is responsible for:

  • Binding reactive state updates to widget rebuilds with minimal overhead.
  • Providing widgets for scope management and dependency propagation.
  • Offering lifecycle-aware hooks and widgets for clean resource management in the UI.

Conceptual Overview #

Core Abstractions #

  • [LWatch]: A widget that automatically rebuilds when reactive variables it accesses change.
  • [LView]: A controlled view that lifecycle-manages its own scoped dependencies.
  • [LScope]: A widget that injects a [LevitScope] into the subtree.

Getting Started #

Watching State #

final count = 0.lx;

class MyWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return LWatch(() => Text('Count: ${count.value}'));
  }
}

Design Principles #

Precision Rebuilds #

Granular reactivity ensures that only the specific widgets reading a piece of state are rebuilt, avoiding full subtree re-renders.

Intuitive Scoping #

Leverages Flutter's InheritedWidget patterns to make dependency injection feel natural and integrated with the framework's architecture.

1
likes
0
points
166
downloads

Publisher

unverified uploader

Weekly Downloads

Utility mixins and tools for Levit Flutter applications. Re-exports levit_dart_utility.

Repository (GitHub)
View/report issues

Topics

#flutter #utilities #widget

License

unknown (license)

Dependencies

flutter, levit_dart, levit_flutter_core

More

Packages that depend on levit_flutter