TF-3487 Create retriable failure state and toast
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import 'package:core/presentation/state/success.dart';
|
||||
import 'package:dartz/dartz.dart';
|
||||
import 'package:equatable/equatable.dart';
|
||||
|
||||
abstract class Failure with EquatableMixin {
|
||||
@@ -8,9 +10,10 @@ abstract class Failure with EquatableMixin {
|
||||
|
||||
abstract class FeatureFailure extends Failure {
|
||||
final dynamic exception;
|
||||
final Stream<Either<Failure, Success>>? onRetry;
|
||||
|
||||
FeatureFailure({this.exception});
|
||||
FeatureFailure({this.exception, this.onRetry});
|
||||
|
||||
@override
|
||||
List<Object?> get props => [exception];
|
||||
List<Object?> get props => [exception, onRetry];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user