diff --git a/flutter_quill_extensions/lib/embeds/builders.dart b/flutter_quill_extensions/lib/embeds/builders.dart index 64bcc5f1..5d9e0236 100644 --- a/flutter_quill_extensions/lib/embeds/builders.dart +++ b/flutter_quill_extensions/lib/embeds/builders.dart @@ -232,16 +232,11 @@ class ImageEmbedBuilder extends EmbedBuilder { return sb.toString(); } - // TODO: Please consider add bool - // property in - // replaceStyleString that will use either - // mobileWidth or width based on that - // property - // but that require changes to the - // flutter_quill - // and it should be - // published and then we can - // change it from flutter_quill_extensions + // TODO: When update flutter_quill + // we should update flutter_quill_extensions + // to use the latest version and use + // base.replaceStyleStringWithSize() + // instead of replaceStyleString final attr = base.isMobile() ? base.replaceStyleString( diff --git a/lib/src/utils/string.dart b/lib/src/utils/string.dart index 3de84e65..f639c716 100644 --- a/lib/src/utils/string.dart +++ b/lib/src/utils/string.dart @@ -19,6 +19,20 @@ Map parseKeyValuePairs(String s, Set targetKeys) { return result; } +@Deprecated('Use replaceStyleStringWithSize instead') +String replaceStyleString( + String s, + double width, + double height, +) { + return replaceStyleStringWithSize( + s, + width: width, + height: height, + isMobile: true, + ); +} + String replaceStyleStringWithSize( String s, { required double width,