levit
Purpose & Scope
levit is the recommended single import for pure Dart applications.
This kit re-exports:
levit_dartutility layer.levit_dart_corecomposition APIs.levit_scopeandlevit_reactivefoundations (through transitive exports).
Use this package when you want the complete Dart-side Levit stack without Flutter bindings.
Conceptual Overview
levit is intentionally thin.
It does not define new runtime semantics; it packages the Dart stack behind one import for simpler adoption.
Getting Started
dependencies:
levit: ^latest
import 'package:levit/levit.dart';
void main() {
final scope = Levit.createScope('app');
scope.run(() {
final count = Levit.put(() => 0.lx, tag: 'count');
final worker = LxWorker(count, (value) => print('count=$value'));
count(1);
worker.close();
});
scope.dispose();
}
Design Principles
- Zero-surprise aggregation: one import, unchanged underlying APIs.
- Clear boundaries: pure Dart only, no Flutter dependency.
- Production default for shared domain and backend layers.
Libraries
- levit
- Recommended single-import kit for pure Dart Levit applications.