refactor: Update to Dart 3.10 with . shorthands
This commit is contained in:
parent
75a37f3f7c
commit
1ea649f01e
167 changed files with 3351 additions and 3912 deletions
|
|
@ -15,8 +15,9 @@ extension LocalizedBody on Event {
|
|||
showFutureLoadingDialog(
|
||||
context: context,
|
||||
futureWithProgress: (onProgress) {
|
||||
final fileSize =
|
||||
infoMap['size'] is int ? infoMap['size'] as int : null;
|
||||
final fileSize = infoMap['size'] is int
|
||||
? infoMap['size'] as int
|
||||
: null;
|
||||
return downloadAndDecryptAttachment(
|
||||
onDownloadProgress: fileSize == null
|
||||
? null
|
||||
|
|
@ -47,8 +48,11 @@ extension LocalizedBody on Event {
|
|||
thumbnailInfoMap['size'] < room.client.database.maxFileSize;
|
||||
|
||||
bool get showThumbnail =>
|
||||
[MessageTypes.Image, MessageTypes.Sticker, MessageTypes.Video]
|
||||
.contains(messageType) &&
|
||||
[
|
||||
MessageTypes.Image,
|
||||
MessageTypes.Sticker,
|
||||
MessageTypes.Video,
|
||||
].contains(messageType) &&
|
||||
(kIsWeb ||
|
||||
isAttachmentSmallEnough ||
|
||||
isThumbnailSmallEnough ||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue