TF-3450 Add image attachment preview

This commit is contained in:
DatDang
2025-02-19 16:22:00 +07:00
committed by Dat H. Pham
parent 5cecdd2e6a
commit 3645fe58f9
7 changed files with 137 additions and 1 deletions
@@ -0,0 +1,31 @@
import 'dart:typed_data';
import 'package:core/presentation/state/failure.dart';
import 'package:core/presentation/state/success.dart';
import 'package:model/email/attachment.dart';
class GettingImageDataFromAttachment extends LoadingState {
GettingImageDataFromAttachment({required this.attachment});
final Attachment attachment;
@override
List<Object> get props => [attachment];
}
class GetImageDataFromAttachmentSuccess extends UIState {
GetImageDataFromAttachmentSuccess({
required this.attachment,
required this.data,
});
final Attachment attachment;
final Uint8List data;
@override
List<Object> get props => [attachment, data];
}
class GetImageDataFromAttachmentFailure extends FeatureFailure {
GetImageDataFromAttachmentFailure({super.exception});
}