1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-11-22 04:49:21 +00:00

Fix all code warnings

This commit is contained in:
Pierre HUBERT 2021-12-28 15:33:27 +01:00
parent ae75429b1d
commit 7ae50e21a4
26 changed files with 14 additions and 38 deletions

View File

@ -69,12 +69,6 @@
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme" />
<!-- Specify that the launch screen should continue being displayed -->
<!-- until Flutter renders its first frame. -->
<meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />

View File

@ -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<ComunicApplication> {
primaryColorDark: config().primaryColorDark,
appBarTheme: AppBarTheme(
backgroundColor: config().primaryColor,
brightness: Brightness.dark,
systemOverlayStyle: SystemUiOverlayStyle.light,
)),
showPerformanceOverlay: prefs.showPerformancesOverlay,
);

View File

@ -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
///

View File

@ -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';

View File

@ -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!");

View File

@ -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';

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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';

View File

@ -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

View File

@ -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
///

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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
///

View File

@ -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

View File

@ -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

View File

@ -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
///

View File

@ -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';

View File

@ -75,7 +75,7 @@ class _CountdownWidgetState extends State<CountdownWidget> {
value: remainingTime <= 0
? 1.0
: 1 - (remainingTime / totalDuration),
backgroundColor: Theme.of(context).accentColor,
backgroundColor: Theme.of(context).colorScheme.secondary,
valueColor: AlwaysStoppedAnimation<Color>(
Theme.of(context).backgroundColor),
),

View File

@ -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,
);
}

View File

@ -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,

View File

@ -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
///

View File

@ -1,5 +1,3 @@
import 'dart:ui';
import 'package:comunic/utils/input_utils.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';

View File

@ -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
///