TF-761 Implement reduce image size when add inline image
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
|
||||
import 'package:core/presentation/extensions/html_extension.dart';
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:model/model.dart';
|
||||
import 'package:tmail_ui_user/features/composer/presentation/model/image_source.dart';
|
||||
@@ -9,7 +8,7 @@ class InlineImage with EquatableMixin {
|
||||
final String? link;
|
||||
final FileInfo? fileInfo;
|
||||
final String? cid;
|
||||
final String? base64;
|
||||
final String? base64Uri;
|
||||
|
||||
InlineImage(
|
||||
this.source,
|
||||
@@ -17,21 +16,10 @@ class InlineImage with EquatableMixin {
|
||||
this.link,
|
||||
this.fileInfo,
|
||||
this.cid,
|
||||
this.base64,
|
||||
this.base64Uri,
|
||||
}
|
||||
);
|
||||
|
||||
Future<String> generateImgTagHtml({double? maxWithEditor}) async {
|
||||
if (source == ImageSource.local && base64 != null) {
|
||||
return base64!.generateImageBase64(
|
||||
cid!,
|
||||
fileInfo!.fileExtension,
|
||||
fileInfo!.fileName,
|
||||
maxWithEditor: maxWithEditor);
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
@override
|
||||
List<Object?> get props => [source, link, fileInfo, cid];
|
||||
List<Object?> get props => [source, link, fileInfo, cid, base64Uri];
|
||||
}
|
||||
Reference in New Issue
Block a user