diff --git a/analysis_options.yaml b/analysis_options.yaml index 6de1bcc6..2c5e3c25 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -12,7 +12,7 @@ linter: analyzer: errors: todo: ignore - import_of_legacy_library_into_null_safe: ignore + use_build_context_synchronously: ignore exclude: - lib/generated_plugin_registrant.dart - lib/l10n/*.dart diff --git a/lib/main.dart b/lib/main.dart index 5473b25a..3f0f937b 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -80,10 +80,10 @@ class FluffyChatApp extends StatefulWidget { static bool gotInitialLink = false; @override - _FluffyChatAppState createState() => _FluffyChatAppState(); + FluffyChatAppState createState() => FluffyChatAppState(); } -class _FluffyChatAppState extends State { +class FluffyChatAppState extends State { GlobalKey? _router; bool? columnMode; String? _initialUrl; diff --git a/lib/pages/add_story/invite_story_page.dart b/lib/pages/add_story/invite_story_page.dart index 76ad006b..1c091fe5 100644 --- a/lib/pages/add_story/invite_story_page.dart +++ b/lib/pages/add_story/invite_story_page.dart @@ -18,10 +18,10 @@ class InviteStoryPage extends StatefulWidget { }) : super(key: key); @override - _InviteStoryPageState createState() => _InviteStoryPageState(); + InviteStoryPageState createState() => InviteStoryPageState(); } -class _InviteStoryPageState extends State { +class InviteStoryPageState extends State { Set _undecided = {}; final Set _invite = {}; diff --git a/lib/pages/bootstrap/bootstrap_dialog.dart b/lib/pages/bootstrap/bootstrap_dialog.dart index e4d88a3c..09c221a5 100644 --- a/lib/pages/bootstrap/bootstrap_dialog.dart +++ b/lib/pages/bootstrap/bootstrap_dialog.dart @@ -39,10 +39,10 @@ class BootstrapDialog extends StatefulWidget { ); @override - _BootstrapDialogState createState() => _BootstrapDialogState(); + BootstrapDialogState createState() => BootstrapDialogState(); } -class _BootstrapDialogState extends State { +class BootstrapDialogState extends State { final TextEditingController _recoveryKeyTextEditingController = TextEditingController(); diff --git a/lib/pages/chat/chat_input_row.dart b/lib/pages/chat/chat_input_row.dart index 346b3b44..2152bad6 100644 --- a/lib/pages/chat/chat_input_row.dart +++ b/lib/pages/chat/chat_input_row.dart @@ -75,6 +75,13 @@ class ChatInputRow extends StatelessWidget { ] : [ KeyBoardShortcuts( + keysToPress: { + LogicalKeyboardKey.altLeft, + LogicalKeyboardKey.keyA + }, + onKeysPressed: () => + controller.onAddPopupMenuButtonSelected('file'), + helpLabel: L10n.of(context)!.sendFile, child: AnimatedContainer( duration: const Duration(milliseconds: 200), height: 56, @@ -168,18 +175,17 @@ class ChatInputRow extends StatelessWidget { ], ), ), - keysToPress: { - LogicalKeyboardKey.altLeft, - LogicalKeyboardKey.keyA - }, - onKeysPressed: () => - controller.onAddPopupMenuButtonSelected('file'), - helpLabel: L10n.of(context)!.sendFile, ), Container( height: 56, alignment: Alignment.center, child: KeyBoardShortcuts( + keysToPress: { + LogicalKeyboardKey.altLeft, + LogicalKeyboardKey.keyE + }, + onKeysPressed: controller.emojiPickerAction, + helpLabel: L10n.of(context)!.emojis, child: IconButton( tooltip: L10n.of(context)!.emojis, icon: PageTransitionSwitcher( @@ -192,8 +198,8 @@ class ChatInputRow extends StatelessWidget { animation: primaryAnimation, secondaryAnimation: secondaryAnimation, transitionType: SharedAxisTransitionType.scaled, - child: child, fillColor: Colors.transparent, + child: child, ); }, child: Icon( @@ -205,12 +211,6 @@ class ChatInputRow extends StatelessWidget { ), onPressed: controller.emojiPickerAction, ), - keysToPress: { - LogicalKeyboardKey.altLeft, - LogicalKeyboardKey.keyE - }, - onKeysPressed: controller.emojiPickerAction, - helpLabel: L10n.of(context)!.emojis, ), ), if (controller.matrix!.isMultiAccount && diff --git a/lib/pages/chat/cupertino_widgets_bottom_sheet.dart b/lib/pages/chat/cupertino_widgets_bottom_sheet.dart index 90794756..0bc7ac34 100644 --- a/lib/pages/chat/cupertino_widgets_bottom_sheet.dart +++ b/lib/pages/chat/cupertino_widgets_bottom_sheet.dart @@ -21,8 +21,8 @@ class CupertinoWidgetsBottomSheet extends StatelessWidget { (widget) => Link( builder: (context, callback) { return CupertinoActionSheetAction( - child: Text(widget.name ?? widget.url), onPressed: callback ?? () {}, + child: Text(widget.name ?? widget.url), ); }, target: LinkTarget.blank, @@ -41,8 +41,8 @@ class CupertinoWidgetsBottomSheet extends StatelessWidget { }, ), CupertinoActionSheetAction( - child: Text(L10n.of(context)!.cancel), onPressed: Navigator.of(context).pop, + child: Text(L10n.of(context)!.cancel), ), ], ); diff --git a/lib/pages/chat/encryption_button.dart b/lib/pages/chat/encryption_button.dart index c5747401..2d3edee6 100644 --- a/lib/pages/chat/encryption_button.dart +++ b/lib/pages/chat/encryption_button.dart @@ -14,10 +14,10 @@ class EncryptionButton extends StatefulWidget { final Room room; const EncryptionButton(this.room, {Key? key}) : super(key: key); @override - _EncryptionButtonState createState() => _EncryptionButtonState(); + EncryptionButtonState createState() => EncryptionButtonState(); } -class _EncryptionButtonState extends State { +class EncryptionButtonState extends State { StreamSubscription? _onSyncSub; void _enableEncryptionAction() async { diff --git a/lib/pages/chat/events/audio_player.dart b/lib/pages/chat/events/audio_player.dart index c2620024..98c0bcb4 100644 --- a/lib/pages/chat/events/audio_player.dart +++ b/lib/pages/chat/events/audio_player.dart @@ -23,12 +23,12 @@ class AudioPlayerWidget extends StatefulWidget { : super(key: key); @override - _AudioPlayerState createState() => _AudioPlayerState(); + AudioPlayerState createState() => AudioPlayerState(); } enum AudioPlayerStatus { notDownloaded, downloading, downloaded } -class _AudioPlayerState extends State { +class AudioPlayerState extends State { AudioPlayerStatus status = AudioPlayerStatus.notDownloaded; final AudioPlayer audioPlayer = AudioPlayer(); diff --git a/lib/pages/chat/events/reply_content.dart b/lib/pages/chat/events/reply_content.dart index cde75eb1..6716bae9 100644 --- a/lib/pages/chat/events/reply_content.dart +++ b/lib/pages/chat/events/reply_content.dart @@ -87,10 +87,7 @@ class ReplyContent extends StatelessWidget { future: displayEvent.fetchSenderUser(), builder: (context, snapshot) { return Text( - (snapshot.data?.calcDisplayname() ?? - displayEvent.senderFromMemoryOrFallback - .calcDisplayname()) + - ':', + '${snapshot.data?.calcDisplayname() ?? displayEvent.senderFromMemoryOrFallback.calcDisplayname()}:', maxLines: 1, overflow: TextOverflow.ellipsis, style: TextStyle( diff --git a/lib/pages/chat/events/sticker.dart b/lib/pages/chat/events/sticker.dart index 4e1618e6..041eae7a 100644 --- a/lib/pages/chat/events/sticker.dart +++ b/lib/pages/chat/events/sticker.dart @@ -13,10 +13,10 @@ class Sticker extends StatefulWidget { const Sticker(this.event, {Key? key}) : super(key: key); @override - _StickerState createState() => _StickerState(); + StickerState createState() => StickerState(); } -class _StickerState extends State { +class StickerState extends State { bool? animated; @override diff --git a/lib/pages/chat/events/video_player.dart b/lib/pages/chat/events/video_player.dart index 7443eea0..c7c197f9 100644 --- a/lib/pages/chat/events/video_player.dart +++ b/lib/pages/chat/events/video_player.dart @@ -20,10 +20,10 @@ class EventVideoPlayer extends StatefulWidget { const EventVideoPlayer(this.event, {Key? key}) : super(key: key); @override - _EventVideoPlayerState createState() => _EventVideoPlayerState(); + EventVideoPlayerState createState() => EventVideoPlayerState(); } -class _EventVideoPlayerState extends State { +class EventVideoPlayerState extends State { ChewieController? _chewieManager; bool _isDownloading = false; String? _networkUri; diff --git a/lib/pages/chat/input_bar.dart b/lib/pages/chat/input_bar.dart index 4e39268d..555fdbe6 100644 --- a/lib/pages/chat/input_bar.dart +++ b/lib/pages/chat/input_bar.dart @@ -226,7 +226,7 @@ class InputBar extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text('/' + command, + Text('/$command', style: const TextStyle(fontFamily: 'monospace')), Text( hint, @@ -319,14 +319,14 @@ class InputBar extends StatelessWidget { : controller!.text.substring(controller!.selection.baseOffset + 1); var insertText = ''; if (suggestion['type'] == 'command') { - insertText = suggestion['name']! + ' '; + insertText = '${suggestion['name']!} '; startText = replaceText.replaceAllMapped( RegExp(r'^(/\w*)$'), - (Match m) => '/' + insertText, + (Match m) => '/$insertText', ); } if (suggestion['type'] == 'emoji') { - insertText = suggestion['emoji']! + ' '; + insertText = '${suggestion['emoji']!} '; startText = replaceText.replaceAllMapped( suggestion['current_word']!, (Match m) => insertText, @@ -351,21 +351,21 @@ class InputBar extends StatelessWidget { break; } } - insertText = ':${isUnique ? '' : insertPack! + '~'}$insertEmote: '; + insertText = ':${isUnique ? '' : '${insertPack!}~'}$insertEmote: '; startText = replaceText.replaceAllMapped( RegExp(r'(\s|^)(:(?:[-\w]+~)?[-\w]+)$'), (Match m) => '${m[1]}$insertText', ); } if (suggestion['type'] == 'user') { - insertText = suggestion['mention']! + ' '; + insertText = '${suggestion['mention']!} '; startText = replaceText.replaceAllMapped( RegExp(r'(\s|^)(@[-\w]+)$'), (Match m) => '${m[1]}$insertText', ); } if (suggestion['type'] == 'room') { - insertText = suggestion['mxid']! + ' '; + insertText = '${suggestion['mxid']!} '; startText = replaceText.replaceAllMapped( RegExp(r'(\s|^)(#[-\w]+)$'), (Match m) => '${m[1]}$insertText', @@ -401,9 +401,7 @@ class InputBar extends StatelessWidget { final val = controller!.value; final selection = val.selection.start; final messageWithoutNewLine = - controller!.text.substring(0, val.selection.start) + - '\n' + - controller!.text.substring(val.selection.end); + '${controller!.text.substring(0, val.selection.start)}\n${controller!.text.substring(val.selection.end)}'; controller!.value = TextEditingValue( text: messageWithoutNewLine, selection: TextSelection.fromPosition( diff --git a/lib/pages/chat/recording_dialog.dart b/lib/pages/chat/recording_dialog.dart index d5e8fb12..27a4fca7 100644 --- a/lib/pages/chat/recording_dialog.dart +++ b/lib/pages/chat/recording_dialog.dart @@ -19,10 +19,10 @@ class RecordingDialog extends StatefulWidget { }) : super(key: key); @override - _RecordingDialogState createState() => _RecordingDialogState(); + RecordingDialogState createState() => RecordingDialogState(); } -class _RecordingDialogState extends State { +class RecordingDialogState extends State { Timer? _recorderSubscription; Duration _duration = Duration.zero; diff --git a/lib/pages/chat/send_file_dialog.dart b/lib/pages/chat/send_file_dialog.dart index d88978c4..7d2e89f7 100644 --- a/lib/pages/chat/send_file_dialog.dart +++ b/lib/pages/chat/send_file_dialog.dart @@ -18,10 +18,10 @@ class SendFileDialog extends StatefulWidget { }) : super(key: key); @override - _SendFileDialogState createState() => _SendFileDialogState(); + SendFileDialogState createState() => SendFileDialogState(); } -class _SendFileDialogState extends State { +class SendFileDialogState extends State { bool origImage = false; /// Images smaller than 20kb don't need compression. @@ -92,7 +92,7 @@ class _SendFileDialogState extends State { ), InkWell( onTap: () => setState(() => origImage = !origImage), - child: Text(L10n.of(context)!.sendOriginal + ' ($sizeString)'), + child: Text('${L10n.of(context)!.sendOriginal} ($sizeString)'), ), ], ) diff --git a/lib/pages/chat/send_location_dialog.dart b/lib/pages/chat/send_location_dialog.dart index 4c82eaaa..af9acf55 100644 --- a/lib/pages/chat/send_location_dialog.dart +++ b/lib/pages/chat/send_location_dialog.dart @@ -20,10 +20,10 @@ class SendLocationDialog extends StatefulWidget { }) : super(key: key); @override - _SendLocationDialogState createState() => _SendLocationDialogState(); + SendLocationDialogState createState() => SendLocationDialogState(); } -class _SendLocationDialogState extends State { +class SendLocationDialogState extends State { bool disabled = false; bool denied = false; bool isSending = false; @@ -54,19 +54,19 @@ class _SendLocationDialogState extends State { return; } try { - Position _position; + Position position; try { - _position = await Geolocator.getCurrentPosition( + position = await Geolocator.getCurrentPosition( desiredAccuracy: LocationAccuracy.best, timeLimit: const Duration(seconds: 30), ); } on TimeoutException { - _position = await Geolocator.getCurrentPosition( + position = await Geolocator.getCurrentPosition( desiredAccuracy: LocationAccuracy.medium, timeLimit: const Duration(seconds: 30), ); } - setState(() => position = _position); + setState(() => position = position); } catch (e) { setState(() => error = e); } diff --git a/lib/pages/chat/sticker_picker_dialog.dart b/lib/pages/chat/sticker_picker_dialog.dart index d76f772c..e8ed706f 100644 --- a/lib/pages/chat/sticker_picker_dialog.dart +++ b/lib/pages/chat/sticker_picker_dialog.dart @@ -24,7 +24,7 @@ class StickerPickerDialogState extends State { final packSlugs = stickerPacks.keys.toList(); // ignore: prefer_function_declarations_over_variables - final _packBuilder = (BuildContext context, int packIndex) { + final packBuilder = (BuildContext context, int packIndex) { final pack = stickerPacks[packSlugs[packIndex]]!; final filteredImagePackImageEntried = pack.images.entries.toList(); if (searchFilter?.isNotEmpty ?? false) { @@ -128,7 +128,7 @@ class StickerPickerDialogState extends State { ), SliverList( delegate: SliverChildBuilderDelegate( - _packBuilder, + packBuilder, childCount: packSlugs.length, )), ], diff --git a/lib/pages/chat_details/chat_details.dart b/lib/pages/chat_details/chat_details.dart index 655f61f5..b4afab8b 100644 --- a/lib/pages/chat_details/chat_details.dart +++ b/lib/pages/chat_details/chat_details.dart @@ -185,7 +185,7 @@ class ChatDetailsController extends State { await showFutureLoadingDialog( context: context, future: () => - room.client.setRoomAlias('#' + input.single + ':' + domain!, room.id), + room.client.setRoomAlias('#${input.single}:${domain!}', room.id), ); } diff --git a/lib/pages/chat_encryption_settings/chat_encryption_settings_view.dart b/lib/pages/chat_encryption_settings/chat_encryption_settings_view.dart index 581bff85..585ec777 100644 --- a/lib/pages/chat_encryption_settings/chat_encryption_settings_view.dart +++ b/lib/pages/chat_encryption_settings/chat_encryption_settings_view.dart @@ -52,9 +52,8 @@ class ChatEncryptionSettingsView extends StatelessWidget { builder: (BuildContext context, snapshot) { if (snapshot.hasError) { return Center( - child: Text(L10n.of(context)!.oopsSomethingWentWrong + - ': ' + - snapshot.error.toString()), + child: Text( + '${L10n.of(context)!.oopsSomethingWentWrong}: ${snapshot.error}'), ); } if (!snapshot.hasData) { diff --git a/lib/pages/chat_list/chat_list_body.dart b/lib/pages/chat_list/chat_list_body.dart index a59b7e9d..2dcd5da2 100644 --- a/lib/pages/chat_list/chat_list_body.dart +++ b/lib/pages/chat_list/chat_list_body.dart @@ -160,11 +160,11 @@ class _ChatListViewBodyState extends State { child: ListTile( leading: CircleAvatar( radius: Avatar.defaultSize / 2, - child: const Icon(Icons.enhanced_encryption_outlined), backgroundColor: Theme.of(context).colorScheme.surfaceVariant, foregroundColor: Theme.of(context).colorScheme.onSurfaceVariant, + child: const Icon(Icons.enhanced_encryption_outlined), ), title: Text( (Matrix.of(context) @@ -402,6 +402,7 @@ class _SpaceRoomListTopBarState extends State { child: Column( children: [ Padding( + padding: const EdgeInsets.all(8), child: LinkText( text: (widget.controller.activeSpacesEntry as SpaceSpacesEntry) .space @@ -414,7 +415,6 @@ class _SpaceRoomListTopBarState extends State { ), onLinkTap: (url) => UrlLauncher(context, url).launchUrl(), ), - padding: const EdgeInsets.all(8), ), const Divider(), ], diff --git a/lib/pages/chat_list/chat_list_item.dart b/lib/pages/chat_list/chat_list_item.dart index 52a9bab6..8646e395 100644 --- a/lib/pages/chat_list/chat_list_item.dart +++ b/lib/pages/chat_list/chat_list_item.dart @@ -4,7 +4,6 @@ import 'package:adaptive_dialog/adaptive_dialog.dart'; import 'package:flutter_gen/gen_l10n/l10n.dart'; import 'package:future_loading_dialog/future_loading_dialog.dart'; import 'package:matrix/matrix.dart'; -import 'package:pedantic/pedantic.dart'; import 'package:vrouter/vrouter.dart'; import 'package:fluffychat/config/app_config.dart'; @@ -108,7 +107,7 @@ class ChatListItem extends StatelessWidget { ), ); } else { - unawaited(room.sendEvent(Matrix.of(context).shareContent!)); + room.sendEvent(Matrix.of(context).shareContent!); } Matrix.of(context).shareContent = null; } diff --git a/lib/pages/chat_list/chat_list_view.dart b/lib/pages/chat_list/chat_list_view.dart index 8fc6b91c..6913fe3b 100644 --- a/lib/pages/chat_list/chat_list_view.dart +++ b/lib/pages/chat_list/chat_list_view.dart @@ -37,8 +37,6 @@ class ChatListView extends StatelessWidget { bottomNavigationBar: const ConnectionStatusHeader(), floatingActionButton: selectMode == SelectMode.normal ? KeyBoardShortcuts( - child: - StartChatFloatingActionButton(controller: controller), keysToPress: { LogicalKeyboardKey.controlLeft, LogicalKeyboardKey.keyN @@ -46,6 +44,8 @@ class ChatListView extends StatelessWidget { onKeysPressed: () => VRouter.of(context).to('/newprivatechat'), helpLabel: L10n.of(context)!.newChat, + child: + StartChatFloatingActionButton(controller: controller), ) : null, ), diff --git a/lib/pages/chat_list/client_chooser_button.dart b/lib/pages/chat_list/client_chooser_button.dart index 6d463830..76889af9 100644 --- a/lib/pages/chat_list/client_chooser_button.dart +++ b/lib/pages/chat_list/client_chooser_button.dart @@ -107,23 +107,22 @@ class ClientChooserButton extends StatelessWidget { ...List.generate( clientCount, (index) => KeyBoardShortcuts( - child: Container(), keysToPress: _buildKeyboardShortcut(index + 1), helpLabel: L10n.of(context)!.switchToAccount(index + 1), onKeysPressed: () => _handleKeyboardShortcut(matrix, index), + child: Container(), ), ), KeyBoardShortcuts( - child: Container(), keysToPress: { LogicalKeyboardKey.controlLeft, LogicalKeyboardKey.tab }, helpLabel: L10n.of(context)!.nextAccount, onKeysPressed: () => _nextAccount(matrix), + child: Container(), ), KeyBoardShortcuts( - child: Container(), keysToPress: { LogicalKeyboardKey.controlLeft, LogicalKeyboardKey.shiftLeft, @@ -131,8 +130,11 @@ class ClientChooserButton extends StatelessWidget { }, helpLabel: L10n.of(context)!.previousAccount, onKeysPressed: () => _previousAccount(matrix), + child: Container(), ), PopupMenuButton( + onSelected: _clientSelected, + itemBuilder: _bundleMenuItems, child: Material( color: Colors.transparent, borderRadius: BorderRadius.circular(99), @@ -144,8 +146,6 @@ class ClientChooserButton extends StatelessWidget { fontSize: 12, ), ), - onSelected: _clientSelected, - itemBuilder: _bundleMenuItems, ), ], ), diff --git a/lib/pages/chat_list/recommended_room_list_item.dart b/lib/pages/chat_list/recommended_room_list_item.dart index 210bd822..0abe574b 100644 --- a/lib/pages/chat_list/recommended_room_list_item.dart +++ b/lib/pages/chat_list/recommended_room_list_item.dart @@ -44,12 +44,12 @@ class RecommendedRoomListItem extends StatelessWidget { TextSpan(children: [ WidgetSpan( child: Tooltip( + message: L10n.of(context)! + .numberRoomMembers(room.numJoinedMembers), child: const Icon( Icons.people_outlined, size: 20, ), - message: L10n.of(context)! - .numberRoomMembers(room.numJoinedMembers), ), alignment: PlaceholderAlignment.middle, baseline: TextBaseline.alphabetic), diff --git a/lib/pages/chat_list/spaces_drawer_entry.dart b/lib/pages/chat_list/spaces_drawer_entry.dart index 87d06ec7..220d5242 100644 --- a/lib/pages/chat_list/spaces_drawer_entry.dart +++ b/lib/pages/chat_list/spaces_drawer_entry.dart @@ -23,10 +23,10 @@ class SpacesDrawerEntry extends StatelessWidget { final active = controller.activeSpacesEntry == entry.spacesEntry; final leading = room == null ? CircleAvatar( - child: space.getIcon(active), radius: Avatar.defaultSize / 2, backgroundColor: Theme.of(context).colorScheme.secondary, foregroundColor: Theme.of(context).colorScheme.onSecondary, + child: space.getIcon(active), ) : Avatar( mxContent: room.avatar, diff --git a/lib/pages/chat_list/spaces_hierarchy_proposal.dart b/lib/pages/chat_list/spaces_hierarchy_proposal.dart index 65574283..0280d018 100644 --- a/lib/pages/chat_list/spaces_hierarchy_proposal.dart +++ b/lib/pages/chat_list/spaces_hierarchy_proposal.dart @@ -133,8 +133,8 @@ class _SpacesHierarchyProposalsState extends State { animation: primaryAnimation, secondaryAnimation: secondaryAnimation, transitionType: SharedAxisTransitionType.scaled, - child: child, fillColor: Colors.transparent, + child: child, ); }, layoutBuilder: (children) => Stack( diff --git a/lib/pages/chat_list/start_chat_fab.dart b/lib/pages/chat_list/start_chat_fab.dart index b26839a5..35b275e6 100644 --- a/lib/pages/chat_list/start_chat_fab.dart +++ b/lib/pages/chat_list/start_chat_fab.dart @@ -26,8 +26,8 @@ class StartChatFloatingActionButton extends StatelessWidget { animation: primaryAnimation, secondaryAnimation: secondaryAnimation, transitionType: SharedAxisTransitionType.horizontal, - child: child, fillColor: Colors.transparent, + child: child, ); }, layoutBuilder: (children) => Stack( diff --git a/lib/pages/connect/connect_page.dart b/lib/pages/connect/connect_page.dart index 01086bec..1e34e269 100644 --- a/lib/pages/connect/connect_page.dart +++ b/lib/pages/connect/connect_page.dart @@ -131,8 +131,8 @@ class ConnectPageController extends State { void ssoLoginAction(String id) async { final redirectUrl = kIsWeb - ? html.window.origin! + '/web/auth.html' - : AppConfig.appOpenUrlScheme.toLowerCase() + '://login'; + ? '${html.window.origin!}/web/auth.html' + : '${AppConfig.appOpenUrlScheme.toLowerCase()}://login'; final url = '${Matrix.of(context).getLoginClient().homeserver?.toString()}/_matrix/client/r0/login/sso/redirect/${Uri.encodeComponent(id)}?redirectUrl=${Uri.encodeQueryComponent(redirectUrl)}'; final urlScheme = Uri.parse(redirectUrl).scheme; diff --git a/lib/pages/dialer/dialer.dart b/lib/pages/dialer/dialer.dart index 212324ca..a7b6b067 100644 --- a/lib/pages/dialer/dialer.dart +++ b/lib/pages/dialer/dialer.dart @@ -25,7 +25,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_webrtc/flutter_webrtc.dart'; import 'package:just_audio/just_audio.dart'; import 'package:matrix/matrix.dart'; -import 'package:pedantic/pedantic.dart'; import 'package:wakelock/wakelock.dart'; import 'package:fluffychat/utils/platform_infos.dart'; @@ -121,10 +120,10 @@ class Calling extends StatefulWidget { : super(key: key); @override - _MyCallingPage createState() => _MyCallingPage(); + MyCallingPage createState() => MyCallingPage(); } -class _MyCallingPage extends State { +class MyCallingPage extends State { Room? get room => call?.room; String get displayName => call?.displayName ?? ''; diff --git a/lib/pages/key_verification/key_verification_dialog.dart b/lib/pages/key_verification/key_verification_dialog.dart index d9213178..00bcce88 100644 --- a/lib/pages/key_verification/key_verification_dialog.dart +++ b/lib/pages/key_verification/key_verification_dialog.dart @@ -39,10 +39,10 @@ class KeyVerificationDialog extends StatefulWidget { }) : super(key: key); @override - _KeyVerificationPageState createState() => _KeyVerificationPageState(); + KeyVerificationPageState createState() => KeyVerificationPageState(); } -class _KeyVerificationPageState extends State { +class KeyVerificationPageState extends State { void Function()? originalOnUpdate; late final List sasEmoji; diff --git a/lib/pages/new_private_chat/qr_scanner_modal.dart b/lib/pages/new_private_chat/qr_scanner_modal.dart index 73689141..8c125e46 100644 --- a/lib/pages/new_private_chat/qr_scanner_modal.dart +++ b/lib/pages/new_private_chat/qr_scanner_modal.dart @@ -12,10 +12,10 @@ class QrScannerModal extends StatefulWidget { const QrScannerModal({Key? key}) : super(key: key); @override - _QrScannerModalState createState() => _QrScannerModalState(); + QrScannerModalState createState() => QrScannerModalState(); } -class _QrScannerModalState extends State { +class QrScannerModalState extends State { final GlobalKey qrKey = GlobalKey(debugLabel: 'QR'); QRViewController? controller; diff --git a/lib/pages/story/story_page.dart b/lib/pages/story/story_page.dart index f6d200c3..ba13f34a 100644 --- a/lib/pages/story/story_page.dart +++ b/lib/pages/story/story_page.dart @@ -210,7 +210,7 @@ class StoryPageController extends State { final tmpDirectory = await getTemporaryDirectory(); final fileName = event.content.tryGet('filename') ?? 'unknown_story_video.mp4'; - final file = File(tmpDirectory.path + '/' + fileName); + final file = File('${tmpDirectory.path}/$fileName'); await file.writeAsBytes(matrixFile.bytes); if (!mounted) return null; final videoPlayerController = diff --git a/lib/pages/user_bottom_sheet/user_bottom_sheet.dart b/lib/pages/user_bottom_sheet/user_bottom_sheet.dart index bb769617..187c141d 100644 --- a/lib/pages/user_bottom_sheet/user_bottom_sheet.dart +++ b/lib/pages/user_bottom_sheet/user_bottom_sheet.dart @@ -29,15 +29,14 @@ class UserBottomSheet extends StatefulWidget { class UserBottomSheetController extends State { void participantAction(String action) async { // ignore: prefer_function_declarations_over_variables - final Function _askConfirmation = - () async => (await showOkCancelAlertDialog( - useRootNavigator: false, - context: context, - title: L10n.of(context)!.areYouSure, - okLabel: L10n.of(context)!.yes, - cancelLabel: L10n.of(context)!.no, - ) == - OkCancelResult.ok); + final Function askConfirmation = () async => (await showOkCancelAlertDialog( + useRootNavigator: false, + context: context, + title: L10n.of(context)!.areYouSure, + okLabel: L10n.of(context)!.yes, + cancelLabel: L10n.of(context)!.no, + ) == + OkCancelResult.ok); switch (action) { case 'report': final event = widget.user; @@ -88,7 +87,7 @@ class UserBottomSheetController extends State { widget.onMention!(); break; case 'ban': - if (await _askConfirmation()) { + if (await askConfirmation()) { await showFutureLoadingDialog( context: context, future: () => widget.user.ban(), @@ -97,7 +96,7 @@ class UserBottomSheetController extends State { } break; case 'unban': - if (await _askConfirmation()) { + if (await askConfirmation()) { await showFutureLoadingDialog( context: context, future: () => widget.user.unban(), @@ -106,7 +105,7 @@ class UserBottomSheetController extends State { } break; case 'kick': - if (await _askConfirmation()) { + if (await askConfirmation()) { await showFutureLoadingDialog( context: context, future: () => widget.user.kick(), @@ -120,7 +119,7 @@ class UserBottomSheetController extends State { currentLevel: widget.user.powerLevel, ); if (newPermission != null) { - if (newPermission == 100 && await _askConfirmation() == false) break; + if (newPermission == 100 && await askConfirmation() == false) break; await showFutureLoadingDialog( context: context, future: () => widget.user.setPower(newPermission), @@ -139,7 +138,7 @@ class UserBottomSheetController extends State { Navigator.of(context, rootNavigator: false).pop(); break; case 'ignore': - if (await _askConfirmation()) { + if (await askConfirmation()) { await showFutureLoadingDialog( context: context, future: () => diff --git a/lib/utils/background_push.dart b/lib/utils/background_push.dart index 05567660..8bf3f37d 100644 --- a/lib/utils/background_push.dart +++ b/lib/utils/background_push.dart @@ -104,10 +104,13 @@ class BackgroundPush { } factory BackgroundPush( - Client _client, BuildContext _context, GlobalKey? router, - {final void Function(String errorMsg, {Uri? link})? onFcmError}) { - final instance = BackgroundPush.clientOnly(_client); - instance.context = _context; + Client client, + BuildContext context, + GlobalKey? router, { + final void Function(String errorMsg, {Uri? link})? onFcmError, + }) { + final instance = BackgroundPush.clientOnly(client); + instance.context = context; // ignore: prefer_initializing_formals instance.router = router; // ignore: prefer_initializing_formals @@ -341,9 +344,9 @@ class BackgroundPush { } } catch (e) { Logs().i( - '[Push] No self-hosted unified push gateway present: ' + newEndpoint); + '[Push] No self-hosted unified push gateway present: $newEndpoint'); } - Logs().i('[Push] UnifiedPush using endpoint ' + endpoint); + Logs().i('[Push] UnifiedPush using endpoint $endpoint'); final oldTokens = {}; try { final fcmToken = await firebase?.getToken(); diff --git a/lib/utils/fluffy_emoji_picker.dart b/lib/utils/fluffy_emoji_picker.dart index c4fd26d8..fd767b72 100644 --- a/lib/utils/fluffy_emoji_picker.dart +++ b/lib/utils/fluffy_emoji_picker.dart @@ -23,10 +23,10 @@ class FluffyEmojiPickerView extends EmojiPickerBuilder { : super(config, state); @override - _DefaultEmojiPickerViewState createState() => _DefaultEmojiPickerViewState(); + DefaultEmojiPickerViewState createState() => DefaultEmojiPickerViewState(); } -class _DefaultEmojiPickerViewState extends State +class DefaultEmojiPickerViewState extends State with SingleTickerProviderStateMixin { PageController? _pageController; TabController? _tabController; @@ -267,12 +267,12 @@ class _DefaultEmojiPickerViewState extends State return TextButton( onPressed: onPressed, onLongPress: onLongPressed, - child: child, style: ButtonStyle( padding: MaterialStateProperty.all(EdgeInsets.zero), minimumSize: MaterialStateProperty.all(Size.zero), tapTargetSize: MaterialTapTargetSize.shrinkWrap, ), + child: child, ); } return GestureDetector( diff --git a/lib/utils/matrix_sdk_extensions.dart/fluffybox_database.dart b/lib/utils/matrix_sdk_extensions.dart/fluffybox_database.dart index c2e938fd..1d966ee7 100644 --- a/lib/utils/matrix_sdk_extensions.dart/fluffybox_database.dart +++ b/lib/utils/matrix_sdk_extensions.dart/fluffybox_database.dart @@ -1,3 +1,5 @@ +// ignore_for_file: depend_on_referenced_packages + import 'dart:convert'; import 'dart:io'; import 'dart:typed_data'; diff --git a/lib/utils/push_helper.dart b/lib/utils/push_helper.dart index beb8fcf9..d0f96335 100644 --- a/lib/utils/push_helper.dart +++ b/lib/utils/push_helper.dart @@ -33,15 +33,15 @@ Future pushHelper( Logs().wtf('Push Helper has crashed!', e, s); // Initialise the plugin. app_icon needs to be a added as a drawable resource to the Android head project - final _flutterLocalNotificationsPlugin = FlutterLocalNotificationsPlugin(); - await _flutterLocalNotificationsPlugin.initialize( + final flutterLocalNotificationsPlugin = FlutterLocalNotificationsPlugin(); + await flutterLocalNotificationsPlugin.initialize( const InitializationSettings( android: AndroidInitializationSettings('notifications_icon'), iOS: IOSInitializationSettings(), ), onSelectNotification: onSelectNotification, ); - _flutterLocalNotificationsPlugin.show( + flutterLocalNotificationsPlugin.show( 0, l10n?.newMessageInFluffyChat, l10n?.openAppToReadMessages, @@ -83,8 +83,8 @@ Future _tryPushHelper( } // Initialise the plugin. app_icon needs to be a added as a drawable resource to the Android head project - final _flutterLocalNotificationsPlugin = FlutterLocalNotificationsPlugin(); - await _flutterLocalNotificationsPlugin.initialize( + final flutterLocalNotificationsPlugin = FlutterLocalNotificationsPlugin(); + await flutterLocalNotificationsPlugin.initialize( const InitializationSettings( android: AndroidInitializationSettings('notifications_icon'), iOS: IOSInitializationSettings(), @@ -102,7 +102,7 @@ Future _tryPushHelper( Logs().v('Notification is a clearing indicator.'); if (notification.counts?.unread == 0) { if (notification.counts == null || notification.counts?.unread == 0) { - await _flutterLocalNotificationsPlugin.cancelAll(); + await flutterLocalNotificationsPlugin.cancelAll(); final store = await SharedPreferences.getInstance(); await store.setString( SettingKeys.notificationCurrentIds, json.encode({})); @@ -185,7 +185,7 @@ Future _tryPushHelper( iOS: iOSPlatformChannelSpecifics, ); - await _flutterLocalNotificationsPlugin.show( + await flutterLocalNotificationsPlugin.show( id, event.room.displayname, body, diff --git a/lib/utils/resize_image.dart b/lib/utils/resize_image.dart index abe7ae66..eab1db85 100644 --- a/lib/utils/resize_image.dart +++ b/lib/utils/resize_image.dart @@ -15,7 +15,7 @@ extension ResizeImage on MatrixFile { Future resizeVideo() async { final tmpDir = await getTemporaryDirectory(); - final tmpFile = File(tmpDir.path + '/' + name); + final tmpFile = File('${tmpDir.path}/$name'); MediaInfo? mediaInfo; await tmpFile.writeAsBytes(bytes); try { @@ -37,7 +37,7 @@ extension ResizeImage on MatrixFile { Future getVideoThumbnail() async { if (!PlatformInfos.isMobile) return null; final tmpDir = await getTemporaryDirectory(); - final tmpFile = File(tmpDir.path + '/' + name); + final tmpFile = File('${tmpDir.path}/$name'); if (await tmpFile.exists() == false) { await tmpFile.writeAsBytes(bytes); } diff --git a/lib/utils/run_in_background.dart b/lib/utils/run_in_background.dart deleted file mode 100644 index e75d1452..00000000 --- a/lib/utils/run_in_background.dart +++ /dev/null @@ -1,13 +0,0 @@ -import 'dart:async'; - -import 'package:isolate/isolate.dart'; - -Future runInBackground( - FutureOr Function(U arg) function, U arg) async { - final isolate = await IsolateRunner.spawn(); - try { - return await isolate.run(function, arg); - } finally { - await isolate.close(); - } -} diff --git a/lib/utils/stream_extension.dart b/lib/utils/stream_extension.dart index afd8deba..685b78f6 100644 --- a/lib/utils/stream_extension.dart +++ b/lib/utils/stream_extension.dart @@ -9,9 +9,9 @@ extension StreamExtension on Stream { var gotMessage = false; // as we call our inline-defined function recursively we need to make sure that the // variable exists prior of creating the function. Silly dart. - Function? _onMessage; + Function? onMessage; // callback to determine if we should send out an update - _onMessage = () { + onMessage = () { // do nothing if it is already closed if (controller.isClosed) { return; @@ -25,7 +25,7 @@ extension StreamExtension on Stream { // method to send out an update! timer = null; if (gotMessage) { - _onMessage?.call(); + onMessage?.call(); } }); } else { @@ -33,7 +33,7 @@ extension StreamExtension on Stream { gotMessage = true; } }; - final subscription = listen((_) => _onMessage?.call(), + final subscription = listen((_) => onMessage?.call(), onDone: () => controller.close(), onError: (e, s) => controller.addError(e, s)); // add proper cleanup to the subscription and the controller, to not memory leak diff --git a/lib/utils/uia_request_manager.dart b/lib/utils/uia_request_manager.dart index 757ff457..4382a047 100644 --- a/lib/utils/uia_request_manager.dart +++ b/lib/utils/uia_request_manager.dart @@ -80,8 +80,8 @@ extension UiaRequestManager on MatrixState { ), ); default: - final url = Uri.parse(client.homeserver.toString() + - '/_matrix/client/r0/auth/$stage/fallback/web?session=${uiaRequest.session}'); + final url = Uri.parse( + '${client.homeserver}/_matrix/client/r0/auth/$stage/fallback/web?session=${uiaRequest.session}'); launch( url.toString(), forceSafariVC: true, diff --git a/lib/utils/update_checker_no_store.dart b/lib/utils/update_checker_no_store.dart index b4e73bc8..1a3250d7 100644 --- a/lib/utils/update_checker_no_store.dart +++ b/lib/utils/update_checker_no_store.dart @@ -82,7 +82,7 @@ class UpdateCheckerNoStore { final dir = await getTemporaryDirectory(); final response = await get(downloadUri(metadata)); if (response.statusCode == 200) { - final file = File(dir.path + '/fluffychat.msix'); + final file = File('${dir.path}/fluffychat.msix'); await file.writeAsBytes(response.bodyBytes); Process.start(file.path, [], runInShell: true); } else { diff --git a/lib/utils/url_launcher.dart b/lib/utils/url_launcher.dart index 1b9284d2..a3b0a8d4 100644 --- a/lib/utils/url_launcher.dart +++ b/lib/utils/url_launcher.dart @@ -80,7 +80,7 @@ class UrlLauncher { final newHost = uri.host.split('.').map((hostPartEncoded) { final hostPart = Uri.decodeComponent(hostPartEncoded); final hostPartPunycode = punycodeEncode(hostPart); - return hostPartPunycode != hostPart + '-' + return hostPartPunycode != '$hostPart-' ? 'xn--$hostPartPunycode' : hostPart; }).join('.'); diff --git a/lib/widgets/chat_settings_popup_menu.dart b/lib/widgets/chat_settings_popup_menu.dart index 34a58905..c3cd26e6 100644 --- a/lib/widgets/chat_settings_popup_menu.dart +++ b/lib/widgets/chat_settings_popup_menu.dart @@ -24,10 +24,10 @@ class ChatSettingsPopupMenu extends StatefulWidget { : super(key: key); @override - _ChatSettingsPopupMenuState createState() => _ChatSettingsPopupMenuState(); + ChatSettingsPopupMenuState createState() => ChatSettingsPopupMenuState(); } -class _ChatSettingsPopupMenuState extends State { +class ChatSettingsPopupMenuState extends State { StreamSubscription? notificationChangeSub; @override @@ -108,22 +108,22 @@ class _ChatSettingsPopupMenuState extends State { alignment: Alignment.center, children: [ KeyBoardShortcuts( - child: Container(), keysToPress: { LogicalKeyboardKey.controlLeft, LogicalKeyboardKey.keyI }, helpLabel: L10n.of(context)!.chatDetails, onKeysPressed: _showChatDetails, + child: Container(), ), KeyBoardShortcuts( - child: Container(), keysToPress: { LogicalKeyboardKey.controlLeft, LogicalKeyboardKey.keyW }, helpLabel: L10n.of(context)!.matrixWidgets, onKeysPressed: _showWidgets, + child: Container(), ), PopupMenuButton( onSelected: (String choice) async { diff --git a/lib/widgets/connection_status_header.dart b/lib/widgets/connection_status_header.dart index a62864c3..afd05b23 100644 --- a/lib/widgets/connection_status_header.dart +++ b/lib/widgets/connection_status_header.dart @@ -12,10 +12,10 @@ class ConnectionStatusHeader extends StatefulWidget { const ConnectionStatusHeader({Key? key}) : super(key: key); @override - _ConnectionStatusHeaderState createState() => _ConnectionStatusHeaderState(); + ConnectionStatusHeaderState createState() => ConnectionStatusHeaderState(); } -class _ConnectionStatusHeaderState extends State { +class ConnectionStatusHeaderState extends State { late final StreamSubscription _onSyncSub; @override diff --git a/lib/widgets/layouts/empty_page.dart b/lib/widgets/layouts/empty_page.dart index 0f3b2d42..386d86ff 100644 --- a/lib/widgets/layouts/empty_page.dart +++ b/lib/widgets/layouts/empty_page.dart @@ -8,7 +8,7 @@ class EmptyPage extends StatelessWidget { const EmptyPage({this.loading = false, Key? key}) : super(key: key); @override Widget build(BuildContext context) { - final _width = min(MediaQuery.of(context).size.width, EmptyPage._width); + final width = min(MediaQuery.of(context).size.width, EmptyPage._width); return Scaffold( // Add invisible appbar to make status bar on Android tablets bright. appBar: AppBar( @@ -25,15 +25,15 @@ class EmptyPage extends StatelessWidget { tag: 'info-logo', child: Image.asset( 'assets/info-logo.png', - width: _width, - height: _width, + width: width, + height: width, ), ), ), if (loading) Center( child: SizedBox( - width: _width, + width: width, child: const LinearProgressIndicator(), ), ), diff --git a/lib/widgets/lock_screen.dart b/lib/widgets/lock_screen.dart index 1a5a4575..553d003a 100644 --- a/lib/widgets/lock_screen.dart +++ b/lib/widgets/lock_screen.dart @@ -15,10 +15,10 @@ class LockScreen extends StatefulWidget { const LockScreen({Key? key}) : super(key: key); @override - _LockScreenState createState() => _LockScreenState(); + LockScreenState createState() => LockScreenState(); } -class _LockScreenState extends State { +class LockScreenState extends State { final TextEditingController _textEditingController = TextEditingController(); final FocusNode _focusNode = FocusNode(); bool _wrongInput = false; diff --git a/lib/widgets/log_view.dart b/lib/widgets/log_view.dart index 0c18fa50..d87f15f8 100644 --- a/lib/widgets/log_view.dart +++ b/lib/widgets/log_view.dart @@ -6,10 +6,10 @@ class LogViewer extends StatefulWidget { const LogViewer({Key? key}) : super(key: key); @override - _LogViewerState createState() => _LogViewerState(); + LogViewerState createState() => LogViewerState(); } -class _LogViewerState extends State { +class LogViewerState extends State { Level logLevel = Level.debug; double fontSize = 14; @override diff --git a/lib/widgets/settings_switch_list_tile.dart b/lib/widgets/settings_switch_list_tile.dart index 11e3b5ad..a3da2dbb 100644 --- a/lib/widgets/settings_switch_list_tile.dart +++ b/lib/widgets/settings_switch_list_tile.dart @@ -17,10 +17,10 @@ class SettingsSwitchListTile extends StatefulWidget { }) : super(key: key); @override - _SettingsSwitchListTileState createState() => _SettingsSwitchListTileState(); + SettingsSwitchListTileState createState() => SettingsSwitchListTileState(); } -class _SettingsSwitchListTileState extends State { +class SettingsSwitchListTileState extends State { @override Widget build(BuildContext context) { return FutureBuilder( diff --git a/pubspec.lock b/pubspec.lock index 3dfa787d..4c042ec1 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -579,7 +579,7 @@ packages: name: flutter_lints url: "https://pub.dartlang.org" source: hosted - version: "1.0.4" + version: "2.0.1" flutter_local_notifications: dependency: "direct main" description: @@ -612,7 +612,7 @@ packages: name: flutter_map url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "2.2.0" flutter_math_fork: dependency: transitive description: @@ -712,7 +712,7 @@ packages: name: flutter_slidable url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "2.0.0" flutter_svg: dependency: "direct main" description: @@ -750,7 +750,7 @@ packages: name: flutter_webrtc url: "https://pub.dartlang.org" source: hosted - version: "0.8.7" + version: "0.9.2" frontend_server_client: dependency: transitive description: @@ -834,12 +834,12 @@ packages: source: hosted version: "0.7.0" hive: - dependency: transitive + dependency: "direct main" description: name: hive url: "https://pub.dartlang.org" source: hosted - version: "2.2.1" + version: "2.2.3" hive_flutter: dependency: "direct main" description: @@ -988,7 +988,7 @@ packages: source: git version: "0.1.4" latlong2: - dependency: transitive + dependency: "direct main" description: name: latlong2 url: "https://pub.dartlang.org" @@ -1000,7 +1000,7 @@ packages: name: lints url: "https://pub.dartlang.org" source: hosted - version: "1.0.1" + version: "2.0.0" lists: dependency: transitive description: @@ -1912,7 +1912,7 @@ packages: source: hosted version: "0.2.0" uuid: - dependency: transitive + dependency: "direct main" description: name: uuid url: "https://pub.dartlang.org" @@ -2059,12 +2059,12 @@ packages: source: hosted version: "1.0.0" webrtc_interface: - dependency: transitive + dependency: "direct main" description: name: webrtc_interface url: "https://pub.dartlang.org" source: hosted - version: "1.0.4" + version: "1.0.7" win32: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 76b3d0d6..4d29f87d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -38,20 +38,21 @@ dependencies: flutter_local_notifications: ^9.7.0 flutter_localizations: sdk: flutter - flutter_map: ^1.1.0 + flutter_map: ^2.2.0 flutter_matrix_html: ^1.1.0 flutter_olm: ^1.2.0 flutter_openssl_crypto: ^0.1.0 flutter_ringtone_player: ^3.1.1 flutter_secure_storage: ^5.1.0 - flutter_slidable: ^1.2.0 + flutter_slidable: ^2.0.0 flutter_svg: ^0.22.0 flutter_typeahead: ^4.0.0 flutter_web_auth: ^0.4.0 - flutter_webrtc: ^0.8.7 + flutter_webrtc: ^0.9.2 future_loading_dialog: ^0.2.3 geolocator: ^7.6.2 handy_window: ^0.1.6 + hive: ^2.2.3 hive_flutter: ^1.1.0 http: ^0.13.4 image: ^3.1.1 @@ -59,6 +60,7 @@ dependencies: intl: any just_audio: ^0.9.20 keyboard_shortcuts: ^0.1.4 + latlong2: ^0.8.1 localstorage: ^4.0.0+1 lottie: ^1.2.2 matrix: ^0.11.2 @@ -85,14 +87,16 @@ dependencies: unifiedpush: ^4.0.0 universal_html: ^2.0.8 url_launcher: ^6.0.20 + uuid: ^3.0.6 video_compress: ^3.1.1 video_player: ^2.2.18 vrouter: ^1.2.0+21 wakelock: ^0.6.1+1 + webrtc_interface: ^1.0.7 dev_dependencies: dart_code_metrics: ^4.10.1 - flutter_lints: ^1.0.4 + flutter_lints: ^2.0.1 flutter_native_splash: ^2.0.3+1 flutter_test: sdk: flutter diff --git a/test/command_hint_test.dart b/test/command_hint_test.dart index b9473237..e9877f8f 100644 --- a/test/command_hint_test.dart +++ b/test/command_hint_test.dart @@ -16,8 +16,7 @@ void main() async { final missing = commands.where((c) => !translated.contains(c)).toList(); expect(0, missing.length, - reason: 'missing hints for ' + - missing.toString() + - '\nAdding hints? See scripts/generate_command_hints_glue.sh'); + reason: + 'missing hints for $missing\nAdding hints? See scripts/generate_command_hints_glue.sh'); }); } diff --git a/test/utils/test_client.dart b/test/utils/test_client.dart index ac9bacf4..0cd21f29 100644 --- a/test/utils/test_client.dart +++ b/test/utils/test_client.dart @@ -1,3 +1,5 @@ +// ignore_for_file: depend_on_referenced_packages + import 'package:matrix/encryption/utils/key_verification.dart'; import 'package:matrix/matrix.dart'; import 'package:matrix_api_lite/fake_matrix_api.dart';