levit_dart 0.0.7
levit_dart: ^0.0.7 copied to clipboard
Utility mixins and tools for Levit Dart controllers.
levit_dart #
Purpose & Scope #
levit_dart adds higher-level pure Dart utilities on top of levit_dart_core.
This package is responsible for:
- Controller task execution helpers and lifecycle-aware task orchestration.
- Loop execution helpers for periodic/continuous workloads.
- Focused utility mixins (selection/time helpers) for controller state.
This package does not include:
- Flutter widget bindings (
levit_flutter_core,levit_flutter).
Conceptual Overview #
The package keeps controller ownership explicit while reducing boilerplate for common operational patterns:
- Queueing and retrying tasks with structured lifecycle events.
- Tracking execution status reactively.
- Running managed loops tied to controller disposal.
Getting Started #
dependencies:
levit_dart: ^latest
import 'package:levit_dart/levit_dart.dart';
class SyncController extends LevitController with LevitTasksMixin {
Future<void> sync() async {
await runTask(
() async {
// perform sync work
},
id: 'sync',
);
}
}
Design Principles #
- Controller-first ownership and cleanup.
- Explicit concurrency semantics.
- Reusable utilities without hiding underlying lifecycle mechanics.