mirror of
https://github.com/Livinglist/Hacki.git
synced 2025-08-06 18:24:42 +08:00
15 lines
252 B
Dart
15 lines
252 B
Dart
enum Status {
|
|
idle,
|
|
inProgress,
|
|
success,
|
|
failure,
|
|
}
|
|
|
|
extension StatusExtension on Status {
|
|
bool get isLoading => this == Status.inProgress;
|
|
|
|
bool get isSuccessful => this == Status.success;
|
|
|
|
bool get hasError => this == Status.failure;
|
|
}
|