Skip to content

Commit 122b3c0

Browse files
committed
Refactor code
1 parent 0d64647 commit 122b3c0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/src/widgets/embeds/default_embed_builder.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,14 @@ Widget defaultEmbedBuilder(BuildContext context, QuillController controller,
6767
showCupertinoModalPopup<void>(
6868
context: context,
6969
builder: (context) {
70+
final _screenSize = MediaQuery.of(context).size;
7071
return ImageResizer(
7172
imageNode: res.item2!,
7273
offset: res.item1!,
7374
imageWidth: _widthHeight?.item1,
7475
imageHeight: _widthHeight?.item2,
75-
maxWidth: MediaQuery.of(context).size.width,
76-
maxHeight:
77-
MediaQuery.of(context).size.height);
76+
maxWidth: _screenSize.width,
77+
maxHeight: _screenSize.height);
7878
});
7979
},
8080
);

0 commit comments

Comments
 (0)