fix: Avoid using MediaQuery.of()
This commit is contained in:
parent
92c5549f74
commit
d2c2fd48d4
13 changed files with 20 additions and 21 deletions
|
|
@ -21,7 +21,7 @@ class ChatEmojiPicker extends StatelessWidget {
|
|||
clipBehavior: Clip.hardEdge,
|
||||
decoration: const BoxDecoration(),
|
||||
height: controller.showEmojiPicker
|
||||
? MediaQuery.of(context).size.height / 2
|
||||
? MediaQuery.sizeOf(context).height / 2
|
||||
: 0,
|
||||
child: controller.showEmojiPicker
|
||||
? DefaultTabController(
|
||||
|
|
|
|||
|
|
@ -274,8 +274,8 @@ class ChatView extends StatelessWidget {
|
|||
cacheKey: accountConfig.wallpaperUrl.toString(),
|
||||
uri: accountConfig.wallpaperUrl,
|
||||
fit: BoxFit.cover,
|
||||
height: MediaQuery.of(context).size.height,
|
||||
width: MediaQuery.of(context).size.width,
|
||||
height: MediaQuery.sizeOf(context).height,
|
||||
width: MediaQuery.sizeOf(context).width,
|
||||
isThumbnail: false,
|
||||
placeholder: (_) => Container(),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -463,8 +463,8 @@ class Message extends StatelessWidget {
|
|||
colors: colors,
|
||||
ignore: noBubble ||
|
||||
!ownMessage ||
|
||||
MediaQuery.of(context)
|
||||
.highContrast,
|
||||
MediaQuery.highContrastOf(
|
||||
context),
|
||||
scrollController:
|
||||
scrollController,
|
||||
child: Container(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue