lemsa_core_kit library
Shared primitives for the Lemsa Flutter family.
Import only this library:
import 'package:lemsa_core_kit/lemsa_core_kit.dart';
Classes
- AppLogger
- Thin wrapper over developer.log.
- AppReporter
- Crash / failure reporting sink used by kits without depending on a vendor SDK.
-
Change<
T> - Mutation event for list / cache sync.
-
Created<
T> - Entity was created.
- Debouncer
- Runs only the last action after delay of quiet (search boxes, autosave, resize).
-
Deleted<
T> - Entity was deleted.
- Disposables
- Registry of owned resources disposed in reverse registration order.
-
Err<
T> - Failed Result carrying an AppFailure.
- NoOpReporter
- Default reporter that does nothing.
-
Ok<
T> - Successful Result.
-
Result<
T> - Outcome of a call that must branch on success vs typed failure.
- Throttler
- Runs the first action, then ignores calls until interval passes (double-tap guards, scroll-driven fetches).
-
Updated<
T> - Entity was updated.
Enums
- AuthReason
- Reasons for AuthFailure.
Extensions
- DateTimeX on DateTime
- DateTime helpers.
- NullableBoolX on bool?
- Nullable bool helpers.
-
NullableListX
on List<
T?> - Nullable list helpers.
- NullableNumX on num?
- Nullable num helpers.
- NullableStringX on String?
- Nullable string helpers.
-
ResultX
on Result<
T> - Helpers for branching on Result.
Exceptions / Errors
- AppFailure
- Sealed application failure hierarchy.
- AuthFailure
- Authentication / session failure.
- CancelledFailure
- User or client cancelled the operation.
- ConflictFailure
- Conflict (e.g. duplicate / version clash).
- NetworkFailure
- Connectivity / transport failure.
- NotFoundFailure
- Resource missing.
- PermissionFailure
- Authorization / permission failure.
- ServerFailure
- Upstream server error.
- StorageFailure
- Local storage / filesystem failure.
- TimeoutFailure
- Deadline exceeded.
- UnknownFailure
- Unexpected failure.
- ValidationFailure
- Field-level validation failure.