fix: Avoid using MediaQuery.of()
This commit is contained in:
parent
92c5549f74
commit
d2c2fd48d4
13 changed files with 20 additions and 21 deletions
|
|
@ -111,7 +111,7 @@ class ImageViewerController extends State<ImageViewer> {
|
|||
void onInteractionEnds(ScaleEndDetails endDetails) {
|
||||
if (PlatformInfos.usesTouchscreen == false) {
|
||||
if (endDetails.velocity.pixelsPerSecond.dy >
|
||||
MediaQuery.of(context).size.height * maxScaleFactor) {
|
||||
MediaQuery.sizeOf(context).height * maxScaleFactor) {
|
||||
Navigator.of(context, rootNavigator: false).pop();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ class EventVideoPlayerState extends State<EventVideoPlayer> {
|
|||
final infoMap = widget.event.content.tryGetMap<String, Object?>('info');
|
||||
final videoWidth = infoMap?.tryGet<int>('w') ?? 400;
|
||||
final videoHeight = infoMap?.tryGet<int>('h') ?? 300;
|
||||
final height = MediaQuery.of(context).size.height - 52;
|
||||
final height = MediaQuery.sizeOf(context).height - 52;
|
||||
final width = videoWidth * (height / videoHeight);
|
||||
|
||||
final chewieController = _chewieController;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue