TF-1961 Transform html email content in composer

(cherry picked from commit f5470c130744242195b265a0ea4aad044ad8e740)
This commit is contained in:
dab246
2023-08-18 19:42:04 +07:00
committed by Dat Vu
parent e06d35f1e1
commit 8eed49fd73
45 changed files with 1139 additions and 644 deletions
@@ -6,41 +6,38 @@ import 'package:model/email/attachment.dart';
class GetEmailContentLoading extends LoadingState {}
class GetEmailContentSuccess extends UIState {
final String emailContent;
final String emailContentDisplayed;
final String htmlEmailContent;
final List<Attachment> attachments;
final Email? emailCurrent;
GetEmailContentSuccess({
required this.emailContent,
required this.emailContentDisplayed,
required this.attachments,
required this.emailCurrent
});
@override
List<Object?> get props => [
emailContent,
emailContentDisplayed,
attachments,
emailCurrent
];
}
class GetEmailContentFromCacheSuccess extends UIState {
final String emailContent;
final List<Attachment> attachments;
final Email? emailCurrent;
GetEmailContentFromCacheSuccess({
required this.emailContent,
required this.htmlEmailContent,
required this.attachments,
this.emailCurrent
});
@override
List<Object?> get props => [
emailContent,
htmlEmailContent,
attachments,
emailCurrent
];
}
class GetEmailContentFromCacheSuccess extends UIState {
final String htmlEmailContent;
final List<Attachment> attachments;
final Email? emailCurrent;
GetEmailContentFromCacheSuccess({
required this.htmlEmailContent,
required this.attachments,
this.emailCurrent
});
@override
List<Object?> get props => [
htmlEmailContent,
attachments,
emailCurrent,
];
@@ -0,0 +1,18 @@
import 'package:core/presentation/state/failure.dart';
import 'package:core/presentation/state/success.dart';
class TransformHtmlEmailContentLoading extends LoadingState {}
class TransformHtmlEmailContentSuccess extends UIState {
final String htmlContent;
TransformHtmlEmailContentSuccess(this.htmlContent);
@override
List<Object?> get props => [htmlContent];
}
class TransformHtmlEmailContentFailure extends FeatureFailure {
TransformHtmlEmailContentFailure(dynamic exception) : super(exception: exception);
}