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:
parent
ae75429b1d
commit
7ae50e21a4
@ -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" />
|
||||
|
@ -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,
|
||||
);
|
||||
|
@ -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
|
||||
///
|
||||
|
@ -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';
|
||||
|
||||
|
@ -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!");
|
||||
|
@ -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';
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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';
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
///
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
///
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
///
|
||||
|
@ -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';
|
||||
|
@ -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),
|
||||
),
|
||||
|
@ -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,
|
||||
);
|
||||
}
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
///
|
||||
|
@ -1,5 +1,3 @@
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:comunic/utils/input_utils.dart';
|
||||
import 'package:flutter/gestures.dart';
|
||||
import 'package:flutter/material.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
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user