1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2025-06-20 16:55:17 +00:00

Start to fix null safety migration errors

This commit is contained in:
2022-03-10 19:39:57 +01:00
parent ab2c5da0da
commit 3a997cdc56
258 changed files with 2879 additions and 2912 deletions

View File

@ -8,16 +8,16 @@ import 'package:comunic/models/advanced_group_info.dart';
///
/// @author Pierre Hubert
AdvancedGroupInfo _forezGroup;
AdvancedGroupInfo? _forezGroup;
class ForezGroupHelper {
static Future<void> setId(int groupID) async {
(await PreferencesHelper.getInstance())
(await PreferencesHelper.getInstance())!
.setInt(PreferencesKeyList.FOREZ_GROUP, groupID);
}
static Future<int> getId() async {
return (await PreferencesHelper.getInstance())
static Future<int?> getId() async {
return (await PreferencesHelper.getInstance())!
.getInt(PreferencesKeyList.FOREZ_GROUP);
}
@ -27,7 +27,7 @@ class ForezGroupHelper {
_forezGroup = res.info;
}
static AdvancedGroupInfo getGroup() => _forezGroup;
static AdvancedGroupInfo? getGroup() => _forezGroup;
}
AdvancedGroupInfo get forezGroup => ForezGroupHelper.getGroup();
AdvancedGroupInfo? get forezGroup => ForezGroupHelper.getGroup();