mirror of
https://gitlab.com/comunic/comunicmobile
synced 2024-11-21 20:39:22 +00:00
Finish to fix notices
This commit is contained in:
parent
48c9ee37b6
commit
9e6d3761fe
@ -9,7 +9,6 @@ import 'package:connectivity_plus_web/connectivity_plus_web.dart';
|
||||
import 'package:file_picker/_internal/file_picker_web.dart';
|
||||
import 'package:firebase_core_web/firebase_core_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:package_info_plus_web/package_info_plus_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:wakelock_web/wakelock_web.dart';
|
||||
|
||||
import 'package:flutter_web_plugins/flutter_web_plugins.dart';
|
||||
|
||||
// ignore: public_member_api_docs
|
||||
void registerPlugins(Registrar registrar) {
|
||||
ConnectivityPlusPlugin.registerWith(registrar);
|
||||
|
@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
/// Single custom emoji information
|
||||
///
|
||||
/// @author Pierre Hubert
|
||||
@ -15,10 +13,7 @@ class CustomEmoji {
|
||||
required int this.userID,
|
||||
required String this.shortcut,
|
||||
required String this.url,
|
||||
}) : assert(id != null),
|
||||
assert(userID != null),
|
||||
assert(shortcut != null),
|
||||
assert(url != null);
|
||||
});
|
||||
|
||||
Map<String, dynamic> toMap() => {
|
||||
"id": id,
|
||||
|
@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
/// Single presence information
|
||||
///
|
||||
/// @author Pierre Hubert
|
||||
@ -15,15 +13,10 @@ class Presence {
|
||||
required this.year,
|
||||
required this.month,
|
||||
required this.day,
|
||||
}) : assert(userID != null),
|
||||
assert(year != null),
|
||||
assert(month != null),
|
||||
assert(day != null);
|
||||
});
|
||||
|
||||
Presence.fromDateTime(DateTime dt, this.userID)
|
||||
: assert(dt != null),
|
||||
year = dt.year,
|
||||
: year = dt.year,
|
||||
month = dt.month,
|
||||
day = dt.day,
|
||||
assert(userID != null);
|
||||
day = dt.day;
|
||||
}
|
||||
|
@ -18,12 +18,7 @@ class Friend extends CacheModel implements Comparable<Friend> {
|
||||
required int this.lastActive,
|
||||
required this.following,
|
||||
required this.canPostTexts,
|
||||
}) : assert(id != null),
|
||||
assert(accepted != null),
|
||||
assert(lastActive != null),
|
||||
assert(following != null),
|
||||
assert(canPostTexts != null),
|
||||
super(id: id);
|
||||
}) : super(id: id);
|
||||
|
||||
/// Check out whether friend is connected or not
|
||||
bool get isConnected => time() - 30 < lastActive!;
|
||||
@ -41,8 +36,7 @@ class Friend extends CacheModel implements Comparable<Friend> {
|
||||
};
|
||||
|
||||
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],
|
||||
following = map[FriendsListTableContract.C_FOLLOWING] == 1,
|
||||
canPostTexts = map[FriendsListTableContract.C_CAN_POST_TEXTS] == 1,
|
||||
|
@ -17,8 +17,7 @@ class NewConversationMessage {
|
||||
required this.message,
|
||||
this.file,
|
||||
this.thumbnail,
|
||||
}) : assert(conversationID != null),
|
||||
assert(file != null || message != null);
|
||||
}) : assert(file != null || message != null);
|
||||
|
||||
bool get hasMessage => message != null;
|
||||
|
||||
|
@ -18,9 +18,7 @@ class MultiChoiceEntry<T> {
|
||||
required this.title,
|
||||
this.subtitle,
|
||||
this.hidden = false,
|
||||
}) : assert(id != null),
|
||||
assert(title != null),
|
||||
assert(hidden != null);
|
||||
}) : assert(id != null);
|
||||
|
||||
bool get hasSubtitle => subtitle != null;
|
||||
}
|
||||
|
@ -15,8 +15,7 @@ class UserWritingInConvNotifier extends StatefulWidget {
|
||||
final int convID;
|
||||
|
||||
const UserWritingInConvNotifier({Key? key, required this.convID})
|
||||
: assert(convID != null),
|
||||
super(key: key);
|
||||
: super(key: key);
|
||||
|
||||
@override
|
||||
_UserWritingInConvNotifierState createState() =>
|
||||
|
@ -32,8 +32,6 @@ Future<BytesFile?> pickImage(BuildContext context,
|
||||
/// Throws in case of failure
|
||||
Future<File> generateTemporaryFile() async {
|
||||
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)));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user