mirror of
https://github.com/hmalik144/days_left_flutter.git
synced 2025-12-10 03:05:21 +00:00
- Implementation of firebase - Implementation of dependency injection Took 11 hours 26 minutes
21 lines
376 B
Dart
21 lines
376 B
Dart
import 'package:sealed_class/sealed_class.dart';
|
|
|
|
@Sealed([Idle, HasStarted, HasData, HasError])
|
|
abstract class ViewState {}
|
|
|
|
class Idle implements ViewState {}
|
|
|
|
class HasStarted implements ViewState {}
|
|
|
|
class HasData implements ViewState {
|
|
final dynamic data;
|
|
|
|
HasData(this.data);
|
|
}
|
|
|
|
class HasError implements ViewState {
|
|
final String error;
|
|
|
|
HasError(this.error);
|
|
}
|