TF-4195 Add interactor/repository/datasource to feature add a Label to an email

This commit is contained in:
dab246
2025-12-12 01:32:51 +07:00
committed by Dat H. Pham
parent b6027e996d
commit 0d247b30d7
19 changed files with 215 additions and 49 deletions
@@ -0,0 +1,29 @@
import 'package:core/presentation/state/failure.dart';
import 'package:core/presentation/state/success.dart';
import 'package:jmap_dart_client/jmap/mail/email/email.dart';
import 'package:jmap_dart_client/jmap/mail/email/keyword_identifier.dart';
class AddingALabelToAnEmail extends LoadingState {}
class AddALabelToAnEmailSuccess extends UIState {
final EmailId emailId;
final KeyWordIdentifier labelKeyword;
final String labelDisplay;
AddALabelToAnEmailSuccess(this.emailId, this.labelKeyword, this.labelDisplay);
@override
List<Object> get props => [emailId, labelKeyword, labelDisplay];
}
class AddALabelToAnEmailFailure extends FeatureFailure {
final String labelDisplay;
AddALabelToAnEmailFailure({
dynamic exception,
required this.labelDisplay,
}) : super(exception: exception);
@override
List<Object?> get props => [...super.props, labelDisplay];
}