fix: Avoid using MediaQuery.of()
This commit is contained in:
parent
92c5549f74
commit
d2c2fd48d4
13 changed files with 20 additions and 21 deletions
|
|
@ -73,7 +73,7 @@ class _MxcImageState extends State<MxcImage> {
|
|||
final event = widget.event;
|
||||
|
||||
if (uri != null) {
|
||||
final devicePixelRatio = MediaQuery.of(context).devicePixelRatio;
|
||||
final devicePixelRatio = MediaQuery.devicePixelRatioOf(context);
|
||||
final width = widget.width;
|
||||
final realWidth = width == null ? null : width * devicePixelRatio;
|
||||
final height = widget.height;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue