Init core module
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import 'package:core/core.dart';
|
||||
import 'package:dartz/dartz.dart';
|
||||
import 'package:meta/meta.dart';
|
||||
import 'package:equatable/equatable.dart';
|
||||
|
||||
@immutable
|
||||
abstract class AppState with EquatableMixin {
|
||||
final Either<Failure, Success> viewState;
|
||||
|
||||
AppState(this.viewState);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [viewState];
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
|
||||
abstract class Failure extends Equatable {}
|
||||
|
||||
abstract class FeatureFailure extends Failure {}
|
||||
@@ -0,0 +1,15 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
|
||||
abstract class Success with EquatableMixin {}
|
||||
|
||||
abstract class ViewState extends Success {}
|
||||
|
||||
class UIState extends ViewState {
|
||||
static final idle = UIState();
|
||||
static final loading = UIState();
|
||||
|
||||
UIState() : super();
|
||||
|
||||
@override
|
||||
List<Object?> get props => [];
|
||||
}
|
||||
Reference in New Issue
Block a user