From 15ee1f02b5e9dad43a5f58fc89df89ff628933af Mon Sep 17 00:00:00 2001 From: Krille Fear Date: Tue, 26 Oct 2021 18:50:34 +0200 Subject: [PATCH] refactor: Sort imports --- lib/config/routes.dart | 36 +++++++------- lib/config/themes.dart | 2 +- lib/main.dart | 26 +++++----- lib/pages/archive.dart | 8 ++-- lib/pages/bootstrap_dialog.dart | 17 +++---- lib/pages/chat.dart | 35 +++++++------- lib/pages/chat_details.dart | 22 ++++----- lib/pages/chat_encryption_settings.dart | 6 ++- lib/pages/chat_list.dart | 26 +++++----- lib/pages/chat_permissions_settings.dart | 14 +++--- lib/pages/device_settings.dart | 11 +++-- lib/pages/homeserver_picker.dart | 25 +++++----- lib/pages/image_viewer.dart | 9 ++-- lib/pages/invitation_selection.dart | 9 ++-- lib/pages/key_verification_dialog.dart | 16 ++++--- lib/pages/login.dart | 17 ++++--- lib/pages/new_group.dart | 10 ++-- lib/pages/new_private_chat.dart | 14 +++--- lib/pages/new_space.dart | 10 ++-- lib/pages/permission_slider_dialog.dart | 8 ++-- lib/pages/qr_scanner_modal.dart | 6 ++- lib/pages/recording_dialog.dart | 6 ++- lib/pages/search.dart | 9 ++-- lib/pages/send_file_dialog.dart | 7 +-- lib/pages/send_location_dialog.dart | 11 +++-- lib/pages/settings.dart | 15 +++--- lib/pages/settings_3pid.dart | 11 +++-- lib/pages/settings_account.dart | 12 +++-- lib/pages/settings_emotes.dart | 14 +++--- lib/pages/settings_ignore_list.dart | 5 +- lib/pages/settings_multiple_emotes.dart | 1 + lib/pages/settings_notifications.dart | 9 ++-- lib/pages/settings_security.dart | 9 ++-- lib/pages/settings_style.dart | 9 ++-- lib/pages/signup.dart | 6 ++- lib/pages/sticker_picker_dialog.dart | 3 +- lib/pages/user_bottom_sheet.dart | 11 ++--- lib/pages/video_viewer.dart | 15 +++--- lib/pages/views/archive_view.dart | 6 ++- lib/pages/views/chat_details_view.dart | 21 ++++----- .../views/chat_encryption_settings_view.dart | 10 ++-- lib/pages/views/chat_list_view.dart | 26 +++++----- .../views/chat_permissions_settings_view.dart | 11 +++-- lib/pages/views/chat_view.dart | 47 ++++++++++--------- lib/pages/views/device_settings_view.dart | 5 +- lib/pages/views/homeserver_picker_view.dart | 23 +++++---- lib/pages/views/image_viewer_view.dart | 6 ++- .../views/invitation_selection_view.dart | 11 +++-- lib/pages/views/login_view.dart | 7 +-- lib/pages/views/new_group_view.dart | 6 ++- lib/pages/views/new_private_chat_view.dart | 10 ++-- lib/pages/views/new_space_view.dart | 3 +- lib/pages/views/search_view.dart | 10 ++-- lib/pages/views/settings_3pid_view.dart | 6 ++- lib/pages/views/settings_account_view.dart | 11 +++-- lib/pages/views/settings_chat_view.dart | 9 ++-- lib/pages/views/settings_emotes_view.dart | 10 ++-- .../views/settings_ignore_list_view.dart | 11 +++-- .../views/settings_multiple_emotes_view.dart | 10 ++-- .../views/settings_notifications_view.dart | 13 ++--- lib/pages/views/settings_security_view.dart | 9 ++-- lib/pages/views/settings_style_view.dart | 5 +- lib/pages/views/settings_view.dart | 7 +-- lib/pages/views/signup_view.dart | 5 +- lib/pages/views/user_bottom_sheet_view.dart | 8 ++-- lib/pages/views/video_viewer_view.dart | 6 ++- lib/utils/background_push.dart | 17 ++++--- lib/utils/client_manager.dart | 3 +- lib/utils/date_time_extension.dart | 1 + lib/utils/famedlysdk_store.dart | 8 ++-- lib/utils/fluffy_share.dart | 6 ++- lib/utils/localized_exception_extension.dart | 3 +- .../device_extension.dart | 3 +- .../event_extension.dart | 6 ++- .../flutter_matrix_hive_database.dart | 3 +- .../matrix_file_extension.dart | 10 ++-- .../matrix_locals.dart | 2 +- .../presence_extension.dart | 3 +- lib/utils/platform_infos.dart | 5 +- lib/utils/resize_image.dart | 2 +- lib/utils/room_status_extension.dart | 6 ++- lib/utils/run_in_background.dart | 3 +- lib/utils/sentry_controller.dart | 9 ++-- lib/utils/uia_request_manager.dart | 5 +- lib/utils/url_launcher.dart | 18 +++---- lib/widgets/adaptive_flat_button.dart | 3 +- lib/widgets/avatar.dart | 7 +-- lib/widgets/chat_settings_popup_menu.dart | 8 ++-- lib/widgets/connection_status_header.dart | 10 ++-- lib/widgets/contacts_list.dart | 6 ++- lib/widgets/content_banner.dart | 3 +- lib/widgets/default_app_bar_search_field.dart | 1 + lib/widgets/encryption_button.dart | 7 +-- lib/widgets/event_content/audio_player.dart | 11 +++-- lib/widgets/event_content/html_message.dart | 11 +++-- lib/widgets/event_content/image_bubble.dart | 11 +++-- lib/widgets/event_content/map_bubble.dart | 3 +- lib/widgets/event_content/message.dart | 9 ++-- .../event_content/message_content.dart | 26 +++++----- .../message_download_content.dart | 4 +- .../event_content/message_reactions.dart | 8 ++-- lib/widgets/event_content/reply_content.dart | 9 ++-- lib/widgets/event_content/state_message.dart | 7 +-- lib/widgets/event_content/sticker.dart | 6 ++- .../verification_request_content.dart | 3 +- lib/widgets/input_bar.dart | 18 +++---- lib/widgets/layouts/loading_view.dart | 6 ++- lib/widgets/layouts/one_page_card.dart | 3 +- lib/widgets/layouts/side_view_layout.dart | 4 +- lib/widgets/layouts/two_column_layout.dart | 3 +- lib/widgets/list_items/chat_list_item.dart | 19 ++++---- .../list_items/participant_list_item.dart | 7 +-- .../list_items/permission_list_tile.dart | 3 +- .../list_items/public_room_list_item.dart | 5 +- .../list_items/user_device_list_item.dart | 9 ++-- lib/widgets/lock_screen.dart | 13 ++--- lib/widgets/log_view.dart | 3 +- lib/widgets/matrix.dart | 30 ++++++------ lib/widgets/profile_bottom_sheet.dart | 10 ++-- lib/widgets/sentry_switch_list_tile.dart | 4 +- lib/widgets/unread_badge_back_button.dart | 3 +- pubspec.lock | 14 ++++++ pubspec.yaml | 1 + scripts/code_analyze.sh | 1 + test/homeserver_picker_test.dart | 1 + test/utils/test_client.dart | 3 +- test/widget_test.dart | 1 + 127 files changed, 689 insertions(+), 530 deletions(-) diff --git a/lib/config/routes.dart b/lib/config/routes.dart index 4c2f54c6..d64ae96f 100644 --- a/lib/config/routes.dart +++ b/lib/config/routes.dart @@ -1,35 +1,37 @@ +import 'package:flutter/material.dart'; + +import 'package:vrouter/vrouter.dart'; + import 'package:fluffychat/pages/archive.dart'; -import 'package:fluffychat/pages/homeserver_picker.dart'; -import 'package:fluffychat/pages/invitation_selection.dart'; -import 'package:fluffychat/pages/new_space.dart'; -import 'package:fluffychat/pages/settings_account.dart'; -import 'package:fluffychat/pages/settings_chat.dart'; -import 'package:fluffychat/pages/settings_emotes.dart'; -import 'package:fluffychat/pages/settings_multiple_emotes.dart'; -import 'package:fluffychat/pages/settings_security.dart'; -import 'package:fluffychat/pages/signup.dart'; -import 'package:fluffychat/widgets/layouts/side_view_layout.dart'; -import 'package:fluffychat/widgets/layouts/two_column_layout.dart'; import 'package:fluffychat/pages/chat.dart'; import 'package:fluffychat/pages/chat_details.dart'; import 'package:fluffychat/pages/chat_encryption_settings.dart'; import 'package:fluffychat/pages/chat_list.dart'; import 'package:fluffychat/pages/chat_permissions_settings.dart'; -import 'package:fluffychat/pages/views/empty_page_view.dart'; -import 'package:fluffychat/widgets/layouts/loading_view.dart'; -import 'package:fluffychat/widgets/log_view.dart'; +import 'package:fluffychat/pages/device_settings.dart'; +import 'package:fluffychat/pages/homeserver_picker.dart'; +import 'package:fluffychat/pages/invitation_selection.dart'; import 'package:fluffychat/pages/login.dart'; import 'package:fluffychat/pages/new_group.dart'; import 'package:fluffychat/pages/new_private_chat.dart'; +import 'package:fluffychat/pages/new_space.dart'; import 'package:fluffychat/pages/search.dart'; import 'package:fluffychat/pages/settings.dart'; import 'package:fluffychat/pages/settings_3pid.dart'; -import 'package:fluffychat/pages/device_settings.dart'; +import 'package:fluffychat/pages/settings_account.dart'; +import 'package:fluffychat/pages/settings_chat.dart'; +import 'package:fluffychat/pages/settings_emotes.dart'; import 'package:fluffychat/pages/settings_ignore_list.dart'; +import 'package:fluffychat/pages/settings_multiple_emotes.dart'; import 'package:fluffychat/pages/settings_notifications.dart'; +import 'package:fluffychat/pages/settings_security.dart'; import 'package:fluffychat/pages/settings_style.dart'; -import 'package:flutter/material.dart'; -import 'package:vrouter/vrouter.dart'; +import 'package:fluffychat/pages/signup.dart'; +import 'package:fluffychat/pages/views/empty_page_view.dart'; +import 'package:fluffychat/widgets/layouts/loading_view.dart'; +import 'package:fluffychat/widgets/layouts/side_view_layout.dart'; +import 'package:fluffychat/widgets/layouts/two_column_layout.dart'; +import 'package:fluffychat/widgets/log_view.dart'; class AppRoutes { final bool columnMode; diff --git a/lib/config/themes.dart b/lib/config/themes.dart index acbfdcf4..e803d391 100644 --- a/lib/config/themes.dart +++ b/lib/config/themes.dart @@ -1,9 +1,9 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -import 'package:fluffychat/utils/platform_infos.dart'; import 'package:flutter/services.dart'; +import 'package:fluffychat/utils/platform_infos.dart'; import 'app_config.dart'; abstract class FluffyThemes { diff --git a/lib/main.dart b/lib/main.dart index ce2bfd77..16e1d2c8 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,30 +1,32 @@ // @dart=2.9 + import 'dart:async'; -import 'package:adaptive_theme/adaptive_theme.dart'; -import 'package:fluffychat/utils/client_manager.dart'; -import 'package:matrix/matrix.dart'; -import 'package:fluffychat/config/routes.dart'; -import 'package:fluffychat/utils/platform_infos.dart'; -import 'package:fluffychat/utils/sentry_controller.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'utils/custom_scroll_behaviour.dart'; -import 'utils/localized_exception_extension.dart'; + +import 'package:adaptive_theme/adaptive_theme.dart'; import 'package:flutter_app_lock/flutter_app_lock.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:universal_html/html.dart' as html; import 'package:vrouter/vrouter.dart'; +import 'package:fluffychat/config/routes.dart'; +import 'package:fluffychat/utils/client_manager.dart'; +import 'package:fluffychat/utils/platform_infos.dart'; +import 'package:fluffychat/utils/sentry_controller.dart'; +import 'config/app_config.dart'; +import 'config/themes.dart'; +import 'utils/background_push.dart'; +import 'utils/custom_scroll_behaviour.dart'; +import 'utils/localized_exception_extension.dart'; +import 'utils/platform_infos.dart'; import 'widgets/lock_screen.dart'; import 'widgets/matrix.dart'; -import 'config/themes.dart'; -import 'config/app_config.dart'; -import 'utils/platform_infos.dart'; -import 'utils/background_push.dart'; void main() async { // Our background push shared isolate accesses flutter-internal things very early in the startup proccess diff --git a/lib/pages/archive.dart b/lib/pages/archive.dart index 8af854a5..a4534faf 100644 --- a/lib/pages/archive.dart +++ b/lib/pages/archive.dart @@ -1,10 +1,12 @@ +import 'package:flutter/material.dart'; + 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:fluffychat/pages/views/archive_view.dart'; import 'package:fluffychat/widgets/matrix.dart'; -import 'package:flutter/material.dart'; -import 'package:future_loading_dialog/future_loading_dialog.dart'; -import 'package:flutter_gen/gen_l10n/l10n.dart'; class Archive extends StatefulWidget { const Archive({Key key}) : super(key: key); diff --git a/lib/pages/bootstrap_dialog.dart b/lib/pages/bootstrap_dialog.dart index 34e508f1..7df3750f 100644 --- a/lib/pages/bootstrap_dialog.dart +++ b/lib/pages/bootstrap_dialog.dart @@ -1,16 +1,17 @@ +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + import 'package:adaptive_dialog/adaptive_dialog.dart'; -import 'package:fluffychat/config/themes.dart'; +import 'package:flutter_gen/gen_l10n/l10n.dart'; +import 'package:future_loading_dialog/future_loading_dialog.dart'; import 'package:matrix/encryption.dart'; import 'package:matrix/encryption/utils/bootstrap.dart'; import 'package:matrix/matrix.dart'; -import 'package:fluffychat/widgets/adaptive_flat_button.dart'; -import 'package:flutter/services.dart'; -import 'package:fluffychat/utils/platform_infos.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_gen/gen_l10n/l10n.dart'; -import 'package:future_loading_dialog/future_loading_dialog.dart'; +import 'package:fluffychat/config/themes.dart'; +import 'package:fluffychat/utils/platform_infos.dart'; +import 'package:fluffychat/widgets/adaptive_flat_button.dart'; import 'key_verification_dialog.dart'; class BootstrapDialog extends StatefulWidget { diff --git a/lib/pages/chat.dart b/lib/pages/chat.dart index 76457978..4f31aa8b 100644 --- a/lib/pages/chat.dart +++ b/lib/pages/chat.dart @@ -1,38 +1,37 @@ import 'dart:async'; import 'dart:io'; -import 'package:adaptive_dialog/adaptive_dialog.dart'; -import 'package:flutter_app_badger/flutter_app_badger.dart'; - -import 'package:matrix/matrix.dart'; -import 'package:file_picker_cross/file_picker_cross.dart'; -import 'package:fluffychat/config/app_config.dart'; -import 'package:fluffychat/pages/views/chat_view.dart'; -import 'package:fluffychat/pages/recording_dialog.dart'; -import 'package:flutter_local_notifications/flutter_local_notifications.dart'; - -import 'package:future_loading_dialog/future_loading_dialog.dart'; -import 'package:fluffychat/widgets/matrix.dart'; -import 'package:fluffychat/utils/matrix_sdk_extensions.dart/matrix_locals.dart'; -import 'package:fluffychat/utils/platform_infos.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter/scheduler.dart'; import 'package:flutter/services.dart'; + +import 'package:adaptive_dialog/adaptive_dialog.dart'; +import 'package:file_picker_cross/file_picker_cross.dart'; +import 'package:flutter_app_badger/flutter_app_badger.dart'; import 'package:flutter_gen/gen_l10n/l10n.dart'; +import 'package:flutter_local_notifications/flutter_local_notifications.dart'; +import 'package:future_loading_dialog/future_loading_dialog.dart'; import 'package:image_picker/image_picker.dart'; +import 'package:matrix/matrix.dart'; import 'package:record/record.dart'; import 'package:scroll_to_index/scroll_to_index.dart'; import 'package:url_launcher/url_launcher.dart'; import 'package:vrouter/vrouter.dart'; -import '../utils/localized_exception_extension.dart'; +import 'package:fluffychat/config/app_config.dart'; +import 'package:fluffychat/pages/recording_dialog.dart'; +import 'package:fluffychat/pages/views/chat_view.dart'; +import 'package:fluffychat/utils/matrix_sdk_extensions.dart/matrix_locals.dart'; +import 'package:fluffychat/utils/platform_infos.dart'; +import 'package:fluffychat/widgets/matrix.dart'; +import '../utils/account_bundles.dart'; +import '../utils/localized_exception_extension.dart'; +import '../utils/matrix_sdk_extensions.dart/filtered_timeline_extension.dart'; +import '../utils/matrix_sdk_extensions.dart/matrix_file_extension.dart'; import 'send_file_dialog.dart'; import 'send_location_dialog.dart'; import 'sticker_picker_dialog.dart'; -import '../utils/matrix_sdk_extensions.dart/filtered_timeline_extension.dart'; -import '../utils/matrix_sdk_extensions.dart/matrix_file_extension.dart'; -import '../utils/account_bundles.dart'; class Chat extends StatefulWidget { final Widget sideView; diff --git a/lib/pages/chat_details.dart b/lib/pages/chat_details.dart index fb076676..bf8fe797 100644 --- a/lib/pages/chat_details.dart +++ b/lib/pages/chat_details.dart @@ -1,18 +1,18 @@ -import 'package:adaptive_dialog/adaptive_dialog.dart'; - -import 'package:matrix/matrix.dart'; - -import 'package:file_picker_cross/file_picker_cross.dart'; -import 'package:fluffychat/pages/views/chat_details_view.dart'; -import 'package:fluffychat/widgets/matrix.dart'; +import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; + +import 'package:adaptive_dialog/adaptive_dialog.dart'; +import 'package:file_picker_cross/file_picker_cross.dart'; +import 'package:flutter_gen/gen_l10n/l10n.dart'; import 'package:future_loading_dialog/future_loading_dialog.dart'; +import 'package:image_picker/image_picker.dart'; +import 'package:matrix/matrix.dart'; +import 'package:vrouter/vrouter.dart'; + +import 'package:fluffychat/pages/views/chat_details_view.dart'; import 'package:fluffychat/utils/matrix_sdk_extensions.dart/matrix_locals.dart'; import 'package:fluffychat/utils/platform_infos.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_gen/gen_l10n/l10n.dart'; -import 'package:image_picker/image_picker.dart'; -import 'package:vrouter/vrouter.dart'; +import 'package:fluffychat/widgets/matrix.dart'; enum AliasActions { copy, delete, setCanonical } diff --git a/lib/pages/chat_encryption_settings.dart b/lib/pages/chat_encryption_settings.dart index 89c89ecd..49a25456 100644 --- a/lib/pages/chat_encryption_settings.dart +++ b/lib/pages/chat_encryption_settings.dart @@ -1,9 +1,11 @@ +import 'package:flutter/material.dart'; + import 'package:matrix/encryption.dart'; import 'package:matrix/matrix.dart'; +import 'package:vrouter/vrouter.dart'; + import 'package:fluffychat/pages/views/chat_encryption_settings_view.dart'; import 'package:fluffychat/widgets/matrix.dart'; -import 'package:flutter/material.dart'; -import 'package:vrouter/vrouter.dart'; import 'key_verification_dialog.dart'; class ChatEncryptionSettings extends StatefulWidget { diff --git a/lib/pages/chat_list.dart b/lib/pages/chat_list.dart index 481129ab..6ff66583 100644 --- a/lib/pages/chat_list.dart +++ b/lib/pages/chat_list.dart @@ -1,29 +1,29 @@ import 'dart:async'; import 'dart:io'; -import 'package:adaptive_dialog/adaptive_dialog.dart'; -import 'package:fluffychat/config/setting_keys.dart'; -import 'package:fluffychat/utils/matrix_sdk_extensions.dart/flutter_matrix_hive_database.dart'; - -import 'package:matrix/matrix.dart'; -import 'package:fluffychat/utils/fluffy_share.dart'; -import 'package:fluffychat/pages/views/chat_list_view.dart'; import 'package:flutter/cupertino.dart'; -import 'package:fluffychat/config/app_config.dart'; -import 'package:fluffychat/utils/platform_infos.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; + +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:receive_sharing_intent/receive_sharing_intent.dart'; import 'package:uni_links/uni_links.dart'; import 'package:vrouter/vrouter.dart'; -import '../main.dart'; -import '../widgets/matrix.dart'; + +import 'package:fluffychat/config/app_config.dart'; +import 'package:fluffychat/config/setting_keys.dart'; +import 'package:fluffychat/pages/views/chat_list_view.dart'; +import 'package:fluffychat/utils/fluffy_share.dart'; +import 'package:fluffychat/utils/matrix_sdk_extensions.dart/flutter_matrix_hive_database.dart'; +import 'package:fluffychat/utils/platform_infos.dart'; import '../../utils/account_bundles.dart'; +import '../main.dart'; import '../utils/matrix_sdk_extensions.dart/matrix_file_extension.dart'; import '../utils/url_launcher.dart'; -import 'package:flutter_gen/gen_l10n/l10n.dart'; - +import '../widgets/matrix.dart'; import 'bootstrap_dialog.dart'; enum SelectMode { normal, share, select } diff --git a/lib/pages/chat_permissions_settings.dart b/lib/pages/chat_permissions_settings.dart index 7e6ad4e8..ab04ce67 100644 --- a/lib/pages/chat_permissions_settings.dart +++ b/lib/pages/chat_permissions_settings.dart @@ -1,17 +1,17 @@ import 'dart:developer'; -import 'package:adaptive_dialog/adaptive_dialog.dart'; - -import 'package:fluffychat/pages/views/chat_permissions_settings_view.dart'; -import 'package:fluffychat/pages/permission_slider_dialog.dart'; -import 'package:future_loading_dialog/future_loading_dialog.dart'; -import 'package:fluffychat/widgets/matrix.dart'; - import 'package:flutter/material.dart'; + +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:vrouter/vrouter.dart'; +import 'package:fluffychat/pages/permission_slider_dialog.dart'; +import 'package:fluffychat/pages/views/chat_permissions_settings_view.dart'; +import 'package:fluffychat/widgets/matrix.dart'; + class ChatPermissionsSettings extends StatefulWidget { const ChatPermissionsSettings({Key key}) : super(key: key); diff --git a/lib/pages/device_settings.dart b/lib/pages/device_settings.dart index 4a1851aa..90d6ac67 100644 --- a/lib/pages/device_settings.dart +++ b/lib/pages/device_settings.dart @@ -1,12 +1,13 @@ +import 'package:flutter/material.dart'; + 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/encryption/utils/key_verification.dart'; import 'package:matrix/matrix.dart'; -import 'package:fluffychat/pages/views/device_settings_view.dart'; -import 'package:fluffychat/pages/key_verification_dialog.dart'; -import 'package:future_loading_dialog/future_loading_dialog.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_gen/gen_l10n/l10n.dart'; +import 'package:fluffychat/pages/key_verification_dialog.dart'; +import 'package:fluffychat/pages/views/device_settings_view.dart'; import '../widgets/matrix.dart'; class DevicesSettings extends StatefulWidget { diff --git a/lib/pages/homeserver_picker.dart b/lib/pages/homeserver_picker.dart index 3de8d780..217e2e3e 100644 --- a/lib/pages/homeserver_picker.dart +++ b/lib/pages/homeserver_picker.dart @@ -1,23 +1,24 @@ import 'dart:async'; +import 'package:flutter/foundation.dart'; +import 'package:flutter/material.dart'; + +import 'package:flutter_gen/gen_l10n/l10n.dart'; import 'package:flutter_inappwebview/flutter_inappwebview.dart'; +import 'package:future_loading_dialog/future_loading_dialog.dart'; import 'package:matrix/matrix.dart'; -import 'package:fluffychat/pages/views/homeserver_picker_view.dart'; -import 'package:fluffychat/utils/famedlysdk_store.dart'; -import 'package:fluffychat/widgets/matrix.dart'; +import 'package:uni_links/uni_links.dart'; +import 'package:url_launcher/url_launcher.dart'; +import 'package:vrouter/vrouter.dart'; + import 'package:fluffychat/config/app_config.dart'; import 'package:fluffychat/config/setting_keys.dart'; -import 'package:flutter/foundation.dart'; -import 'package:flutter_gen/gen_l10n/l10n.dart'; -import 'package:flutter/material.dart'; -import 'package:url_launcher/url_launcher.dart'; -import '../utils/localized_exception_extension.dart'; -import 'package:vrouter/vrouter.dart'; +import 'package:fluffychat/pages/views/homeserver_picker_view.dart'; +import 'package:fluffychat/utils/famedlysdk_store.dart'; import 'package:fluffychat/utils/platform_infos.dart'; -import 'package:future_loading_dialog/future_loading_dialog.dart'; -import 'package:uni_links/uni_links.dart'; - +import 'package:fluffychat/widgets/matrix.dart'; import '../main.dart'; +import '../utils/localized_exception_extension.dart'; class HomeserverPicker extends StatefulWidget { const HomeserverPicker({Key key}) : super(key: key); diff --git a/lib/pages/image_viewer.dart b/lib/pages/image_viewer.dart index e03e92d5..2fa1d0c6 100644 --- a/lib/pages/image_viewer.dart +++ b/lib/pages/image_viewer.dart @@ -1,10 +1,11 @@ -import 'package:matrix/matrix.dart'; -import 'package:fluffychat/utils/platform_infos.dart'; -import 'package:fluffychat/pages/views/image_viewer_view.dart'; -import 'package:fluffychat/widgets/matrix.dart'; import 'package:flutter/material.dart'; + +import 'package:matrix/matrix.dart'; import 'package:vrouter/vrouter.dart'; +import 'package:fluffychat/pages/views/image_viewer_view.dart'; +import 'package:fluffychat/utils/platform_infos.dart'; +import 'package:fluffychat/widgets/matrix.dart'; import '../utils/matrix_sdk_extensions.dart/event_extension.dart'; class ImageViewer extends StatefulWidget { diff --git a/lib/pages/invitation_selection.dart b/lib/pages/invitation_selection.dart index 4cb5f9be..5cbe0ddf 100644 --- a/lib/pages/invitation_selection.dart +++ b/lib/pages/invitation_selection.dart @@ -1,13 +1,14 @@ import 'dart:async'; -import 'package:matrix/matrix.dart'; -import 'package:fluffychat/pages/views/invitation_selection_view.dart'; -import 'package:future_loading_dialog/future_loading_dialog.dart'; -import 'package:fluffychat/widgets/matrix.dart'; import 'package:flutter/material.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:vrouter/vrouter.dart'; +import 'package:fluffychat/pages/views/invitation_selection_view.dart'; +import 'package:fluffychat/widgets/matrix.dart'; import '../utils/localized_exception_extension.dart'; class InvitationSelection extends StatefulWidget { diff --git a/lib/pages/key_verification_dialog.dart b/lib/pages/key_verification_dialog.dart index 633b0c5f..23ed3e24 100644 --- a/lib/pages/key_verification_dialog.dart +++ b/lib/pages/key_verification_dialog.dart @@ -1,18 +1,20 @@ -import 'dart:ui'; import 'dart:convert'; +import 'dart:ui'; -import 'package:adaptive_dialog/adaptive_dialog.dart'; -import 'package:fluffychat/widgets/avatar.dart'; -import 'package:matrix/encryption.dart'; -import 'package:matrix/matrix.dart'; -import 'package:fluffychat/utils/platform_infos.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; + +import 'package:adaptive_dialog/adaptive_dialog.dart'; import 'package:flutter_gen/gen_l10n/l10n.dart'; -import '../widgets/adaptive_flat_button.dart'; import 'package:future_loading_dialog/future_loading_dialog.dart'; +import 'package:matrix/encryption.dart'; +import 'package:matrix/matrix.dart'; + +import 'package:fluffychat/utils/platform_infos.dart'; +import 'package:fluffychat/widgets/avatar.dart'; import '../utils/beautify_string_extension.dart'; +import '../widgets/adaptive_flat_button.dart'; class KeyVerificationDialog extends StatefulWidget { Future show(BuildContext context) => PlatformInfos.isCupertinoStyle diff --git a/lib/pages/login.dart b/lib/pages/login.dart index a89fe71b..7814536e 100644 --- a/lib/pages/login.dart +++ b/lib/pages/login.dart @@ -1,18 +1,17 @@ import 'dart:async'; -import 'package:adaptive_dialog/adaptive_dialog.dart'; - -import 'package:matrix/matrix.dart'; -import 'package:future_loading_dialog/future_loading_dialog.dart'; -import 'package:fluffychat/widgets/matrix.dart'; - import 'package:flutter/material.dart'; -import 'package:flutter_gen/gen_l10n/l10n.dart'; -import '../utils/platform_infos.dart'; + +import 'package:adaptive_dialog/adaptive_dialog.dart'; import 'package:email_validator/email_validator.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:fluffychat/widgets/matrix.dart'; import '../config/app_config.dart'; import '../config/setting_keys.dart'; - +import '../utils/platform_infos.dart'; import 'views/login_view.dart'; class Login extends StatefulWidget { diff --git a/lib/pages/new_group.dart b/lib/pages/new_group.dart index 3e3b4fef..aaa5f3f4 100644 --- a/lib/pages/new_group.dart +++ b/lib/pages/new_group.dart @@ -1,10 +1,12 @@ -import 'package:matrix/matrix.dart' as sdk; -import 'package:fluffychat/pages/views/new_group_view.dart'; -import 'package:future_loading_dialog/future_loading_dialog.dart'; -import 'package:fluffychat/widgets/matrix.dart'; import 'package:flutter/material.dart'; + +import 'package:future_loading_dialog/future_loading_dialog.dart'; +import 'package:matrix/matrix.dart' as sdk; import 'package:vrouter/vrouter.dart'; +import 'package:fluffychat/pages/views/new_group_view.dart'; +import 'package:fluffychat/widgets/matrix.dart'; + class NewGroup extends StatefulWidget { const NewGroup({Key key}) : super(key: key); diff --git a/lib/pages/new_private_chat.dart b/lib/pages/new_private_chat.dart index df83c96a..e079f06d 100644 --- a/lib/pages/new_private_chat.dart +++ b/lib/pages/new_private_chat.dart @@ -1,13 +1,15 @@ -import 'package:fluffychat/pages/qr_scanner_modal.dart'; -import 'package:fluffychat/utils/url_launcher.dart'; -import 'package:matrix/matrix.dart'; -import 'package:fluffychat/utils/fluffy_share.dart'; -import 'package:fluffychat/pages/views/new_private_chat_view.dart'; -import 'package:fluffychat/widgets/matrix.dart'; import 'package:flutter/material.dart'; + import 'package:flutter_gen/gen_l10n/l10n.dart'; +import 'package:matrix/matrix.dart'; import 'package:permission_handler/permission_handler.dart'; +import 'package:fluffychat/pages/qr_scanner_modal.dart'; +import 'package:fluffychat/pages/views/new_private_chat_view.dart'; +import 'package:fluffychat/utils/fluffy_share.dart'; +import 'package:fluffychat/utils/url_launcher.dart'; +import 'package:fluffychat/widgets/matrix.dart'; + class NewPrivateChat extends StatefulWidget { const NewPrivateChat({Key key}) : super(key: key); diff --git a/lib/pages/new_space.dart b/lib/pages/new_space.dart index 5c75810f..39515d3b 100644 --- a/lib/pages/new_space.dart +++ b/lib/pages/new_space.dart @@ -1,11 +1,13 @@ -import 'package:matrix/matrix.dart' as sdk; -import 'package:fluffychat/pages/views/new_space_view.dart'; -import 'package:future_loading_dialog/future_loading_dialog.dart'; -import 'package:fluffychat/widgets/matrix.dart'; import 'package:flutter/material.dart'; + +import 'package:future_loading_dialog/future_loading_dialog.dart'; +import 'package:matrix/matrix.dart' as sdk; import 'package:matrix/matrix.dart'; import 'package:vrouter/vrouter.dart'; +import 'package:fluffychat/pages/views/new_space_view.dart'; +import 'package:fluffychat/widgets/matrix.dart'; + class NewSpace extends StatefulWidget { const NewSpace({Key key}) : super(key: key); diff --git a/lib/pages/permission_slider_dialog.dart b/lib/pages/permission_slider_dialog.dart index 359b8d17..04fa2efb 100644 --- a/lib/pages/permission_slider_dialog.dart +++ b/lib/pages/permission_slider_dialog.dart @@ -1,9 +1,11 @@ -import 'package:fluffychat/widgets/adaptive_flat_button.dart'; -import 'package:fluffychat/utils/platform_infos.dart'; -import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + import 'package:flutter_gen/gen_l10n/l10n.dart'; +import 'package:fluffychat/utils/platform_infos.dart'; +import 'package:fluffychat/widgets/adaptive_flat_button.dart'; + class PermissionSliderDialog extends StatefulWidget { const PermissionSliderDialog({ Key key, diff --git a/lib/pages/qr_scanner_modal.dart b/lib/pages/qr_scanner_modal.dart index 221e62d8..ed8f4749 100644 --- a/lib/pages/qr_scanner_modal.dart +++ b/lib/pages/qr_scanner_modal.dart @@ -1,10 +1,12 @@ import 'dart:async'; import 'dart:io'; -import 'package:fluffychat/utils/url_launcher.dart'; import 'package:flutter/material.dart'; -import 'package:qr_code_scanner/qr_code_scanner.dart'; + import 'package:flutter_gen/gen_l10n/l10n.dart'; +import 'package:qr_code_scanner/qr_code_scanner.dart'; + +import 'package:fluffychat/utils/url_launcher.dart'; class QrScannerModal extends StatefulWidget { const QrScannerModal({Key key}) : super(key: key); diff --git a/lib/pages/recording_dialog.dart b/lib/pages/recording_dialog.dart index 2fe49abd..06c54553 100644 --- a/lib/pages/recording_dialog.dart +++ b/lib/pages/recording_dialog.dart @@ -1,14 +1,16 @@ import 'dart:async'; -import 'package:fluffychat/utils/platform_infos.dart'; -import 'package:fluffychat/utils/sentry_controller.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; + import 'package:flutter_gen/gen_l10n/l10n.dart'; import 'package:path_provider/path_provider.dart'; import 'package:record/record.dart'; import 'package:wakelock/wakelock.dart'; +import 'package:fluffychat/utils/platform_infos.dart'; +import 'package:fluffychat/utils/sentry_controller.dart'; + class RecordingDialog extends StatefulWidget { static const String recordingFileType = 'm4a'; const RecordingDialog({ diff --git a/lib/pages/search.dart b/lib/pages/search.dart index 227f988b..eeb02331 100644 --- a/lib/pages/search.dart +++ b/lib/pages/search.dart @@ -1,13 +1,14 @@ import 'dart:async'; -import 'package:adaptive_dialog/adaptive_dialog.dart'; - -import 'package:matrix/matrix.dart'; -import 'package:fluffychat/widgets/matrix.dart'; import 'package:flutter/material.dart'; + +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:vrouter/vrouter.dart'; + +import 'package:fluffychat/widgets/matrix.dart'; import 'views/search_view.dart'; class Search extends StatefulWidget { diff --git a/lib/pages/send_file_dialog.dart b/lib/pages/send_file_dialog.dart index 667d0f7a..d0d6d4d2 100644 --- a/lib/pages/send_file_dialog.dart +++ b/lib/pages/send_file_dialog.dart @@ -1,11 +1,12 @@ -import 'package:matrix/matrix.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_gen/gen_l10n/l10n.dart'; +import 'package:flutter_gen/gen_l10n/l10n.dart'; import 'package:future_loading_dialog/future_loading_dialog.dart'; +import 'package:matrix/matrix.dart'; + import '../utils/matrix_sdk_extensions.dart/matrix_file_extension.dart'; -import '../utils/room_send_file_extension.dart'; import '../utils/resize_image.dart'; +import '../utils/room_send_file_extension.dart'; class SendFileDialog extends StatefulWidget { final Room room; diff --git a/lib/pages/send_location_dialog.dart b/lib/pages/send_location_dialog.dart index 86156ac3..33431471 100644 --- a/lib/pages/send_location_dialog.dart +++ b/lib/pages/send_location_dialog.dart @@ -1,13 +1,14 @@ import 'dart:async'; -import 'package:fluffychat/utils/platform_infos.dart'; import 'package:flutter/cupertino.dart'; -import 'package:matrix/matrix.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_gen/gen_l10n/l10n.dart'; -import 'package:geolocator/geolocator.dart'; -import 'package:future_loading_dialog/future_loading_dialog.dart'; +import 'package:flutter_gen/gen_l10n/l10n.dart'; +import 'package:future_loading_dialog/future_loading_dialog.dart'; +import 'package:geolocator/geolocator.dart'; +import 'package:matrix/matrix.dart'; + +import 'package:fluffychat/utils/platform_infos.dart'; import '../widgets/event_content/map_bubble.dart'; class SendLocationDialog extends StatefulWidget { diff --git a/lib/pages/settings.dart b/lib/pages/settings.dart index e8c2a27b..f22a82dc 100644 --- a/lib/pages/settings.dart +++ b/lib/pages/settings.dart @@ -1,19 +1,18 @@ import 'dart:async'; -import 'package:adaptive_dialog/adaptive_dialog.dart'; +import 'package:flutter/material.dart'; -import 'package:matrix/matrix.dart'; +import 'package:adaptive_dialog/adaptive_dialog.dart'; import 'package:file_picker_cross/file_picker_cross.dart'; +import 'package:flutter_gen/gen_l10n/l10n.dart'; +import 'package:future_loading_dialog/future_loading_dialog.dart'; +import 'package:image_picker/image_picker.dart'; +import 'package:matrix/matrix.dart'; import 'package:fluffychat/utils/platform_infos.dart'; import 'package:fluffychat/utils/sentry_controller.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_gen/gen_l10n/l10n.dart'; -import 'package:image_picker/image_picker.dart'; - -import 'views/settings_view.dart'; -import 'package:future_loading_dialog/future_loading_dialog.dart'; import '../widgets/matrix.dart'; +import 'views/settings_view.dart'; class Settings extends StatefulWidget { const Settings({Key key}) : super(key: key); diff --git a/lib/pages/settings_3pid.dart b/lib/pages/settings_3pid.dart index b8fcac79..05e5049a 100644 --- a/lib/pages/settings_3pid.dart +++ b/lib/pages/settings_3pid.dart @@ -1,10 +1,11 @@ -import 'package:adaptive_dialog/adaptive_dialog.dart'; -import 'package:matrix/matrix.dart'; -import 'package:future_loading_dialog/future_loading_dialog.dart'; -import 'package:fluffychat/widgets/matrix.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_gen/gen_l10n/l10n.dart'; +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:fluffychat/widgets/matrix.dart'; import 'views/settings_3pid_view.dart'; class Settings3Pid extends StatefulWidget { diff --git a/lib/pages/settings_account.dart b/lib/pages/settings_account.dart index ab1b68a2..582da393 100644 --- a/lib/pages/settings_account.dart +++ b/lib/pages/settings_account.dart @@ -1,14 +1,16 @@ -import 'package:adaptive_dialog/adaptive_dialog.dart'; -import 'package:fluffychat/config/app_config.dart'; -import 'package:fluffychat/config/setting_keys.dart'; -import 'package:fluffychat/pages/views/settings_account_view.dart'; -import 'package:fluffychat/widgets/matrix.dart'; import 'package:flutter/material.dart'; + +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:vrouter/vrouter.dart'; +import 'package:fluffychat/config/app_config.dart'; +import 'package:fluffychat/config/setting_keys.dart'; +import 'package:fluffychat/pages/views/settings_account_view.dart'; +import 'package:fluffychat/widgets/matrix.dart'; + class SettingsAccount extends StatefulWidget { const SettingsAccount({Key key}) : super(key: key); diff --git a/lib/pages/settings_emotes.dart b/lib/pages/settings_emotes.dart index 860a7582..f5d2fe60 100644 --- a/lib/pages/settings_emotes.dart +++ b/lib/pages/settings_emotes.dart @@ -1,16 +1,16 @@ -import 'package:adaptive_dialog/adaptive_dialog.dart'; - -import 'package:matrix/matrix.dart'; -import 'package:file_picker_cross/file_picker_cross.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; + +import 'package:adaptive_dialog/adaptive_dialog.dart'; +import 'package:file_picker_cross/file_picker_cross.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:vrouter/vrouter.dart'; -import 'package:future_loading_dialog/future_loading_dialog.dart'; -import 'views/settings_emotes_view.dart'; -import '../widgets/matrix.dart'; import '../utils/resize_image.dart'; +import '../widgets/matrix.dart'; +import 'views/settings_emotes_view.dart'; class EmotesSettings extends StatefulWidget { const EmotesSettings({Key key}) : super(key: key); diff --git a/lib/pages/settings_ignore_list.dart b/lib/pages/settings_ignore_list.dart index c3ba983e..58971616 100644 --- a/lib/pages/settings_ignore_list.dart +++ b/lib/pages/settings_ignore_list.dart @@ -1,8 +1,9 @@ -import 'package:future_loading_dialog/future_loading_dialog.dart'; import 'package:flutter/material.dart'; -import 'views/settings_ignore_list_view.dart'; +import 'package:future_loading_dialog/future_loading_dialog.dart'; + import '../widgets/matrix.dart'; +import 'views/settings_ignore_list_view.dart'; class SettingsIgnoreList extends StatefulWidget { final String initialUserId; diff --git a/lib/pages/settings_multiple_emotes.dart b/lib/pages/settings_multiple_emotes.dart index 5baa991d..9e5d657e 100644 --- a/lib/pages/settings_multiple_emotes.dart +++ b/lib/pages/settings_multiple_emotes.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; + import 'package:vrouter/vrouter.dart'; import 'views/settings_multiple_emotes_view.dart'; diff --git a/lib/pages/settings_notifications.dart b/lib/pages/settings_notifications.dart index 9ce11712..07bf7fa7 100644 --- a/lib/pages/settings_notifications.dart +++ b/lib/pages/settings_notifications.dart @@ -1,13 +1,14 @@ -import 'package:matrix/matrix.dart'; -import 'package:future_loading_dialog/future_loading_dialog.dart'; -import 'package:fluffychat/config/app_config.dart'; import 'package:flutter/material.dart'; + import 'package:flutter_gen/gen_l10n/l10n.dart'; import 'package:flutter_local_notifications/flutter_local_notifications.dart'; +import 'package:future_loading_dialog/future_loading_dialog.dart'; +import 'package:matrix/matrix.dart'; import 'package:open_noti_settings/open_noti_settings.dart'; -import 'views/settings_notifications_view.dart'; +import 'package:fluffychat/config/app_config.dart'; import '../widgets/matrix.dart'; +import 'views/settings_notifications_view.dart'; class NotificationSettingsItem { final PushRuleKind type; diff --git a/lib/pages/settings_security.dart b/lib/pages/settings_security.dart index 3139c11d..fbe3e39c 100644 --- a/lib/pages/settings_security.dart +++ b/lib/pages/settings_security.dart @@ -1,12 +1,13 @@ -import 'package:adaptive_dialog/adaptive_dialog.dart'; -import 'package:fluffychat/config/setting_keys.dart'; -import 'package:fluffychat/widgets/matrix.dart'; import 'package:flutter/material.dart'; + +import 'package:adaptive_dialog/adaptive_dialog.dart'; import 'package:flutter_app_lock/flutter_app_lock.dart'; +import 'package:flutter_gen/gen_l10n/l10n.dart'; import 'package:flutter_secure_storage/flutter_secure_storage.dart'; import 'package:future_loading_dialog/future_loading_dialog.dart'; -import 'package:flutter_gen/gen_l10n/l10n.dart'; +import 'package:fluffychat/config/setting_keys.dart'; +import 'package:fluffychat/widgets/matrix.dart'; import 'bootstrap_dialog.dart'; import 'views/settings_security_view.dart'; diff --git a/lib/pages/settings_style.dart b/lib/pages/settings_style.dart index d2134d53..a5cfe774 100644 --- a/lib/pages/settings_style.dart +++ b/lib/pages/settings_style.dart @@ -1,13 +1,14 @@ import 'dart:io'; -import 'package:adaptive_theme/adaptive_theme.dart'; -import 'package:fluffychat/config/app_config.dart'; -import 'package:fluffychat/config/setting_keys.dart'; import 'package:flutter/material.dart'; + +import 'package:adaptive_theme/adaptive_theme.dart'; import 'package:file_picker_cross/file_picker_cross.dart'; -import 'views/settings_style_view.dart'; +import 'package:fluffychat/config/app_config.dart'; +import 'package:fluffychat/config/setting_keys.dart'; import '../widgets/matrix.dart'; +import 'views/settings_style_view.dart'; class SettingsStyle extends StatefulWidget { const SettingsStyle({Key key}) : super(key: key); diff --git a/lib/pages/signup.dart b/lib/pages/signup.dart index 020316c7..c672a7a4 100644 --- a/lib/pages/signup.dart +++ b/lib/pages/signup.dart @@ -1,8 +1,10 @@ +import 'package:flutter/material.dart'; + +import 'package:flutter_gen/gen_l10n/l10n.dart'; + import 'package:fluffychat/pages/views/signup_view.dart'; import 'package:fluffychat/utils/platform_infos.dart'; import 'package:fluffychat/widgets/matrix.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_gen/gen_l10n/l10n.dart'; import '../utils/localized_exception_extension.dart'; class SignupPage extends StatefulWidget { diff --git a/lib/pages/sticker_picker_dialog.dart b/lib/pages/sticker_picker_dialog.dart index 45c0afee..5d6d52de 100644 --- a/lib/pages/sticker_picker_dialog.dart +++ b/lib/pages/sticker_picker_dialog.dart @@ -1,11 +1,12 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; + import 'package:flutter_gen/gen_l10n/l10n.dart'; import 'package:matrix/matrix.dart'; -import '../widgets/event_content/image_bubble.dart'; import '../widgets/avatar.dart'; import '../widgets/default_app_bar_search_field.dart'; +import '../widgets/event_content/image_bubble.dart'; class StickerPickerDialog extends StatefulWidget { final Room room; diff --git a/lib/pages/user_bottom_sheet.dart b/lib/pages/user_bottom_sheet.dart index 61143d99..5276cd5f 100644 --- a/lib/pages/user_bottom_sheet.dart +++ b/lib/pages/user_bottom_sheet.dart @@ -1,15 +1,14 @@ -import 'package:adaptive_dialog/adaptive_dialog.dart'; - -import 'package:matrix/matrix.dart'; -import 'package:fluffychat/pages/permission_slider_dialog.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_gen/gen_l10n/l10n.dart'; +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:vrouter/vrouter.dart'; -import 'views/user_bottom_sheet_view.dart'; +import 'package:fluffychat/pages/permission_slider_dialog.dart'; import '../widgets/matrix.dart'; +import 'views/user_bottom_sheet_view.dart'; class UserBottomSheet extends StatefulWidget { final User user; diff --git a/lib/pages/video_viewer.dart b/lib/pages/video_viewer.dart index a5d7deed..0eb68215 100644 --- a/lib/pages/video_viewer.dart +++ b/lib/pages/video_viewer.dart @@ -1,16 +1,17 @@ import 'dart:io'; -import 'package:matrix/matrix.dart'; import 'package:flutter/material.dart'; -import 'package:vrouter/vrouter.dart'; -import 'package:chewie/chewie.dart'; -import 'package:video_player/video_player.dart'; -import 'package:path_provider/path_provider.dart'; -import 'views/video_viewer_view.dart'; -import '../widgets/matrix.dart'; +import 'package:chewie/chewie.dart'; +import 'package:matrix/matrix.dart'; +import 'package:path_provider/path_provider.dart'; +import 'package:video_player/video_player.dart'; +import 'package:vrouter/vrouter.dart'; + import '../utils/matrix_sdk_extensions.dart/event_extension.dart'; import '../utils/platform_infos.dart'; +import '../widgets/matrix.dart'; +import 'views/video_viewer_view.dart'; class VideoViewer extends StatefulWidget { final Event event; diff --git a/lib/pages/views/archive_view.dart b/lib/pages/views/archive_view.dart index 8a18487a..a560eb2f 100644 --- a/lib/pages/views/archive_view.dart +++ b/lib/pages/views/archive_view.dart @@ -1,8 +1,10 @@ +import 'package:flutter/material.dart'; + +import 'package:flutter_gen/gen_l10n/l10n.dart'; import 'package:matrix/matrix.dart'; + import 'package:fluffychat/pages/archive.dart'; import 'package:fluffychat/widgets/list_items/chat_list_item.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_gen/gen_l10n/l10n.dart'; class ArchiveView extends StatelessWidget { final ArchiveController controller; diff --git a/lib/pages/views/chat_details_view.dart b/lib/pages/views/chat_details_view.dart index 43c5f297..6de736a0 100644 --- a/lib/pages/views/chat_details_view.dart +++ b/lib/pages/views/chat_details_view.dart @@ -1,21 +1,20 @@ +import 'package:flutter/material.dart'; + +import 'package:flutter_gen/gen_l10n/l10n.dart'; +import 'package:matrix/matrix.dart'; +import 'package:matrix_link_text/link_text.dart'; +import 'package:vrouter/vrouter.dart'; + import 'package:fluffychat/config/app_config.dart'; import 'package:fluffychat/pages/chat_details.dart'; -import 'package:fluffychat/widgets/avatar.dart'; -import 'package:fluffychat/widgets/matrix.dart'; import 'package:fluffychat/utils/fluffy_share.dart'; - -import 'package:matrix/matrix.dart'; - +import 'package:fluffychat/utils/matrix_sdk_extensions.dart/matrix_locals.dart'; +import 'package:fluffychat/widgets/avatar.dart'; import 'package:fluffychat/widgets/chat_settings_popup_menu.dart'; import 'package:fluffychat/widgets/content_banner.dart'; import 'package:fluffychat/widgets/layouts/max_width_body.dart'; import 'package:fluffychat/widgets/list_items/participant_list_item.dart'; -import 'package:fluffychat/utils/matrix_sdk_extensions.dart/matrix_locals.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_gen/gen_l10n/l10n.dart'; -import 'package:matrix_link_text/link_text.dart'; -import 'package:vrouter/vrouter.dart'; - +import 'package:fluffychat/widgets/matrix.dart'; import '../../utils/url_launcher.dart'; class ChatDetailsView extends StatelessWidget { diff --git a/lib/pages/views/chat_encryption_settings_view.dart b/lib/pages/views/chat_encryption_settings_view.dart index 8467d81a..708bd622 100644 --- a/lib/pages/views/chat_encryption_settings_view.dart +++ b/lib/pages/views/chat_encryption_settings_view.dart @@ -1,11 +1,13 @@ +import 'package:flutter/material.dart'; + +import 'package:flutter_gen/gen_l10n/l10n.dart'; import 'package:matrix/matrix.dart'; +import 'package:vrouter/vrouter.dart'; + import 'package:fluffychat/pages/chat_encryption_settings.dart'; import 'package:fluffychat/widgets/avatar.dart'; -import 'package:fluffychat/widgets/matrix.dart'; import 'package:fluffychat/widgets/layouts/max_width_body.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_gen/gen_l10n/l10n.dart'; -import 'package:vrouter/vrouter.dart'; +import 'package:fluffychat/widgets/matrix.dart'; import '../../utils/matrix_sdk_extensions.dart/device_extension.dart'; class ChatEncryptionSettingsView extends StatelessWidget { diff --git a/lib/pages/views/chat_list_view.dart b/lib/pages/views/chat_list_view.dart index e137514f..79aac655 100644 --- a/lib/pages/views/chat_list_view.dart +++ b/lib/pages/views/chat_list_view.dart @@ -1,22 +1,24 @@ import 'dart:math'; -import 'package:async/async.dart'; -import 'package:fluffychat/config/themes.dart'; -import 'package:fluffychat/widgets/avatar.dart'; -import 'package:flutter/widgets.dart'; -import 'package:matrix/matrix.dart'; -import 'package:fluffychat/pages/chat_list.dart'; -import 'package:fluffychat/widgets/connection_status_header.dart'; -import 'package:fluffychat/widgets/list_items/chat_list_item.dart'; import 'package:flutter/cupertino.dart'; -import 'package:fluffychat/config/app_config.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -import 'package:vrouter/vrouter.dart'; -import '../../widgets/matrix.dart'; -import '../../utils/account_bundles.dart'; +import 'package:flutter/widgets.dart'; + +import 'package:async/async.dart'; import 'package:flutter_gen/gen_l10n/l10n.dart'; +import 'package:matrix/matrix.dart'; +import 'package:vrouter/vrouter.dart'; + +import 'package:fluffychat/config/app_config.dart'; +import 'package:fluffychat/config/themes.dart'; +import 'package:fluffychat/pages/chat_list.dart'; +import 'package:fluffychat/widgets/avatar.dart'; +import 'package:fluffychat/widgets/connection_status_header.dart'; +import 'package:fluffychat/widgets/list_items/chat_list_item.dart'; +import '../../utils/account_bundles.dart'; import '../../utils/stream_extension.dart'; +import '../../widgets/matrix.dart'; class ChatListView extends StatelessWidget { final ChatListController controller; diff --git a/lib/pages/views/chat_permissions_settings_view.dart b/lib/pages/views/chat_permissions_settings_view.dart index b9bc4c8e..07dbd6ee 100644 --- a/lib/pages/views/chat_permissions_settings_view.dart +++ b/lib/pages/views/chat_permissions_settings_view.dart @@ -1,13 +1,14 @@ -import 'package:fluffychat/pages/chat_permissions_settings.dart'; -import 'package:fluffychat/widgets/list_items/permission_list_tile.dart'; -import 'package:fluffychat/widgets/layouts/max_width_body.dart'; -import 'package:fluffychat/widgets/matrix.dart'; - import 'package:flutter/material.dart'; + import 'package:flutter_gen/gen_l10n/l10n.dart'; import 'package:matrix/matrix.dart'; import 'package:vrouter/vrouter.dart'; +import 'package:fluffychat/pages/chat_permissions_settings.dart'; +import 'package:fluffychat/widgets/layouts/max_width_body.dart'; +import 'package:fluffychat/widgets/list_items/permission_list_tile.dart'; +import 'package:fluffychat/widgets/matrix.dart'; + class ChatPermissionsSettingsView extends StatelessWidget { final ChatPermissionsSettingsController controller; diff --git a/lib/pages/views/chat_view.dart b/lib/pages/views/chat_view.dart index 634e95f1..f2a2169b 100644 --- a/lib/pages/views/chat_view.dart +++ b/lib/pages/views/chat_view.dart @@ -1,33 +1,33 @@ import 'dart:ui'; -import 'package:emoji_picker_flutter/emoji_picker_flutter.dart'; -import 'package:fluffychat/config/app_config.dart'; -import 'package:matrix/matrix.dart'; -import 'package:fluffychat/pages/chat.dart'; -import 'package:fluffychat/widgets/avatar.dart'; -import 'package:fluffychat/widgets/chat_settings_popup_menu.dart'; -import 'package:fluffychat/widgets/connection_status_header.dart'; -import 'package:fluffychat/widgets/input_bar.dart'; -import 'package:fluffychat/widgets/unread_badge_back_button.dart'; - -import 'package:future_loading_dialog/future_loading_dialog.dart'; -import 'package:fluffychat/widgets/encryption_button.dart'; -import 'package:fluffychat/widgets/event_content/message.dart'; -import 'package:fluffychat/widgets/matrix.dart'; -import 'package:fluffychat/widgets/event_content/reply_content.dart'; -import 'package:fluffychat/pages/user_bottom_sheet.dart'; -import 'package:fluffychat/config/app_emojis.dart'; -import 'package:fluffychat/utils/matrix_sdk_extensions.dart/matrix_locals.dart'; -import 'package:fluffychat/utils/platform_infos.dart'; -import 'package:fluffychat/utils/room_status_extension.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; + +import 'package:emoji_picker_flutter/emoji_picker_flutter.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:scroll_to_index/scroll_to_index.dart'; import 'package:swipe_to_action/swipe_to_action.dart'; import 'package:vrouter/vrouter.dart'; +import 'package:fluffychat/config/app_config.dart'; +import 'package:fluffychat/config/app_emojis.dart'; +import 'package:fluffychat/pages/chat.dart'; +import 'package:fluffychat/pages/user_bottom_sheet.dart'; +import 'package:fluffychat/utils/matrix_sdk_extensions.dart/matrix_locals.dart'; +import 'package:fluffychat/utils/platform_infos.dart'; +import 'package:fluffychat/utils/room_status_extension.dart'; +import 'package:fluffychat/widgets/avatar.dart'; +import 'package:fluffychat/widgets/chat_settings_popup_menu.dart'; +import 'package:fluffychat/widgets/connection_status_header.dart'; +import 'package:fluffychat/widgets/encryption_button.dart'; +import 'package:fluffychat/widgets/event_content/message.dart'; +import 'package:fluffychat/widgets/event_content/reply_content.dart'; +import 'package:fluffychat/widgets/input_bar.dart'; +import 'package:fluffychat/widgets/matrix.dart'; +import 'package:fluffychat/widgets/unread_badge_back_button.dart'; import '../../utils/stream_extension.dart'; class ChatView extends StatelessWidget { @@ -533,9 +533,10 @@ class ChatView extends StatelessWidget { ), controller.selectedEvents.length == 1 ? controller.selectedEvents.first - .getDisplayEvent( - controller.timeline) - .status.isSent + .getDisplayEvent( + controller.timeline) + .status + .isSent ? SizedBox( height: 56, child: TextButton( diff --git a/lib/pages/views/device_settings_view.dart b/lib/pages/views/device_settings_view.dart index 4c052d62..92043462 100644 --- a/lib/pages/views/device_settings_view.dart +++ b/lib/pages/views/device_settings_view.dart @@ -1,8 +1,9 @@ -import 'package:fluffychat/pages/device_settings.dart'; -import 'package:fluffychat/widgets/layouts/max_width_body.dart'; import 'package:flutter/material.dart'; + import 'package:flutter_gen/gen_l10n/l10n.dart'; +import 'package:fluffychat/pages/device_settings.dart'; +import 'package:fluffychat/widgets/layouts/max_width_body.dart'; import '../../widgets/list_items/user_device_list_item.dart'; class DevicesSettingsView extends StatelessWidget { diff --git a/lib/pages/views/homeserver_picker_view.dart b/lib/pages/views/homeserver_picker_view.dart index 6766ff98..1fcbf16b 100644 --- a/lib/pages/views/homeserver_picker_view.dart +++ b/lib/pages/views/homeserver_picker_view.dart @@ -1,22 +1,21 @@ -import 'package:cached_network_image/cached_network_image.dart'; -import 'package:fluffychat/widgets/matrix.dart'; import 'package:flutter/cupertino.dart'; +import 'package:flutter/foundation.dart'; +import 'package:flutter/material.dart'; + +import 'package:cached_network_image/cached_network_image.dart'; +import 'package:flutter_gen/gen_l10n/l10n.dart'; +import 'package:matrix/matrix.dart'; +import 'package:url_launcher/url_launcher.dart'; import 'package:vrouter/vrouter.dart'; -import '../homeserver_picker.dart'; +import 'package:fluffychat/config/app_config.dart'; +import 'package:fluffychat/utils/platform_infos.dart'; import 'package:fluffychat/widgets/default_app_bar_search_field.dart'; import 'package:fluffychat/widgets/fluffy_banner.dart'; -import 'package:fluffychat/config/app_config.dart'; import 'package:fluffychat/widgets/layouts/one_page_card.dart'; -import 'package:fluffychat/utils/platform_infos.dart'; - -import 'package:flutter/foundation.dart'; -import 'package:flutter_gen/gen_l10n/l10n.dart'; -import 'package:flutter/material.dart'; -import 'package:url_launcher/url_launcher.dart'; +import 'package:fluffychat/widgets/matrix.dart'; import '../../utils/localized_exception_extension.dart'; - -import 'package:matrix/matrix.dart'; +import '../homeserver_picker.dart'; class HomeserverPickerView extends StatelessWidget { final HomeserverPickerController controller; diff --git a/lib/pages/views/image_viewer_view.dart b/lib/pages/views/image_viewer_view.dart index 7fe61a38..884b2468 100644 --- a/lib/pages/views/image_viewer_view.dart +++ b/lib/pages/views/image_viewer_view.dart @@ -1,8 +1,10 @@ -import '../image_viewer.dart'; -import 'package:fluffychat/widgets/event_content/image_bubble.dart'; import 'package:flutter/material.dart'; + import 'package:flutter_gen/gen_l10n/l10n.dart'; +import 'package:fluffychat/widgets/event_content/image_bubble.dart'; +import '../image_viewer.dart'; + class ImageViewerView extends StatelessWidget { final ImageViewerController controller; diff --git a/lib/pages/views/invitation_selection_view.dart b/lib/pages/views/invitation_selection_view.dart index 4e26e828..a5364aba 100644 --- a/lib/pages/views/invitation_selection_view.dart +++ b/lib/pages/views/invitation_selection_view.dart @@ -1,13 +1,14 @@ -import 'package:fluffychat/pages/invitation_selection.dart'; -import 'package:fluffychat/widgets/default_app_bar_search_field.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_gen/gen_l10n/l10n.dart'; import 'package:matrix/matrix.dart'; +import 'package:vrouter/vrouter.dart'; + +import 'package:fluffychat/pages/invitation_selection.dart'; import 'package:fluffychat/widgets/avatar.dart'; +import 'package:fluffychat/widgets/default_app_bar_search_field.dart'; import 'package:fluffychat/widgets/layouts/max_width_body.dart'; import 'package:fluffychat/widgets/matrix.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_gen/gen_l10n/l10n.dart'; -import 'package:vrouter/vrouter.dart'; class InvitationSelectionView extends StatelessWidget { final InvitationSelectionController controller; diff --git a/lib/pages/views/login_view.dart b/lib/pages/views/login_view.dart index 4b871de4..20cabf78 100644 --- a/lib/pages/views/login_view.dart +++ b/lib/pages/views/login_view.dart @@ -1,8 +1,9 @@ +import 'package:flutter/material.dart'; + +import 'package:flutter_gen/gen_l10n/l10n.dart'; + import 'package:fluffychat/widgets/layouts/one_page_card.dart'; import 'package:fluffychat/widgets/matrix.dart'; - -import 'package:flutter/material.dart'; -import 'package:flutter_gen/gen_l10n/l10n.dart'; import '../login.dart'; class LoginView extends StatelessWidget { diff --git a/lib/pages/views/new_group_view.dart b/lib/pages/views/new_group_view.dart index 9186d7f0..31f67cf7 100644 --- a/lib/pages/views/new_group_view.dart +++ b/lib/pages/views/new_group_view.dart @@ -1,7 +1,9 @@ +import 'package:flutter/material.dart'; + +import 'package:flutter_gen/gen_l10n/l10n.dart'; + import 'package:fluffychat/pages/new_group.dart'; import 'package:fluffychat/widgets/layouts/max_width_body.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_gen/gen_l10n/l10n.dart'; class NewGroupView extends StatelessWidget { final NewGroupController controller; diff --git a/lib/pages/views/new_private_chat_view.dart b/lib/pages/views/new_private_chat_view.dart index 5c2e479b..87d88eaa 100644 --- a/lib/pages/views/new_private_chat_view.dart +++ b/lib/pages/views/new_private_chat_view.dart @@ -1,14 +1,16 @@ import 'dart:math'; +import 'package:flutter/material.dart'; + +import 'package:flutter_gen/gen_l10n/l10n.dart'; +import 'package:qr_flutter/qr_flutter.dart'; +import 'package:vrouter/vrouter.dart'; + import 'package:fluffychat/config/app_config.dart'; import 'package:fluffychat/pages/new_private_chat.dart'; import 'package:fluffychat/utils/platform_infos.dart'; import 'package:fluffychat/widgets/layouts/max_width_body.dart'; import 'package:fluffychat/widgets/matrix.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_gen/gen_l10n/l10n.dart'; -import 'package:qr_flutter/qr_flutter.dart'; -import 'package:vrouter/vrouter.dart'; class NewPrivateChatView extends StatelessWidget { final NewPrivateChatController controller; diff --git a/lib/pages/views/new_space_view.dart b/lib/pages/views/new_space_view.dart index b139dcab..06b489c6 100644 --- a/lib/pages/views/new_space_view.dart +++ b/lib/pages/views/new_space_view.dart @@ -1,7 +1,8 @@ -import 'package:fluffychat/widgets/layouts/max_width_body.dart'; import 'package:flutter/material.dart'; + import 'package:flutter_gen/gen_l10n/l10n.dart'; +import 'package:fluffychat/widgets/layouts/max_width_body.dart'; import '../new_space.dart'; class NewSpaceView extends StatelessWidget { diff --git a/lib/pages/views/search_view.dart b/lib/pages/views/search_view.dart index 1d5956fa..aefac0d6 100644 --- a/lib/pages/views/search_view.dart +++ b/lib/pages/views/search_view.dart @@ -1,13 +1,15 @@ +import 'package:flutter/material.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:vrouter/vrouter.dart'; + import 'package:fluffychat/widgets/avatar.dart'; import 'package:fluffychat/widgets/contacts_list.dart'; import 'package:fluffychat/widgets/default_app_bar_search_field.dart'; import 'package:fluffychat/widgets/list_items/chat_list_item.dart'; import 'package:fluffychat/widgets/matrix.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_gen/gen_l10n/l10n.dart'; -import 'package:future_loading_dialog/future_loading_dialog.dart'; -import 'package:vrouter/vrouter.dart'; import '../../utils/localized_exception_extension.dart'; import '../../utils/platform_infos.dart'; import '../search.dart'; diff --git a/lib/pages/views/settings_3pid_view.dart b/lib/pages/views/settings_3pid_view.dart index c27dc908..d72858b2 100644 --- a/lib/pages/views/settings_3pid_view.dart +++ b/lib/pages/views/settings_3pid_view.dart @@ -1,9 +1,11 @@ +import 'package:flutter/material.dart'; + +import 'package:flutter_gen/gen_l10n/l10n.dart'; import 'package:matrix/matrix.dart'; + import 'package:fluffychat/pages/settings_3pid.dart'; import 'package:fluffychat/widgets/layouts/max_width_body.dart'; import 'package:fluffychat/widgets/matrix.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_gen/gen_l10n/l10n.dart'; class Settings3PidView extends StatelessWidget { final Settings3PidController controller; diff --git a/lib/pages/views/settings_account_view.dart b/lib/pages/views/settings_account_view.dart index fa098d53..85c7b89d 100644 --- a/lib/pages/views/settings_account_view.dart +++ b/lib/pages/views/settings_account_view.dart @@ -1,12 +1,13 @@ +import 'package:flutter/material.dart'; + +import 'package:flutter_gen/gen_l10n/l10n.dart'; +import 'package:matrix/matrix.dart'; +import 'package:vrouter/vrouter.dart'; + import 'package:fluffychat/config/app_config.dart'; import 'package:fluffychat/utils/fluffy_share.dart'; import 'package:fluffychat/widgets/layouts/max_width_body.dart'; import 'package:fluffychat/widgets/matrix.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_gen/gen_l10n/l10n.dart'; -import 'package:vrouter/vrouter.dart'; -import 'package:matrix/matrix.dart'; - import '../settings_account.dart'; class SettingsAccountView extends StatelessWidget { diff --git a/lib/pages/views/settings_chat_view.dart b/lib/pages/views/settings_chat_view.dart index 63f85984..247f2764 100644 --- a/lib/pages/views/settings_chat_view.dart +++ b/lib/pages/views/settings_chat_view.dart @@ -1,12 +1,13 @@ +import 'package:flutter/material.dart'; + +import 'package:flutter_gen/gen_l10n/l10n.dart'; +import 'package:vrouter/vrouter.dart'; + import 'package:fluffychat/config/app_config.dart'; import 'package:fluffychat/config/setting_keys.dart'; import 'package:fluffychat/utils/platform_infos.dart'; import 'package:fluffychat/widgets/layouts/max_width_body.dart'; import 'package:fluffychat/widgets/settings_switch_list_tile.dart'; -import 'package:flutter/material.dart'; -import 'package:vrouter/vrouter.dart'; -import 'package:flutter_gen/gen_l10n/l10n.dart'; - import '../settings_chat.dart'; class SettingsChatView extends StatelessWidget { diff --git a/lib/pages/views/settings_emotes_view.dart b/lib/pages/views/settings_emotes_view.dart index e027afc3..e8c820bb 100644 --- a/lib/pages/views/settings_emotes_view.dart +++ b/lib/pages/views/settings_emotes_view.dart @@ -1,11 +1,13 @@ -import 'package:fluffychat/utils/platform_infos.dart'; -import 'package:cached_network_image/cached_network_image.dart'; -import 'package:matrix/matrix.dart'; -import 'package:fluffychat/widgets/layouts/max_width_body.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; + +import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter_gen/gen_l10n/l10n.dart'; +import 'package:matrix/matrix.dart'; + +import 'package:fluffychat/utils/platform_infos.dart'; +import 'package:fluffychat/widgets/layouts/max_width_body.dart'; import '../../widgets/matrix.dart'; import '../settings_emotes.dart'; diff --git a/lib/pages/views/settings_ignore_list_view.dart b/lib/pages/views/settings_ignore_list_view.dart index 1b12a920..43781409 100644 --- a/lib/pages/views/settings_ignore_list_view.dart +++ b/lib/pages/views/settings_ignore_list_view.dart @@ -1,12 +1,13 @@ +import 'package:flutter/material.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:fluffychat/widgets/avatar.dart'; import 'package:fluffychat/widgets/layouts/max_width_body.dart'; -import 'package:future_loading_dialog/future_loading_dialog.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_gen/gen_l10n/l10n.dart'; - -import '../settings_ignore_list.dart'; import '../../widgets/matrix.dart'; +import '../settings_ignore_list.dart'; class SettingsIgnoreListView extends StatelessWidget { final SettingsIgnoreListController controller; diff --git a/lib/pages/views/settings_multiple_emotes_view.dart b/lib/pages/views/settings_multiple_emotes_view.dart index c1bf95d1..5ef8eb03 100644 --- a/lib/pages/views/settings_multiple_emotes_view.dart +++ b/lib/pages/views/settings_multiple_emotes_view.dart @@ -1,9 +1,11 @@ +import 'package:flutter/material.dart'; + +import 'package:flutter_gen/gen_l10n/l10n.dart'; +import 'package:matrix/matrix.dart'; +import 'package:vrouter/vrouter.dart'; + import 'package:fluffychat/pages/settings_multiple_emotes.dart'; import 'package:fluffychat/widgets/matrix.dart'; -import 'package:flutter/material.dart'; -import 'package:matrix/matrix.dart'; -import 'package:flutter_gen/gen_l10n/l10n.dart'; -import 'package:vrouter/vrouter.dart'; class MultipleEmotesSettingsView extends StatelessWidget { final MultipleEmotesSettingsController controller; diff --git a/lib/pages/views/settings_notifications_view.dart b/lib/pages/views/settings_notifications_view.dart index 5be40f3b..15a52bfc 100644 --- a/lib/pages/views/settings_notifications_view.dart +++ b/lib/pages/views/settings_notifications_view.dart @@ -1,15 +1,16 @@ import 'dart:io'; -import 'package:matrix/matrix.dart'; -import 'package:fluffychat/widgets/layouts/max_width_body.dart'; -import 'package:future_loading_dialog/future_loading_dialog.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_gen/gen_l10n/l10n.dart'; -import '../../utils/localized_exception_extension.dart'; -import '../settings_notifications.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:fluffychat/widgets/layouts/max_width_body.dart'; +import '../../utils/localized_exception_extension.dart'; import '../../widgets/matrix.dart'; +import '../settings_notifications.dart'; class SettingsNotificationsView extends StatelessWidget { final SettingsNotificationsController controller; diff --git a/lib/pages/views/settings_security_view.dart b/lib/pages/views/settings_security_view.dart index 7a8d0c2b..637602c0 100644 --- a/lib/pages/views/settings_security_view.dart +++ b/lib/pages/views/settings_security_view.dart @@ -1,12 +1,13 @@ -import 'package:adaptive_dialog/adaptive_dialog.dart'; -import 'package:fluffychat/utils/platform_infos.dart'; -import 'package:fluffychat/widgets/layouts/max_width_body.dart'; -import 'package:fluffychat/widgets/matrix.dart'; import 'package:flutter/material.dart'; + +import 'package:adaptive_dialog/adaptive_dialog.dart'; import 'package:flutter_gen/gen_l10n/l10n.dart'; import 'package:vrouter/vrouter.dart'; import 'package:fluffychat/utils/beautify_string_extension.dart'; +import 'package:fluffychat/utils/platform_infos.dart'; +import 'package:fluffychat/widgets/layouts/max_width_body.dart'; +import 'package:fluffychat/widgets/matrix.dart'; import '../settings_security.dart'; class SettingsSecurityView extends StatelessWidget { diff --git a/lib/pages/views/settings_style_view.dart b/lib/pages/views/settings_style_view.dart index b9f0ca22..c6ae9433 100644 --- a/lib/pages/views/settings_style_view.dart +++ b/lib/pages/views/settings_style_view.dart @@ -1,8 +1,9 @@ -import 'package:adaptive_theme/adaptive_theme.dart'; -import 'package:fluffychat/widgets/layouts/max_width_body.dart'; import 'package:flutter/material.dart'; + +import 'package:adaptive_theme/adaptive_theme.dart'; import 'package:flutter_gen/gen_l10n/l10n.dart'; +import 'package:fluffychat/widgets/layouts/max_width_body.dart'; import '../../config/app_config.dart'; import '../../widgets/matrix.dart'; import '../settings_style.dart'; diff --git a/lib/pages/views/settings_view.dart b/lib/pages/views/settings_view.dart index a6db0b1b..8ab0be66 100644 --- a/lib/pages/views/settings_view.dart +++ b/lib/pages/views/settings_view.dart @@ -1,12 +1,13 @@ -import 'package:fluffychat/config/app_config.dart'; -import 'package:fluffychat/utils/platform_infos.dart'; import 'package:flutter/material.dart'; + import 'package:flutter_gen/gen_l10n/l10n.dart'; import 'package:url_launcher/url_launcher.dart'; import 'package:vrouter/vrouter.dart'; -import '../../widgets/content_banner.dart'; +import 'package:fluffychat/config/app_config.dart'; +import 'package:fluffychat/utils/platform_infos.dart'; import '../../config/app_config.dart'; +import '../../widgets/content_banner.dart'; import '../settings.dart'; class SettingsView extends StatelessWidget { diff --git a/lib/pages/views/signup_view.dart b/lib/pages/views/signup_view.dart index 35601510..678c9cf6 100644 --- a/lib/pages/views/signup_view.dart +++ b/lib/pages/views/signup_view.dart @@ -1,8 +1,9 @@ -import 'package:fluffychat/widgets/layouts/one_page_card.dart'; -import 'package:fluffychat/widgets/matrix.dart'; import 'package:flutter/material.dart'; + import 'package:flutter_gen/gen_l10n/l10n.dart'; +import 'package:fluffychat/widgets/layouts/one_page_card.dart'; +import 'package:fluffychat/widgets/matrix.dart'; import '../signup.dart'; class SignupPageView extends StatelessWidget { diff --git a/lib/pages/views/user_bottom_sheet_view.dart b/lib/pages/views/user_bottom_sheet_view.dart index 8546500d..6c226db7 100644 --- a/lib/pages/views/user_bottom_sheet_view.dart +++ b/lib/pages/views/user_bottom_sheet_view.dart @@ -1,14 +1,16 @@ import 'dart:math'; +import 'package:flutter/material.dart'; + +import 'package:flutter_gen/gen_l10n/l10n.dart'; import 'package:matrix/matrix.dart'; + import 'package:fluffychat/config/themes.dart'; import 'package:fluffychat/utils/fluffy_share.dart'; -import 'package:flutter/material.dart'; +import '../../utils/matrix_sdk_extensions.dart/presence_extension.dart'; import '../../widgets/content_banner.dart'; import '../../widgets/matrix.dart'; import '../user_bottom_sheet.dart'; -import '../../utils/matrix_sdk_extensions.dart/presence_extension.dart'; -import 'package:flutter_gen/gen_l10n/l10n.dart'; class UserBottomSheetView extends StatelessWidget { final UserBottomSheetController controller; diff --git a/lib/pages/views/video_viewer_view.dart b/lib/pages/views/video_viewer_view.dart index c5fa3155..718e15a2 100644 --- a/lib/pages/views/video_viewer_view.dart +++ b/lib/pages/views/video_viewer_view.dart @@ -1,7 +1,9 @@ -import '../video_viewer.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_gen/gen_l10n/l10n.dart'; + import 'package:chewie/chewie.dart'; +import 'package:flutter_gen/gen_l10n/l10n.dart'; + +import '../video_viewer.dart'; class VideoViewerView extends StatelessWidget { final VideoViewerController controller; diff --git a/lib/utils/background_push.dart b/lib/utils/background_push.dart index 53ad3254..baf2b444 100644 --- a/lib/utils/background_push.dart +++ b/lib/utils/background_push.dart @@ -22,22 +22,25 @@ import 'dart:convert'; import 'dart:io'; import 'dart:ui'; -import 'package:flutter_cache_manager/flutter_cache_manager.dart'; -import 'package:matrix/matrix.dart'; -//import 'package:fcm_shared_isolate/fcm_shared_isolate.dart'; - import 'package:flutter/material.dart'; -import 'package:http/http.dart' as http; -import 'package:unifiedpush/unifiedpush.dart'; + +import 'package:flutter_cache_manager/flutter_cache_manager.dart'; import 'package:flutter_gen/gen_l10n/l10n.dart'; import 'package:flutter_gen/gen_l10n/l10n_en.dart'; import 'package:flutter_local_notifications/flutter_local_notifications.dart'; +import 'package:http/http.dart' as http; +import 'package:matrix/matrix.dart'; +import 'package:unifiedpush/unifiedpush.dart'; import 'package:vrouter/vrouter.dart'; -import 'platform_infos.dart'; + import '../config/app_config.dart'; import '../config/setting_keys.dart'; import 'famedlysdk_store.dart'; import 'matrix_sdk_extensions.dart/matrix_locals.dart'; +import 'platform_infos.dart'; + +//import 'package:fcm_shared_isolate/fcm_shared_isolate.dart'; + class NoTokenException implements Exception { String get cause => 'Cannot get firebase token'; diff --git a/lib/utils/client_manager.dart b/lib/utils/client_manager.dart index 812bec1c..1fdb219b 100644 --- a/lib/utils/client_manager.dart +++ b/lib/utils/client_manager.dart @@ -1,12 +1,13 @@ import 'dart:convert'; -import 'package:fluffychat/utils/platform_infos.dart'; import 'package:flutter/foundation.dart'; + import 'package:hive_flutter/hive_flutter.dart'; import 'package:matrix/encryption/utils/key_verification.dart'; import 'package:matrix/matrix.dart'; import 'package:path_provider/path_provider.dart'; +import 'package:fluffychat/utils/platform_infos.dart'; import 'famedlysdk_store.dart'; import 'matrix_sdk_extensions.dart/flutter_matrix_hive_database.dart'; diff --git a/lib/utils/date_time_extension.dart b/lib/utils/date_time_extension.dart index 78fdcf96..8a537c4b 100644 --- a/lib/utils/date_time_extension.dart +++ b/lib/utils/date_time_extension.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; + import 'package:flutter_gen/gen_l10n/l10n.dart'; /// Provides extra functionality for formatting the time. diff --git a/lib/utils/famedlysdk_store.dart b/lib/utils/famedlysdk_store.dart index 98702189..043c190d 100644 --- a/lib/utils/famedlysdk_store.dart +++ b/lib/utils/famedlysdk_store.dart @@ -1,9 +1,11 @@ -import 'package:fluffychat/utils/platform_infos.dart'; +import 'dart:async'; +import 'dart:core'; + import 'package:flutter_secure_storage/flutter_secure_storage.dart'; import 'package:localstorage/localstorage.dart'; import 'package:path_provider/path_provider.dart'; -import 'dart:async'; -import 'dart:core'; + +import 'package:fluffychat/utils/platform_infos.dart'; // see https://github.com/mogol/flutter_secure_storage/issues/161#issuecomment-704578453 class AsyncMutex { diff --git a/lib/utils/fluffy_share.dart b/lib/utils/fluffy_share.dart index afcda4ea..8f8cda73 100644 --- a/lib/utils/fluffy_share.dart +++ b/lib/utils/fluffy_share.dart @@ -1,8 +1,10 @@ -import 'package:fluffychat/utils/platform_infos.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:share/share.dart'; + import 'package:flutter_gen/gen_l10n/l10n.dart'; +import 'package:share/share.dart'; + +import 'package:fluffychat/utils/platform_infos.dart'; abstract class FluffyShare { static Future share(String text, BuildContext context) async { diff --git a/lib/utils/localized_exception_extension.dart b/lib/utils/localized_exception_extension.dart index 63a6fc21..38df9cca 100644 --- a/lib/utils/localized_exception_extension.dart +++ b/lib/utils/localized_exception_extension.dart @@ -1,8 +1,9 @@ import 'dart:io'; -import 'package:matrix/matrix.dart'; import 'package:flutter/material.dart'; + import 'package:flutter_gen/gen_l10n/l10n.dart'; +import 'package:matrix/matrix.dart'; extension LocalizedExceptionExtension on Object { String toLocalizedString(BuildContext context) { diff --git a/lib/utils/matrix_sdk_extensions.dart/device_extension.dart b/lib/utils/matrix_sdk_extensions.dart/device_extension.dart index 24935c49..15c0c369 100644 --- a/lib/utils/matrix_sdk_extensions.dart/device_extension.dart +++ b/lib/utils/matrix_sdk_extensions.dart/device_extension.dart @@ -1,6 +1,7 @@ -import 'package:matrix/matrix.dart'; import 'package:flutter/material.dart'; +import 'package:matrix/matrix.dart'; + IconData _getIconFromName(String displayname) { final name = displayname.toLowerCase(); if ({'android'}.any((s) => name.contains(s))) { diff --git a/lib/utils/matrix_sdk_extensions.dart/event_extension.dart b/lib/utils/matrix_sdk_extensions.dart/event_extension.dart index daee1f56..f3b62456 100644 --- a/lib/utils/matrix_sdk_extensions.dart/event_extension.dart +++ b/lib/utils/matrix_sdk_extensions.dart/event_extension.dart @@ -1,8 +1,10 @@ -import 'package:matrix/matrix.dart'; -import 'package:future_loading_dialog/future_loading_dialog.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; + import 'package:flutter_cache_manager/flutter_cache_manager.dart'; +import 'package:future_loading_dialog/future_loading_dialog.dart'; +import 'package:matrix/matrix.dart'; + import 'matrix_file_extension.dart'; extension LocalizedBody on Event { diff --git a/lib/utils/matrix_sdk_extensions.dart/flutter_matrix_hive_database.dart b/lib/utils/matrix_sdk_extensions.dart/flutter_matrix_hive_database.dart index db6593ca..ef56855d 100644 --- a/lib/utils/matrix_sdk_extensions.dart/flutter_matrix_hive_database.dart +++ b/lib/utils/matrix_sdk_extensions.dart/flutter_matrix_hive_database.dart @@ -2,12 +2,13 @@ import 'dart:convert'; import 'dart:io'; import 'dart:typed_data'; -import 'package:matrix/matrix.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/services.dart'; + import 'package:flutter_secure_storage/flutter_secure_storage.dart'; import 'package:hive/hive.dart'; import 'package:hive_flutter/hive_flutter.dart'; +import 'package:matrix/matrix.dart'; import 'package:path_provider/path_provider.dart'; import '../platform_infos.dart'; diff --git a/lib/utils/matrix_sdk_extensions.dart/matrix_file_extension.dart b/lib/utils/matrix_sdk_extensions.dart/matrix_file_extension.dart index 979b02e4..653d1536 100644 --- a/lib/utils/matrix_sdk_extensions.dart/matrix_file_extension.dart +++ b/lib/utils/matrix_sdk_extensions.dart/matrix_file_extension.dart @@ -1,12 +1,14 @@ import 'dart:io'; -import 'package:matrix/matrix.dart'; -import 'package:fluffychat/utils/platform_infos.dart'; import 'package:flutter/material.dart'; -import 'package:path_provider/path_provider.dart'; + import 'package:file_picker_cross/file_picker_cross.dart'; -import 'package:share/share.dart'; import 'package:flutter_gen/gen_l10n/l10n.dart'; +import 'package:matrix/matrix.dart'; +import 'package:path_provider/path_provider.dart'; +import 'package:share/share.dart'; + +import 'package:fluffychat/utils/platform_infos.dart'; extension MatrixFileExtension on MatrixFile { void save(BuildContext context) async { diff --git a/lib/utils/matrix_sdk_extensions.dart/matrix_locals.dart b/lib/utils/matrix_sdk_extensions.dart/matrix_locals.dart index 56307252..a755f124 100644 --- a/lib/utils/matrix_sdk_extensions.dart/matrix_locals.dart +++ b/lib/utils/matrix_sdk_extensions.dart/matrix_locals.dart @@ -1,5 +1,5 @@ -import 'package:matrix/matrix.dart'; import 'package:flutter_gen/gen_l10n/l10n.dart'; +import 'package:matrix/matrix.dart'; /// This is a temporary helper class until there is a proper solution to this with the new system class MatrixLocals extends MatrixLocalizations { diff --git a/lib/utils/matrix_sdk_extensions.dart/presence_extension.dart b/lib/utils/matrix_sdk_extensions.dart/presence_extension.dart index 50961604..bf69fae0 100644 --- a/lib/utils/matrix_sdk_extensions.dart/presence_extension.dart +++ b/lib/utils/matrix_sdk_extensions.dart/presence_extension.dart @@ -1,6 +1,7 @@ -import 'package:matrix/matrix.dart'; import 'package:flutter/material.dart'; + import 'package:flutter_gen/gen_l10n/l10n.dart'; +import 'package:matrix/matrix.dart'; import '../date_time_extension.dart'; diff --git a/lib/utils/platform_infos.dart b/lib/utils/platform_infos.dart index 9c122518..9c16faf0 100644 --- a/lib/utils/platform_infos.dart +++ b/lib/utils/platform_infos.dart @@ -1,13 +1,14 @@ import 'dart:io'; -import 'package:fluffychat/widgets/sentry_switch_list_tile.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; + +import 'package:flutter_gen/gen_l10n/l10n.dart'; import 'package:package_info_plus/package_info_plus.dart'; import 'package:url_launcher/url_launcher.dart'; -import 'package:flutter_gen/gen_l10n/l10n.dart'; import 'package:vrouter/vrouter.dart'; +import 'package:fluffychat/widgets/sentry_switch_list_tile.dart'; import '../config/app_config.dart'; abstract class PlatformInfos { diff --git a/lib/utils/resize_image.dart b/lib/utils/resize_image.dart index 08e0d0aa..050c7677 100644 --- a/lib/utils/resize_image.dart +++ b/lib/utils/resize_image.dart @@ -1,5 +1,5 @@ -import 'dart:ui'; import 'dart:typed_data'; +import 'dart:ui'; import 'package:matrix/matrix.dart'; import 'package:native_imaging/native_imaging.dart' as native; diff --git a/lib/utils/room_status_extension.dart b/lib/utils/room_status_extension.dart index ede8ba0a..3e9ea4a1 100644 --- a/lib/utils/room_status_extension.dart +++ b/lib/utils/room_status_extension.dart @@ -1,9 +1,11 @@ -import 'package:matrix/matrix.dart'; import 'package:flutter/widgets.dart'; + import 'package:flutter_gen/gen_l10n/l10n.dart'; -import 'matrix_sdk_extensions.dart/filtered_timeline_extension.dart'; +import 'package:matrix/matrix.dart'; + import '../config/app_config.dart'; import 'date_time_extension.dart'; +import 'matrix_sdk_extensions.dart/filtered_timeline_extension.dart'; extension RoomStatusExtension on Room { Presence get directChatPresence => client.presences[directChatMatrixID]; diff --git a/lib/utils/run_in_background.dart b/lib/utils/run_in_background.dart index 8a99337f..e75d1452 100644 --- a/lib/utils/run_in_background.dart +++ b/lib/utils/run_in_background.dart @@ -1,6 +1,7 @@ -import 'package:isolate/isolate.dart'; import 'dart:async'; +import 'package:isolate/isolate.dart'; + Future runInBackground( FutureOr Function(U arg) function, U arg) async { final isolate = await IsolateRunner.spawn(); diff --git a/lib/utils/sentry_controller.dart b/lib/utils/sentry_controller.dart index 0e0a9089..b805d995 100644 --- a/lib/utils/sentry_controller.dart +++ b/lib/utils/sentry_controller.dart @@ -1,11 +1,12 @@ -import 'package:matrix/matrix.dart'; -import 'package:fluffychat/config/app_config.dart'; -import 'package:flutter/material.dart'; import 'package:flutter/foundation.dart'; +import 'package:flutter/material.dart'; + +import 'package:matrix/matrix.dart'; import 'package:sentry/sentry.dart'; -import 'famedlysdk_store.dart'; +import 'package:fluffychat/config/app_config.dart'; import '../config/setting_keys.dart'; +import 'famedlysdk_store.dart'; abstract class SentryController { static Future toggleSentryAction( diff --git a/lib/utils/uia_request_manager.dart b/lib/utils/uia_request_manager.dart index 54e8bb30..c3b33ed3 100644 --- a/lib/utils/uia_request_manager.dart +++ b/lib/utils/uia_request_manager.dart @@ -1,7 +1,8 @@ -import 'package:adaptive_dialog/adaptive_dialog.dart'; import 'package:flutter/material.dart'; -import 'package:matrix/matrix.dart'; + +import 'package:adaptive_dialog/adaptive_dialog.dart'; import 'package:flutter_gen/gen_l10n/l10n.dart'; +import 'package:matrix/matrix.dart'; import 'package:url_launcher/url_launcher.dart'; class UiaRequestManager { diff --git a/lib/utils/url_launcher.dart b/lib/utils/url_launcher.dart index 9902e600..65b22f4c 100644 --- a/lib/utils/url_launcher.dart +++ b/lib/utils/url_launcher.dart @@ -1,16 +1,16 @@ -import 'package:adaptive_dialog/adaptive_dialog.dart'; -import 'package:fluffychat/widgets/profile_bottom_sheet.dart'; - -import 'package:matrix/matrix.dart'; -import 'package:future_loading_dialog/future_loading_dialog.dart'; -import 'package:fluffychat/widgets/matrix.dart'; -import 'package:fluffychat/config/app_config.dart'; import 'package:flutter/material.dart'; + +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:punycode/punycode.dart'; import 'package:url_launcher/url_launcher.dart'; import 'package:vrouter/vrouter.dart'; -import 'package:punycode/punycode.dart'; -import 'package:flutter_gen/gen_l10n/l10n.dart'; +import 'package:fluffychat/config/app_config.dart'; +import 'package:fluffychat/widgets/matrix.dart'; +import 'package:fluffychat/widgets/profile_bottom_sheet.dart'; import 'platform_infos.dart'; class UrlLauncher { diff --git a/lib/widgets/adaptive_flat_button.dart b/lib/widgets/adaptive_flat_button.dart index 9f4dcd16..e88200f4 100644 --- a/lib/widgets/adaptive_flat_button.dart +++ b/lib/widgets/adaptive_flat_button.dart @@ -1,7 +1,8 @@ -import 'package:fluffychat/utils/platform_infos.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:fluffychat/utils/platform_infos.dart'; + class AdaptiveFlatButton extends StatelessWidget { final String label; final Color textColor; diff --git a/lib/widgets/avatar.dart b/lib/widgets/avatar.dart index c1658069..f94fbe73 100644 --- a/lib/widgets/avatar.dart +++ b/lib/widgets/avatar.dart @@ -1,9 +1,10 @@ -import 'package:matrix/matrix.dart'; -import 'package:fluffychat/utils/string_color.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -import 'package:cached_network_image/cached_network_image.dart'; +import 'package:cached_network_image/cached_network_image.dart'; +import 'package:matrix/matrix.dart'; + +import 'package:fluffychat/utils/string_color.dart'; import 'matrix.dart'; class Avatar extends StatelessWidget { diff --git a/lib/widgets/chat_settings_popup_menu.dart b/lib/widgets/chat_settings_popup_menu.dart index 2ad4fb6f..26b362d2 100644 --- a/lib/widgets/chat_settings_popup_menu.dart +++ b/lib/widgets/chat_settings_popup_menu.dart @@ -1,13 +1,13 @@ import 'dart:async'; -import 'package:adaptive_dialog/adaptive_dialog.dart'; - -import 'package:matrix/matrix.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_gen/gen_l10n/l10n.dart'; +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:vrouter/vrouter.dart'; + import 'matrix.dart'; class ChatSettingsPopupMenu extends StatefulWidget { diff --git a/lib/widgets/connection_status_header.dart b/lib/widgets/connection_status_header.dart index 119705bb..1baf897f 100644 --- a/lib/widgets/connection_status_header.dart +++ b/lib/widgets/connection_status_header.dart @@ -1,9 +1,11 @@ import 'dart:async'; -import 'package:flutter/material.dart'; -import 'package:matrix/matrix.dart'; -import '../utils/localized_exception_extension.dart'; -import 'package:flutter_gen/gen_l10n/l10n.dart'; +import 'package:flutter/material.dart'; + +import 'package:flutter_gen/gen_l10n/l10n.dart'; +import 'package:matrix/matrix.dart'; + +import '../utils/localized_exception_extension.dart'; import 'matrix.dart'; class ConnectionStatusHeader extends StatefulWidget { diff --git a/lib/widgets/contacts_list.dart b/lib/widgets/contacts_list.dart index c8b5fb23..410163a4 100644 --- a/lib/widgets/contacts_list.dart +++ b/lib/widgets/contacts_list.dart @@ -1,10 +1,12 @@ import 'dart:async'; +import 'package:flutter/material.dart'; + import 'package:matrix/matrix.dart'; +import 'package:vrouter/vrouter.dart'; + import 'package:fluffychat/widgets/avatar.dart'; import 'package:fluffychat/widgets/matrix.dart'; -import 'package:flutter/material.dart'; -import 'package:vrouter/vrouter.dart'; import '../utils/matrix_sdk_extensions.dart/client_presence_extension.dart'; import '../utils/matrix_sdk_extensions.dart/presence_extension.dart'; diff --git a/lib/widgets/content_banner.dart b/lib/widgets/content_banner.dart index 0372788b..c1878369 100644 --- a/lib/widgets/content_banner.dart +++ b/lib/widgets/content_banner.dart @@ -1,7 +1,8 @@ -import 'package:matrix/matrix.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; + import 'package:cached_network_image/cached_network_image.dart'; +import 'package:matrix/matrix.dart'; import 'matrix.dart'; diff --git a/lib/widgets/default_app_bar_search_field.dart b/lib/widgets/default_app_bar_search_field.dart index 861e414a..457a9b8b 100644 --- a/lib/widgets/default_app_bar_search_field.dart +++ b/lib/widgets/default_app_bar_search_field.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; + import 'package:flutter_gen/gen_l10n/l10n.dart'; import '../config/app_config.dart'; diff --git a/lib/widgets/encryption_button.dart b/lib/widgets/encryption_button.dart index 36cb8f45..c779c938 100644 --- a/lib/widgets/encryption_button.dart +++ b/lib/widgets/encryption_button.dart @@ -1,12 +1,13 @@ import 'dart:async'; -import 'package:adaptive_dialog/adaptive_dialog.dart'; -import 'package:matrix/matrix.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_gen/gen_l10n/l10n.dart'; +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:vrouter/vrouter.dart'; + import 'matrix.dart'; class EncryptionButton extends StatefulWidget { diff --git a/lib/widgets/event_content/audio_player.dart b/lib/widgets/event_content/audio_player.dart index bc46487c..e40725f6 100644 --- a/lib/widgets/event_content/audio_player.dart +++ b/lib/widgets/event_content/audio_player.dart @@ -1,14 +1,15 @@ import 'dart:async'; import 'dart:io'; -import 'package:audioplayers/audioplayers.dart'; -import 'package:matrix/matrix.dart'; -import 'package:fluffychat/utils/sentry_controller.dart'; - import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -import 'package:path_provider/path_provider.dart'; + +import 'package:audioplayers/audioplayers.dart'; import 'package:flutter_gen/gen_l10n/l10n.dart'; +import 'package:matrix/matrix.dart'; +import 'package:path_provider/path_provider.dart'; + +import 'package:fluffychat/utils/sentry_controller.dart'; import '../../utils/matrix_sdk_extensions.dart/event_extension.dart'; class AudioPlayerWidget extends StatefulWidget { diff --git a/lib/widgets/event_content/html_message.dart b/lib/widgets/event_content/html_message.dart index fec13d49..2b1f1598 100644 --- a/lib/widgets/event_content/html_message.dart +++ b/lib/widgets/event_content/html_message.dart @@ -1,13 +1,14 @@ -import 'package:matrix/matrix.dart'; -import 'package:flutter_matrix_html/flutter_html.dart'; import 'package:flutter/material.dart'; + import 'package:flutter_gen/gen_l10n/l10n.dart'; -import '../../utils/url_launcher.dart'; +import 'package:flutter_matrix_html/flutter_html.dart'; +import 'package:matrix/matrix.dart'; + import '../../config/app_config.dart'; import '../../config/setting_keys.dart'; -import '../../utils/matrix_sdk_extensions.dart/matrix_locals.dart'; import '../../pages/image_viewer.dart'; - +import '../../utils/matrix_sdk_extensions.dart/matrix_locals.dart'; +import '../../utils/url_launcher.dart'; import '../matrix.dart'; class HtmlMessage extends StatelessWidget { diff --git a/lib/widgets/event_content/image_bubble.dart b/lib/widgets/event_content/image_bubble.dart index d1c19aa6..9178e1d3 100644 --- a/lib/widgets/event_content/image_bubble.dart +++ b/lib/widgets/event_content/image_bubble.dart @@ -1,15 +1,16 @@ import 'dart:typed_data'; -import 'package:matrix/matrix.dart'; -import 'package:fluffychat/pages/image_viewer.dart'; -import 'package:flutter/material.dart'; import 'package:flutter/foundation.dart'; -import 'package:flutter_blurhash/flutter_blurhash.dart'; +import 'package:flutter/material.dart'; + import 'package:cached_network_image/cached_network_image.dart'; +import 'package:flutter_blurhash/flutter_blurhash.dart'; +import 'package:flutter_gen/gen_l10n/l10n.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:lottie/lottie.dart'; -import 'package:flutter_gen/gen_l10n/l10n.dart'; +import 'package:matrix/matrix.dart'; +import 'package:fluffychat/pages/image_viewer.dart'; import '../../utils/matrix_sdk_extensions.dart/event_extension.dart'; import '../matrix.dart'; diff --git a/lib/widgets/event_content/map_bubble.dart b/lib/widgets/event_content/map_bubble.dart index 4c9a2b31..94e15a74 100644 --- a/lib/widgets/event_content/map_bubble.dart +++ b/lib/widgets/event_content/map_bubble.dart @@ -1,6 +1,7 @@ +import 'package:flutter/material.dart'; + import 'package:flutter_map/flutter_map.dart'; import 'package:latlong2/latlong.dart'; -import 'package:flutter/material.dart'; class MapBubble extends StatelessWidget { final double latitude; diff --git a/lib/widgets/event_content/message.dart b/lib/widgets/event_content/message.dart index e410de30..9bf5a38f 100644 --- a/lib/widgets/event_content/message.dart +++ b/lib/widgets/event_content/message.dart @@ -1,12 +1,13 @@ +import 'package:flutter/material.dart'; + import 'package:matrix/matrix.dart'; -import 'package:fluffychat/widgets/event_content/message_content.dart'; -import 'package:fluffychat/widgets/event_content/reply_content.dart'; + import 'package:fluffychat/config/themes.dart'; import 'package:fluffychat/utils/date_time_extension.dart'; import 'package:fluffychat/utils/matrix_sdk_extensions.dart/event_extension.dart'; import 'package:fluffychat/utils/string_color.dart'; -import 'package:flutter/material.dart'; - +import 'package:fluffychat/widgets/event_content/message_content.dart'; +import 'package:fluffychat/widgets/event_content/reply_content.dart'; import '../../config/app_config.dart'; import '../avatar.dart'; import '../matrix.dart'; diff --git a/lib/widgets/event_content/message_content.dart b/lib/widgets/event_content/message_content.dart index 4dc0ee96..2b5e7ac3 100644 --- a/lib/widgets/event_content/message_content.dart +++ b/lib/widgets/event_content/message_content.dart @@ -1,25 +1,25 @@ +import 'package:flutter/material.dart'; + +import 'package:flutter_gen/gen_l10n/l10n.dart'; +import 'package:future_loading_dialog/future_loading_dialog.dart'; import 'package:matrix/encryption/utils/key_verification.dart'; import 'package:matrix/matrix.dart'; -import 'package:fluffychat/widgets/event_content/audio_player.dart'; -import 'package:future_loading_dialog/future_loading_dialog.dart'; -import 'package:fluffychat/widgets/event_content/image_bubble.dart'; -import 'package:fluffychat/utils/matrix_sdk_extensions.dart/event_extension.dart'; -import 'package:fluffychat/utils/matrix_sdk_extensions.dart/matrix_locals.dart'; -import 'package:fluffychat/pages/key_verification_dialog.dart'; - -import 'package:flutter/material.dart'; -import 'package:flutter_gen/gen_l10n/l10n.dart'; import 'package:matrix_link_text/link_text.dart'; import 'package:url_launcher/url_launcher.dart'; -import '../../utils/url_launcher.dart'; -import '../../utils/platform_infos.dart'; +import 'package:fluffychat/pages/key_verification_dialog.dart'; +import 'package:fluffychat/utils/matrix_sdk_extensions.dart/event_extension.dart'; +import 'package:fluffychat/utils/matrix_sdk_extensions.dart/matrix_locals.dart'; +import 'package:fluffychat/widgets/event_content/audio_player.dart'; +import 'package:fluffychat/widgets/event_content/image_bubble.dart'; import '../../config/app_config.dart'; import '../../pages/video_viewer.dart'; -import 'html_message.dart'; +import '../../utils/platform_infos.dart'; +import '../../utils/url_launcher.dart'; import '../matrix.dart'; -import 'message_download_content.dart'; +import 'html_message.dart'; import 'map_bubble.dart'; +import 'message_download_content.dart'; import 'sticker.dart'; class MessageContent extends StatelessWidget { diff --git a/lib/widgets/event_content/message_download_content.dart b/lib/widgets/event_content/message_download_content.dart index ab248f01..35b2b4ea 100644 --- a/lib/widgets/event_content/message_download_content.dart +++ b/lib/widgets/event_content/message_download_content.dart @@ -1,5 +1,7 @@ -import 'package:matrix/matrix.dart'; import 'package:flutter/material.dart'; + +import 'package:matrix/matrix.dart'; + import 'package:fluffychat/utils/matrix_sdk_extensions.dart/event_extension.dart'; class MessageDownloadContent extends StatelessWidget { diff --git a/lib/widgets/event_content/message_reactions.dart b/lib/widgets/event_content/message_reactions.dart index fca5f1a1..e5b9c765 100644 --- a/lib/widgets/event_content/message_reactions.dart +++ b/lib/widgets/event_content/message_reactions.dart @@ -1,11 +1,13 @@ -import 'package:matrix/matrix.dart'; -import 'package:fluffychat/utils/platform_infos.dart'; -import 'package:fluffychat/widgets/avatar.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; + import 'package:cached_network_image/cached_network_image.dart'; import 'package:characters/characters.dart'; import 'package:future_loading_dialog/future_loading_dialog.dart'; +import 'package:matrix/matrix.dart'; + +import 'package:fluffychat/utils/platform_infos.dart'; +import 'package:fluffychat/widgets/avatar.dart'; import '../matrix.dart'; class MessageReactions extends StatelessWidget { diff --git a/lib/widgets/event_content/reply_content.dart b/lib/widgets/event_content/reply_content.dart index 163614a4..64ef327d 100644 --- a/lib/widgets/event_content/reply_content.dart +++ b/lib/widgets/event_content/reply_content.dart @@ -1,10 +1,11 @@ -import 'package:matrix/matrix.dart'; -import 'package:fluffychat/utils/matrix_sdk_extensions.dart/matrix_locals.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_gen/gen_l10n/l10n.dart'; -import 'html_message.dart'; +import 'package:flutter_gen/gen_l10n/l10n.dart'; +import 'package:matrix/matrix.dart'; + +import 'package:fluffychat/utils/matrix_sdk_extensions.dart/matrix_locals.dart'; import '../../config/app_config.dart'; +import 'html_message.dart'; class ReplyContent extends StatelessWidget { final Event replyEvent; diff --git a/lib/widgets/event_content/state_message.dart b/lib/widgets/event_content/state_message.dart index e461e0f5..a58bfc4e 100644 --- a/lib/widgets/event_content/state_message.dart +++ b/lib/widgets/event_content/state_message.dart @@ -1,8 +1,9 @@ -import 'package:matrix/matrix.dart'; -import 'package:fluffychat/utils/matrix_sdk_extensions.dart/matrix_locals.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_gen/gen_l10n/l10n.dart'; +import 'package:flutter_gen/gen_l10n/l10n.dart'; +import 'package:matrix/matrix.dart'; + +import 'package:fluffychat/utils/matrix_sdk_extensions.dart/matrix_locals.dart'; import '../../config/app_config.dart'; class StateMessage extends StatelessWidget { diff --git a/lib/widgets/event_content/sticker.dart b/lib/widgets/event_content/sticker.dart index b38706ad..89c90390 100644 --- a/lib/widgets/event_content/sticker.dart +++ b/lib/widgets/event_content/sticker.dart @@ -1,7 +1,9 @@ -import 'package:matrix/matrix.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_gen/gen_l10n/l10n.dart'; + import 'package:adaptive_dialog/adaptive_dialog.dart'; +import 'package:flutter_gen/gen_l10n/l10n.dart'; +import 'package:matrix/matrix.dart'; + import '../../config/app_config.dart'; import 'image_bubble.dart'; diff --git a/lib/widgets/event_content/verification_request_content.dart b/lib/widgets/event_content/verification_request_content.dart index ffba6131..23a5e41e 100644 --- a/lib/widgets/event_content/verification_request_content.dart +++ b/lib/widgets/event_content/verification_request_content.dart @@ -1,6 +1,7 @@ -import 'package:matrix/matrix.dart'; import 'package:flutter/material.dart'; + import 'package:flutter_gen/gen_l10n/l10n.dart'; +import 'package:matrix/matrix.dart'; import '../../config/app_config.dart'; diff --git a/lib/widgets/input_bar.dart b/lib/widgets/input_bar.dart index 6ede0295..d4aee133 100644 --- a/lib/widgets/input_bar.dart +++ b/lib/widgets/input_bar.dart @@ -1,13 +1,15 @@ +import 'package:flutter/foundation.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import 'package:cached_network_image/cached_network_image.dart'; +import 'package:flutter_gen/gen_l10n/l10n.dart'; +import 'package:flutter_typeahead/flutter_typeahead.dart'; +import 'package:matrix/matrix.dart'; +import 'package:slugify/slugify.dart'; + import 'package:fluffychat/config/app_config.dart'; import 'package:fluffychat/utils/platform_infos.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter/foundation.dart'; -import 'package:matrix/matrix.dart'; -import 'package:flutter_gen/gen_l10n/l10n.dart'; -import 'package:flutter/services.dart'; -import 'package:flutter_typeahead/flutter_typeahead.dart'; -import 'package:cached_network_image/cached_network_image.dart'; -import 'package:slugify/slugify.dart'; import 'avatar.dart'; import 'matrix.dart'; diff --git a/lib/widgets/layouts/loading_view.dart b/lib/widgets/layouts/loading_view.dart index bcbd45bc..67705358 100644 --- a/lib/widgets/layouts/loading_view.dart +++ b/lib/widgets/layouts/loading_view.dart @@ -1,8 +1,10 @@ -import 'package:fluffychat/pages/views/empty_page_view.dart'; +import 'package:flutter/material.dart'; + import 'package:matrix/matrix.dart'; import 'package:vrouter/vrouter.dart'; + +import 'package:fluffychat/pages/views/empty_page_view.dart'; import 'package:fluffychat/widgets/matrix.dart'; -import 'package:flutter/material.dart'; class LoadingView extends StatelessWidget { const LoadingView({Key key}) : super(key: key); diff --git a/lib/widgets/layouts/one_page_card.dart b/lib/widgets/layouts/one_page_card.dart index 60babf5d..d2117796 100644 --- a/lib/widgets/layouts/one_page_card.dart +++ b/lib/widgets/layouts/one_page_card.dart @@ -1,8 +1,9 @@ import 'dart:math'; +import 'package:flutter/material.dart'; + import 'package:fluffychat/config/themes.dart'; import 'package:fluffychat/widgets/matrix.dart'; -import 'package:flutter/material.dart'; class OnePageCard extends StatelessWidget { final Widget child; diff --git a/lib/widgets/layouts/side_view_layout.dart b/lib/widgets/layouts/side_view_layout.dart index e0e45361..a38ab724 100644 --- a/lib/widgets/layouts/side_view_layout.dart +++ b/lib/widgets/layouts/side_view_layout.dart @@ -1,7 +1,9 @@ -import 'package:fluffychat/config/themes.dart'; import 'package:flutter/material.dart'; + import 'package:vrouter/vrouter.dart'; +import 'package:fluffychat/config/themes.dart'; + class SideViewLayout extends StatelessWidget { final Widget mainView; final Widget sideView; diff --git a/lib/widgets/layouts/two_column_layout.dart b/lib/widgets/layouts/two_column_layout.dart index c37b54f9..3a25c60d 100644 --- a/lib/widgets/layouts/two_column_layout.dart +++ b/lib/widgets/layouts/two_column_layout.dart @@ -1,6 +1,7 @@ -import 'package:fluffychat/config/themes.dart'; import 'package:flutter/material.dart'; +import 'package:fluffychat/config/themes.dart'; + class TwoColumnLayout extends StatelessWidget { final Widget mainView; final Widget sideView; diff --git a/lib/widgets/list_items/chat_list_item.dart b/lib/widgets/list_items/chat_list_item.dart index 49b30272..6fa1e38b 100644 --- a/lib/widgets/list_items/chat_list_item.dart +++ b/lib/widgets/list_items/chat_list_item.dart @@ -1,20 +1,19 @@ -import 'package:adaptive_dialog/adaptive_dialog.dart'; -import 'package:fluffychat/config/app_config.dart'; - -import 'package:matrix/matrix.dart'; -import 'package:fluffychat/utils/matrix_sdk_extensions.dart/event_extension.dart'; -import 'package:fluffychat/utils/matrix_sdk_extensions.dart/matrix_locals.dart'; -import 'package:fluffychat/utils/room_status_extension.dart'; - import 'package:flutter/material.dart'; + +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'; +import 'package:fluffychat/utils/matrix_sdk_extensions.dart/event_extension.dart'; +import 'package:fluffychat/utils/matrix_sdk_extensions.dart/matrix_locals.dart'; +import 'package:fluffychat/utils/room_status_extension.dart'; +import '../../pages/send_file_dialog.dart'; import '../../utils/date_time_extension.dart'; import '../avatar.dart'; -import '../../pages/send_file_dialog.dart'; -import 'package:future_loading_dialog/future_loading_dialog.dart'; import '../matrix.dart'; enum ArchivedRoomAction { delete, rejoin } diff --git a/lib/widgets/list_items/participant_list_item.dart b/lib/widgets/list_items/participant_list_item.dart index 65512da4..7e150506 100644 --- a/lib/widgets/list_items/participant_list_item.dart +++ b/lib/widgets/list_items/participant_list_item.dart @@ -1,9 +1,10 @@ -import 'package:matrix/matrix.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_gen/gen_l10n/l10n.dart'; -import '../avatar.dart'; +import 'package:flutter_gen/gen_l10n/l10n.dart'; +import 'package:matrix/matrix.dart'; + import '../../pages/user_bottom_sheet.dart'; +import '../avatar.dart'; class ParticipantListItem extends StatelessWidget { final User user; diff --git a/lib/widgets/list_items/permission_list_tile.dart b/lib/widgets/list_items/permission_list_tile.dart index 8cbedfc9..a7e03161 100644 --- a/lib/widgets/list_items/permission_list_tile.dart +++ b/lib/widgets/list_items/permission_list_tile.dart @@ -1,6 +1,7 @@ -import 'package:matrix/matrix.dart'; import 'package:flutter/material.dart'; + import 'package:flutter_gen/gen_l10n/l10n.dart'; +import 'package:matrix/matrix.dart'; class PermissionsListTile extends StatelessWidget { final String permissionKey; diff --git a/lib/widgets/list_items/public_room_list_item.dart b/lib/widgets/list_items/public_room_list_item.dart index 798c89b7..420f7527 100644 --- a/lib/widgets/list_items/public_room_list_item.dart +++ b/lib/widgets/list_items/public_room_list_item.dart @@ -1,7 +1,8 @@ -import 'package:matrix/matrix.dart'; -import 'package:future_loading_dialog/future_loading_dialog.dart'; import 'package:flutter/material.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:vrouter/vrouter.dart'; import '../avatar.dart'; diff --git a/lib/widgets/list_items/user_device_list_item.dart b/lib/widgets/list_items/user_device_list_item.dart index 46590fea..5e3fbc1b 100644 --- a/lib/widgets/list_items/user_device_list_item.dart +++ b/lib/widgets/list_items/user_device_list_item.dart @@ -1,11 +1,12 @@ -import 'package:adaptive_dialog/adaptive_dialog.dart'; -import 'package:matrix/matrix.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_gen/gen_l10n/l10n.dart'; -import '../matrix.dart'; +import 'package:adaptive_dialog/adaptive_dialog.dart'; +import 'package:flutter_gen/gen_l10n/l10n.dart'; +import 'package:matrix/matrix.dart'; + import '../../utils/date_time_extension.dart'; import '../../utils/matrix_sdk_extensions.dart/device_extension.dart'; +import '../matrix.dart'; enum UserDeviceListItemAction { rename, diff --git a/lib/widgets/lock_screen.dart b/lib/widgets/lock_screen.dart index f7f48851..5382fa00 100644 --- a/lib/widgets/lock_screen.dart +++ b/lib/widgets/lock_screen.dart @@ -1,12 +1,13 @@ +import 'package:flutter/material.dart'; + +import 'package:flutter_app_lock/flutter_app_lock.dart'; +import 'package:flutter_gen/gen_l10n/l10n.dart'; +import 'package:flutter_secure_storage/flutter_secure_storage.dart'; +import 'package:pin_code_text_field/pin_code_text_field.dart'; + import 'package:fluffychat/config/app_config.dart'; import 'package:fluffychat/config/setting_keys.dart'; import 'package:fluffychat/config/themes.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_app_lock/flutter_app_lock.dart'; -import 'package:flutter_secure_storage/flutter_secure_storage.dart'; -import 'package:pin_code_text_field/pin_code_text_field.dart'; -import 'package:flutter_gen/gen_l10n/l10n.dart'; - import 'layouts/one_page_card.dart'; class LockScreen extends StatefulWidget { diff --git a/lib/widgets/log_view.dart b/lib/widgets/log_view.dart index e1c2b759..c20f02ec 100644 --- a/lib/widgets/log_view.dart +++ b/lib/widgets/log_view.dart @@ -1,6 +1,7 @@ -import 'package:matrix/matrix.dart'; import 'package:flutter/material.dart'; +import 'package:matrix/matrix.dart'; + class LogViewer extends StatefulWidget { const LogViewer({Key key}) : super(key: key); diff --git a/lib/widgets/matrix.dart b/lib/widgets/matrix.dart index 056ff566..fc3e5e12 100644 --- a/lib/widgets/matrix.dart +++ b/lib/widgets/matrix.dart @@ -1,32 +1,34 @@ import 'dart:async'; -import 'dart:io'; import 'dart:convert'; +import 'dart:io'; -import 'package:fluffychat/utils/client_manager.dart'; -import 'package:fluffychat/utils/uia_request_manager.dart'; -import 'package:matrix/encryption.dart'; -import 'package:matrix/matrix.dart'; -import 'package:fluffychat/utils/matrix_sdk_extensions.dart/matrix_locals.dart'; -import 'package:fluffychat/utils/platform_infos.dart'; -import 'package:fluffychat/utils/sentry_controller.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; + +import 'package:desktop_notifications/desktop_notifications.dart'; import 'package:flutter_app_lock/flutter_app_lock.dart'; import 'package:flutter_gen/gen_l10n/l10n.dart'; import 'package:flutter_secure_storage/flutter_secure_storage.dart'; +import 'package:http/http.dart' as http; +import 'package:matrix/encryption.dart'; +import 'package:matrix/matrix.dart'; import 'package:provider/provider.dart'; import 'package:universal_html/html.dart' as html; -import 'package:http/http.dart' as http; import 'package:url_launcher/url_launcher.dart'; -import 'package:desktop_notifications/desktop_notifications.dart'; -import '../utils/famedlysdk_store.dart'; -import '../pages/key_verification_dialog.dart'; -import '../utils/platform_infos.dart'; +import 'package:vrouter/vrouter.dart'; + +import 'package:fluffychat/utils/client_manager.dart'; +import 'package:fluffychat/utils/matrix_sdk_extensions.dart/matrix_locals.dart'; +import 'package:fluffychat/utils/platform_infos.dart'; +import 'package:fluffychat/utils/sentry_controller.dart'; +import 'package:fluffychat/utils/uia_request_manager.dart'; import '../config/app_config.dart'; import '../config/setting_keys.dart'; +import '../pages/key_verification_dialog.dart'; import '../utils/account_bundles.dart'; import '../utils/background_push.dart'; -import 'package:vrouter/vrouter.dart'; +import '../utils/famedlysdk_store.dart'; +import '../utils/platform_infos.dart'; class Matrix extends StatefulWidget { static const String callNamespace = 'chat.fluffy.jitsi_call'; diff --git a/lib/widgets/profile_bottom_sheet.dart b/lib/widgets/profile_bottom_sheet.dart index 2a719366..9847e2af 100644 --- a/lib/widgets/profile_bottom_sheet.dart +++ b/lib/widgets/profile_bottom_sheet.dart @@ -1,13 +1,15 @@ import 'dart:math'; -import 'package:fluffychat/config/themes.dart'; -import 'package:fluffychat/widgets/matrix.dart'; -import 'package:flutter_gen/gen_l10n/l10n.dart'; -import 'package:fluffychat/widgets/content_banner.dart'; import 'package:flutter/material.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:vrouter/vrouter.dart'; + +import 'package:fluffychat/config/themes.dart'; +import 'package:fluffychat/widgets/content_banner.dart'; +import 'package:fluffychat/widgets/matrix.dart'; import '../utils/localized_exception_extension.dart'; class ProfileBottomSheet extends StatelessWidget { diff --git a/lib/widgets/sentry_switch_list_tile.dart b/lib/widgets/sentry_switch_list_tile.dart index 34925a27..5f9ac4d8 100644 --- a/lib/widgets/sentry_switch_list_tile.dart +++ b/lib/widgets/sentry_switch_list_tile.dart @@ -1,7 +1,9 @@ -import 'package:fluffychat/utils/sentry_controller.dart'; import 'package:flutter/material.dart'; + import 'package:flutter_gen/gen_l10n/l10n.dart'; +import 'package:fluffychat/utils/sentry_controller.dart'; + class SentrySwitchListTile extends StatefulWidget { final String label; diff --git a/lib/widgets/unread_badge_back_button.dart b/lib/widgets/unread_badge_back_button.dart index 9e0634aa..5eb363ab 100644 --- a/lib/widgets/unread_badge_back_button.dart +++ b/lib/widgets/unread_badge_back_button.dart @@ -1,6 +1,7 @@ -import 'package:matrix/matrix.dart'; import 'package:flutter/material.dart'; +import 'package:matrix/matrix.dart'; + import '../config/app_config.dart'; import 'matrix.dart'; diff --git a/pubspec.lock b/pubspec.lock index d61f3c5b..b6a6575e 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -658,6 +658,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.4.1" + import_sorter: + dependency: "direct dev" + description: + name: import_sorter + url: "https://pub.dartlang.org" + source: hosted + version: "4.6.0" intl: dependency: "direct main" description: @@ -1323,6 +1330,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.7.0" + tint: + dependency: transitive + description: + name: tint + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" transparent_image: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 08cdbf84..e9438c39 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -79,6 +79,7 @@ dev_dependencies: flutter_native_splash: ^1.2.4 flutter_test: sdk: flutter + import_sorter: ^4.6.0 flutter_native_splash: color: "#ffffff" diff --git a/scripts/code_analyze.sh b/scripts/code_analyze.sh index 41454c29..ec6ced93 100755 --- a/scripts/code_analyze.sh +++ b/scripts/code_analyze.sh @@ -1,5 +1,6 @@ #!/bin/sh -ve git apply ./scripts/enable-android-google-services.patch flutter format lib/ test/ --set-exit-if-changed +flutter pub run import_sorter:main --no-comments --exit-if-changed flutter analyze flutter pub run dart_code_metrics:metrics lib -r gitlab > code-quality-report.json || true \ No newline at end of file diff --git a/test/homeserver_picker_test.dart b/test/homeserver_picker_test.dart index 58834b6b..054f49ca 100644 --- a/test/homeserver_picker_test.dart +++ b/test/homeserver_picker_test.dart @@ -1,5 +1,6 @@ //import 'package:fluffychat/pages/homeserver_picker.dart'; //import 'package:fluffychat/main.dart'; + import 'package:flutter_test/flutter_test.dart'; //import 'utils/test_client.dart'; diff --git a/test/utils/test_client.dart b/test/utils/test_client.dart index 3f8efe6e..050966f7 100644 --- a/test/utils/test_client.dart +++ b/test/utils/test_client.dart @@ -1,8 +1,9 @@ -import 'package:fluffychat/utils/matrix_sdk_extensions.dart/flutter_matrix_hive_database.dart'; import 'package:matrix/encryption/utils/key_verification.dart'; import 'package:matrix/matrix.dart'; import 'package:matrix_api_lite/fake_matrix_api.dart'; +import 'package:fluffychat/utils/matrix_sdk_extensions.dart/flutter_matrix_hive_database.dart'; + Future prepareTestClient({ bool loggedIn = false, String homeserver = 'https://fakeserver.notexisting', diff --git a/test/widget_test.dart b/test/widget_test.dart index 0e98652d..7d1d98eb 100644 --- a/test/widget_test.dart +++ b/test/widget_test.dart @@ -6,6 +6,7 @@ // tree, read text, and verify that the values of widget properties are correct. //import 'package:fluffychat/main.dart'; + import 'package:flutter_test/flutter_test.dart'; //import 'utils/test_client.dart';