mirror of
				https://gitlab.com/comunic/comunicmobile
				synced 2025-10-31 18:24:23 +00:00 
			
		
		
		
	Finish to fix notices
This commit is contained in:
		| @@ -9,7 +9,6 @@ import 'package:connectivity_plus_web/connectivity_plus_web.dart'; | |||||||
| import 'package:file_picker/_internal/file_picker_web.dart'; | import 'package:file_picker/_internal/file_picker_web.dart'; | ||||||
| import 'package:firebase_core_web/firebase_core_web.dart'; | import 'package:firebase_core_web/firebase_core_web.dart'; | ||||||
| import 'package:firebase_messaging_web/firebase_messaging_web.dart'; | import 'package:firebase_messaging_web/firebase_messaging_web.dart'; | ||||||
| import 'package:flutter_web_plugins/flutter_web_plugins.dart'; |  | ||||||
| import 'package:image_picker_for_web/image_picker_for_web.dart'; | import 'package:image_picker_for_web/image_picker_for_web.dart'; | ||||||
| import 'package:package_info_plus_web/package_info_plus_web.dart'; | import 'package:package_info_plus_web/package_info_plus_web.dart'; | ||||||
| import 'package:shared_preferences_web/shared_preferences_web.dart'; | import 'package:shared_preferences_web/shared_preferences_web.dart'; | ||||||
| @@ -17,6 +16,8 @@ import 'package:url_launcher_web/url_launcher_web.dart'; | |||||||
| import 'package:video_player_web/video_player_web.dart'; | import 'package:video_player_web/video_player_web.dart'; | ||||||
| import 'package:wakelock_web/wakelock_web.dart'; | import 'package:wakelock_web/wakelock_web.dart'; | ||||||
|  |  | ||||||
|  | import 'package:flutter_web_plugins/flutter_web_plugins.dart'; | ||||||
|  |  | ||||||
| // ignore: public_member_api_docs | // ignore: public_member_api_docs | ||||||
| void registerPlugins(Registrar registrar) { | void registerPlugins(Registrar registrar) { | ||||||
|   ConnectivityPlusPlugin.registerWith(registrar); |   ConnectivityPlusPlugin.registerWith(registrar); | ||||||
|   | |||||||
| @@ -1,5 +1,3 @@ | |||||||
|  |  | ||||||
|  |  | ||||||
| /// Single custom emoji information | /// Single custom emoji information | ||||||
| /// | /// | ||||||
| /// @author Pierre Hubert | /// @author Pierre Hubert | ||||||
| @@ -15,10 +13,7 @@ class CustomEmoji { | |||||||
|     required int this.userID, |     required int this.userID, | ||||||
|     required String this.shortcut, |     required String this.shortcut, | ||||||
|     required String this.url, |     required String this.url, | ||||||
|   })  : assert(id != null), |   }); | ||||||
|         assert(userID != null), |  | ||||||
|         assert(shortcut != null), |  | ||||||
|         assert(url != null); |  | ||||||
|  |  | ||||||
|   Map<String, dynamic> toMap() => { |   Map<String, dynamic> toMap() => { | ||||||
|         "id": id, |         "id": id, | ||||||
|   | |||||||
| @@ -1,5 +1,3 @@ | |||||||
|  |  | ||||||
|  |  | ||||||
| /// Single presence information | /// Single presence information | ||||||
| /// | /// | ||||||
| /// @author Pierre Hubert | /// @author Pierre Hubert | ||||||
| @@ -15,15 +13,10 @@ class Presence { | |||||||
|     required this.year, |     required this.year, | ||||||
|     required this.month, |     required this.month, | ||||||
|     required this.day, |     required this.day, | ||||||
|   })  : assert(userID != null), |   }); | ||||||
|         assert(year != null), |  | ||||||
|         assert(month != null), |  | ||||||
|         assert(day != null); |  | ||||||
|  |  | ||||||
|   Presence.fromDateTime(DateTime dt, this.userID) |   Presence.fromDateTime(DateTime dt, this.userID) | ||||||
|       : assert(dt != null), |       : year = dt.year, | ||||||
|         year = dt.year, |  | ||||||
|         month = dt.month, |         month = dt.month, | ||||||
|         day = dt.day, |         day = dt.day; | ||||||
|         assert(userID != null); |  | ||||||
| } | } | ||||||
|   | |||||||
| @@ -18,12 +18,7 @@ class Friend extends CacheModel implements Comparable<Friend> { | |||||||
|     required int this.lastActive, |     required int this.lastActive, | ||||||
|     required this.following, |     required this.following, | ||||||
|     required this.canPostTexts, |     required this.canPostTexts, | ||||||
|   })  : assert(id != null), |   }) : super(id: id); | ||||||
|         assert(accepted != null), |  | ||||||
|         assert(lastActive != null), |  | ||||||
|         assert(following != null), |  | ||||||
|         assert(canPostTexts != null), |  | ||||||
|         super(id: id); |  | ||||||
|  |  | ||||||
|   /// Check out whether friend is connected or not |   /// Check out whether friend is connected or not | ||||||
|   bool get isConnected => time() - 30 < lastActive!; |   bool get isConnected => time() - 30 < lastActive!; | ||||||
| @@ -41,8 +36,7 @@ class Friend extends CacheModel implements Comparable<Friend> { | |||||||
|       }; |       }; | ||||||
|  |  | ||||||
|   Friend.fromMap(Map<String, dynamic> map) |   Friend.fromMap(Map<String, dynamic> map) | ||||||
|       : assert(map != null), |       : accepted = map[FriendsListTableContract.C_ACCEPTED] == 1, | ||||||
|         accepted = map[FriendsListTableContract.C_ACCEPTED] == 1, |  | ||||||
|         lastActive = map[FriendsListTableContract.C_LAST_ACTIVE], |         lastActive = map[FriendsListTableContract.C_LAST_ACTIVE], | ||||||
|         following = map[FriendsListTableContract.C_FOLLOWING] == 1, |         following = map[FriendsListTableContract.C_FOLLOWING] == 1, | ||||||
|         canPostTexts = map[FriendsListTableContract.C_CAN_POST_TEXTS] == 1, |         canPostTexts = map[FriendsListTableContract.C_CAN_POST_TEXTS] == 1, | ||||||
|   | |||||||
| @@ -17,8 +17,7 @@ class NewConversationMessage { | |||||||
|     required this.message, |     required this.message, | ||||||
|     this.file, |     this.file, | ||||||
|     this.thumbnail, |     this.thumbnail, | ||||||
|   })  : assert(conversationID != null), |   }) : assert(file != null || message != null); | ||||||
|         assert(file != null || message != null); |  | ||||||
|  |  | ||||||
|   bool get hasMessage => message != null; |   bool get hasMessage => message != null; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -18,9 +18,7 @@ class MultiChoiceEntry<T> { | |||||||
|     required this.title, |     required this.title, | ||||||
|     this.subtitle, |     this.subtitle, | ||||||
|     this.hidden = false, |     this.hidden = false, | ||||||
|   })  : assert(id != null), |   }) : assert(id != null); | ||||||
|         assert(title != null), |  | ||||||
|         assert(hidden != null); |  | ||||||
|  |  | ||||||
|   bool get hasSubtitle => subtitle != null; |   bool get hasSubtitle => subtitle != null; | ||||||
| } | } | ||||||
|   | |||||||
| @@ -15,8 +15,7 @@ class UserWritingInConvNotifier extends StatefulWidget { | |||||||
|   final int convID; |   final int convID; | ||||||
|  |  | ||||||
|   const UserWritingInConvNotifier({Key? key, required this.convID}) |   const UserWritingInConvNotifier({Key? key, required this.convID}) | ||||||
|       : assert(convID != null), |       : super(key: key); | ||||||
|         super(key: key); |  | ||||||
|  |  | ||||||
|   @override |   @override | ||||||
|   _UserWritingInConvNotifierState createState() => |   _UserWritingInConvNotifierState createState() => | ||||||
|   | |||||||
| @@ -32,8 +32,6 @@ Future<BytesFile?> pickImage(BuildContext context, | |||||||
| /// Throws in case of failure | /// Throws in case of failure | ||||||
| Future<File> generateTemporaryFile() async { | Future<File> generateTemporaryFile() async { | ||||||
|   final tempDir = await getTemporaryDirectory(); |   final tempDir = await getTemporaryDirectory(); | ||||||
|   if (tempDir == null) |  | ||||||
|     throw Exception("Could not generate temporary directory!"); |  | ||||||
|   return File(path.join(tempDir.path, randomString(15, from: 65, to: 90))); |   return File(path.join(tempDir.path, randomString(15, from: 65, to: 90))); | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user