TF-3487 Create retriable failure state and toast

This commit is contained in:
DatDang
2025-02-24 10:37:07 +07:00
committed by Dat H. Pham
parent e595aa02a0
commit 91dddff18d
6 changed files with 245 additions and 2 deletions
+5 -2
View File
@@ -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];
}