mirror of
https://github.com/hmalik144/easy_cc_flutter.git
synced 2026-03-18 15:45:56 +00:00
Layout created for single screen app
This commit is contained in:
20
lib/Utils/ViewState.dart
Normal file
20
lib/Utils/ViewState.dart
Normal file
@@ -0,0 +1,20 @@
|
||||
import 'package:sealed_annotations/sealed_annotations.dart';
|
||||
|
||||
@Sealed()
|
||||
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);
|
||||
}
|
||||
Reference in New Issue
Block a user