diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 2d3ea8c..79fef45 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -69,12 +69,6 @@ android:name="io.flutter.embedding.android.NormalTheme" android:resource="@style/NormalTheme" /> - - - - diff --git a/lib/main.dart b/lib/main.dart index 3b48052..444c795 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -9,6 +9,7 @@ import 'package:comunic/utils/flutter_utils.dart'; import 'package:comunic/utils/intl_utils.dart'; import 'package:connectivity/connectivity.dart'; import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; /// Main file of the application /// @@ -69,7 +70,7 @@ class ComunicApplicationState extends State { primaryColorDark: config().primaryColorDark, appBarTheme: AppBarTheme( backgroundColor: config().primaryColor, - brightness: Brightness.dark, + systemOverlayStyle: SystemUiOverlayStyle.light, )), showPerformanceOverlay: prefs.showPerformancesOverlay, ); diff --git a/lib/models/config.dart b/lib/models/config.dart index c2a6cba..a840378 100644 --- a/lib/models/config.dart +++ b/lib/models/config.dart @@ -1,8 +1,5 @@ -import 'dart:ui'; - import 'package:comunic/ui/routes/tour_route.dart'; import 'package:flutter/material.dart'; -import 'package:meta/meta.dart'; /// Application configuration model /// diff --git a/lib/models/conversation.dart b/lib/models/conversation.dart index f26e05c..fafdcb8 100644 --- a/lib/models/conversation.dart +++ b/lib/models/conversation.dart @@ -2,7 +2,6 @@ import 'package:comunic/helpers/serialization/base_serialization_helper.dart'; import 'package:comunic/models/conversation_member.dart'; import 'package:comunic/utils/account_utils.dart'; import 'package:flutter/material.dart'; -import 'package:meta/meta.dart'; import 'group.dart'; diff --git a/lib/models/conversation_message.dart b/lib/models/conversation_message.dart index b616dfd..7a9d1e5 100644 --- a/lib/models/conversation_message.dart +++ b/lib/models/conversation_message.dart @@ -4,7 +4,6 @@ import 'package:comunic/models/displayed_content.dart'; import 'package:comunic/utils/account_utils.dart' as account; import 'package:comunic/utils/intl_utils.dart'; import 'package:flutter/material.dart'; -import 'package:meta/meta.dart'; /// Single conversation message /// @@ -132,10 +131,14 @@ class ConversationServerMessage { return Set()..add(userID); case ConversationServerMessageType.USER_ADDED_ANOTHER_USER: - return Set()..add(userWhoAdded)..add(userAdded); + return Set() + ..add(userWhoAdded) + ..add(userAdded); case ConversationServerMessageType.USER_REMOVED_ANOTHER_USER: - return Set()..add(userWhoRemoved)..add(userRemoved); + return Set() + ..add(userWhoRemoved) + ..add(userRemoved); } throw Exception("Unsupported server message type!"); diff --git a/lib/ui/dialogs/audio_player_dialog.dart b/lib/ui/dialogs/audio_player_dialog.dart index 159066f..f9a6030 100644 --- a/lib/ui/dialogs/audio_player_dialog.dart +++ b/lib/ui/dialogs/audio_player_dialog.dart @@ -1,7 +1,6 @@ import 'package:chewie_audio/chewie_audio.dart'; import 'package:comunic/ui/widgets/async_screen_widget.dart'; import 'package:comunic/utils/intl_utils.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:video_player/video_player.dart'; diff --git a/lib/ui/dialogs/input_url_dialog.dart b/lib/ui/dialogs/input_url_dialog.dart index caed43a..81602ca 100644 --- a/lib/ui/dialogs/input_url_dialog.dart +++ b/lib/ui/dialogs/input_url_dialog.dart @@ -1,7 +1,6 @@ import 'package:comunic/ui/dialogs/single_input_dialog.dart'; import 'package:comunic/utils/input_utils.dart'; import 'package:comunic/utils/intl_utils.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; /// Ask the user to enter an URL diff --git a/lib/ui/dialogs/input_youtube_link_dialog.dart b/lib/ui/dialogs/input_youtube_link_dialog.dart index 63dcf0c..ca0c675 100644 --- a/lib/ui/dialogs/input_youtube_link_dialog.dart +++ b/lib/ui/dialogs/input_youtube_link_dialog.dart @@ -1,6 +1,5 @@ import 'package:comunic/ui/dialogs/single_input_dialog.dart'; import 'package:comunic/utils/intl_utils.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; /// Add YouTube link dialog diff --git a/lib/ui/dialogs/multi_choices_dialog.dart b/lib/ui/dialogs/multi_choices_dialog.dart index 9f0c22d..15466b6 100644 --- a/lib/ui/dialogs/multi_choices_dialog.dart +++ b/lib/ui/dialogs/multi_choices_dialog.dart @@ -1,6 +1,5 @@ import 'package:comunic/ui/widgets/dialogs/auto_sized_dialog_content_widget.dart'; import 'package:comunic/utils/intl_utils.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; /// Build and show a dialog to offer to the user to choose between several diff --git a/lib/ui/dialogs/pick_file_dialog.dart b/lib/ui/dialogs/pick_file_dialog.dart index 3ff8110..5667105 100644 --- a/lib/ui/dialogs/pick_file_dialog.dart +++ b/lib/ui/dialogs/pick_file_dialog.dart @@ -8,7 +8,6 @@ import 'package:comunic/utils/ui_utils.dart'; import 'package:file_picker/file_picker.dart'; import 'package:filesize/filesize.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/rendering.dart'; import 'package:image_cropper/image_cropper.dart'; import 'package:image_picker/image_picker.dart'; import 'package:mime/mime.dart'; diff --git a/lib/ui/dialogs/pick_user_dialog.dart b/lib/ui/dialogs/pick_user_dialog.dart index 42e463f..abafa7e 100644 --- a/lib/ui/dialogs/pick_user_dialog.dart +++ b/lib/ui/dialogs/pick_user_dialog.dart @@ -4,7 +4,6 @@ import 'package:comunic/ui/widgets/dialogs/confirm_dialog_button.dart'; import 'package:comunic/ui/widgets/pick_user_widget.dart'; import 'package:comunic/ui/widgets/safe_state.dart'; import 'package:comunic/utils/intl_utils.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; /// Pick user dialog diff --git a/lib/ui/dialogs/post_visibility_picker_dialog.dart b/lib/ui/dialogs/post_visibility_picker_dialog.dart index d47c4c8..332f8c0 100644 --- a/lib/ui/dialogs/post_visibility_picker_dialog.dart +++ b/lib/ui/dialogs/post_visibility_picker_dialog.dart @@ -2,7 +2,6 @@ import 'package:comunic/enums/post_visibility_level.dart'; import 'package:comunic/ui/tiles/post_visibility_level_tile.dart'; import 'package:comunic/utils/intl_utils.dart'; import 'package:flutter/material.dart'; -import 'package:meta/meta.dart'; /// Post utilities /// diff --git a/lib/ui/dialogs/screen_dialog.dart b/lib/ui/dialogs/screen_dialog.dart index c44f13a..694dba4 100644 --- a/lib/ui/dialogs/screen_dialog.dart +++ b/lib/ui/dialogs/screen_dialog.dart @@ -1,7 +1,6 @@ import 'dart:math'; import 'package:comunic/utils/ui_utils.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; /// Screen dialog diff --git a/lib/ui/dialogs/single_input_dialog.dart b/lib/ui/dialogs/single_input_dialog.dart index 55e6f89..7145050 100644 --- a/lib/ui/dialogs/single_input_dialog.dart +++ b/lib/ui/dialogs/single_input_dialog.dart @@ -1,5 +1,4 @@ import 'package:comunic/utils/intl_utils.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; /// Dialog to use to ask the user to enter a value diff --git a/lib/ui/dialogs/virtual_directory_dialog.dart b/lib/ui/dialogs/virtual_directory_dialog.dart index ae9bcd1..dcefab3 100644 --- a/lib/ui/dialogs/virtual_directory_dialog.dart +++ b/lib/ui/dialogs/virtual_directory_dialog.dart @@ -2,7 +2,6 @@ import 'package:comunic/helpers/groups_helper.dart'; import 'package:comunic/helpers/settings_helper.dart'; import 'package:comunic/ui/widgets/safe_state.dart'; import 'package:comunic/utils/intl_utils.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; /// Show a dialog to offer the user to pick a virtual directory diff --git a/lib/ui/routes/forgot_password_route.dart b/lib/ui/routes/forgot_password_route.dart index 86efc6b..db26234 100644 --- a/lib/ui/routes/forgot_password_route.dart +++ b/lib/ui/routes/forgot_password_route.dart @@ -6,9 +6,7 @@ import 'package:comunic/ui/widgets/safe_state.dart'; import 'package:comunic/utils/input_utils.dart'; import 'package:comunic/utils/intl_utils.dart'; import 'package:comunic/utils/ui_utils.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/rendering.dart'; /// Reset password route /// diff --git a/lib/ui/routes/settings/account_privacy_settings.dart b/lib/ui/routes/settings/account_privacy_settings.dart index 5826d20..e8181a2 100644 --- a/lib/ui/routes/settings/account_privacy_settings.dart +++ b/lib/ui/routes/settings/account_privacy_settings.dart @@ -12,7 +12,6 @@ import 'package:comunic/utils/flutter_utils.dart'; import 'package:comunic/utils/intl_utils.dart'; import 'package:comunic/utils/ui_utils.dart'; import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; import 'package:flutter_settings_ui/flutter_settings_ui.dart'; /// Account privacy settings diff --git a/lib/ui/routes/single_post_route.dart b/lib/ui/routes/single_post_route.dart index 3cc4e0c..733f9e7 100644 --- a/lib/ui/routes/single_post_route.dart +++ b/lib/ui/routes/single_post_route.dart @@ -2,7 +2,6 @@ import 'package:comunic/helpers/posts_helper.dart'; import 'package:comunic/lists/posts_list.dart'; import 'package:comunic/ui/widgets/posts_list_widget.dart'; import 'package:comunic/utils/intl_utils.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; /// Single post route diff --git a/lib/ui/screens/notifications_screen.dart b/lib/ui/screens/notifications_screen.dart index 33c1e91..67f4870 100644 --- a/lib/ui/screens/notifications_screen.dart +++ b/lib/ui/screens/notifications_screen.dart @@ -15,7 +15,6 @@ import 'package:comunic/utils/intl_utils.dart'; import 'package:comunic/utils/navigation_utils.dart'; import 'package:comunic/utils/ui_utils.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/rendering.dart'; /// Notifications screen /// diff --git a/lib/ui/tiles/post_tile.dart b/lib/ui/tiles/post_tile.dart index 26fb3bb..04b5565 100644 --- a/lib/ui/tiles/post_tile.dart +++ b/lib/ui/tiles/post_tile.dart @@ -25,7 +25,6 @@ import 'package:comunic/utils/intl_utils.dart'; import 'package:comunic/utils/navigation_utils.dart'; import 'package:comunic/utils/ui_utils.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/rendering.dart'; import 'package:url_launcher/url_launcher.dart'; import '../../models/api_request.dart'; diff --git a/lib/ui/widgets/countdown_widget.dart b/lib/ui/widgets/countdown_widget.dart index 9a112e0..1ea8971 100644 --- a/lib/ui/widgets/countdown_widget.dart +++ b/lib/ui/widgets/countdown_widget.dart @@ -75,7 +75,7 @@ class _CountdownWidgetState extends State { value: remainingTime <= 0 ? 1.0 : 1 - (remainingTime / totalDuration), - backgroundColor: Theme.of(context).accentColor, + backgroundColor: Theme.of(context).colorScheme.secondary, valueColor: AlwaysStoppedAnimation( Theme.of(context).backgroundColor), ), diff --git a/lib/ui/widgets/login_routes_theme.dart b/lib/ui/widgets/login_routes_theme.dart index ed01e91..99d72bc 100644 --- a/lib/ui/widgets/login_routes_theme.dart +++ b/lib/ui/widgets/login_routes_theme.dart @@ -43,7 +43,6 @@ class LoginRoutesTheme extends StatelessWidget { backgroundColor: Config.get().splashBackgroundColor, disabledColor: Colors.grey, highlightColor: Colors.white12, - accentColor: Colors.white, hintColor: Colors.white, textTheme: TextTheme(subtitle1: TextStyle(color: Colors.white)), radioTheme: RadioThemeData( @@ -63,7 +62,7 @@ class LoginRoutesTheme extends StatelessWidget { onBackground: Colors.white, onError: Colors.redAccent, brightness: Brightness.dark, - )), + ).copyWith(secondary: Colors.white)), child: child, ); } diff --git a/lib/ui/widgets/tablet_mode/conversations/conversation_window_container.dart b/lib/ui/widgets/tablet_mode/conversations/conversation_window_container.dart index 22d672b..2afa852 100644 --- a/lib/ui/widgets/tablet_mode/conversations/conversation_window_container.dart +++ b/lib/ui/widgets/tablet_mode/conversations/conversation_window_container.dart @@ -44,7 +44,6 @@ class ConversationWindowContainer extends StatelessWidget { appBar: AppBarWrapper( height: 40, appBar: AppBar( - textTheme: TextTheme(headline6: TextStyle(fontSize: 15)), backgroundColor: appBarBgColor, leading: icon, title: GestureDetector(child: title, onTap: onToggleCollapse), @@ -52,6 +51,10 @@ class ConversationWindowContainer extends StatelessWidget { ..add( IconButton(icon: Icon(Icons.close), onPressed: onClose), ), + toolbarTextStyle: + TextTheme(headline6: TextStyle(fontSize: 15)).bodyText2, + titleTextStyle: + TextTheme(headline6: TextStyle(fontSize: 15)).headline6, )), body: Visibility( child: body, diff --git a/lib/ui/widgets/tablet_mode/user_page_tablet.dart b/lib/ui/widgets/tablet_mode/user_page_tablet.dart index 1ea0e8a..3df884f 100644 --- a/lib/ui/widgets/tablet_mode/user_page_tablet.dart +++ b/lib/ui/widgets/tablet_mode/user_page_tablet.dart @@ -16,7 +16,6 @@ import 'package:comunic/utils/date_utils.dart'; import 'package:comunic/utils/intl_utils.dart'; import 'package:comunic/utils/ui_utils.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/rendering.dart'; /// Tablet mode of user page /// diff --git a/lib/ui/widgets/text_rich_content_widget.dart b/lib/ui/widgets/text_rich_content_widget.dart index 8bd4d05..41f1caf 100644 --- a/lib/ui/widgets/text_rich_content_widget.dart +++ b/lib/ui/widgets/text_rich_content_widget.dart @@ -1,5 +1,3 @@ -import 'dart:ui'; - import 'package:comunic/utils/input_utils.dart'; import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; diff --git a/lib/utils/navigation_utils.dart b/lib/utils/navigation_utils.dart index 87ec482..5aee510 100644 --- a/lib/utils/navigation_utils.dart +++ b/lib/utils/navigation_utils.dart @@ -4,7 +4,6 @@ import 'package:comunic/ui/routes/single_post_route.dart'; import 'package:comunic/utils/intl_utils.dart'; import 'package:comunic/utils/ui_utils.dart'; import 'package:flutter/material.dart'; -import 'package:meta/meta.dart'; /// Navigation utilities ///