mirror of
https://gitlab.com/comunic/comunicmobile
synced 2025-06-19 00:05:16 +00:00
Start Flutter update
This commit is contained in:
@ -41,7 +41,7 @@ abstract class BaseSerializationHelper<T extends SerializableElement> {
|
||||
try {
|
||||
final file = await _getFilePath();
|
||||
|
||||
if (!await file.exists()) return _cache = List();
|
||||
if (!await file.exists()) return _cache = [];
|
||||
|
||||
final List<dynamic> json = jsonDecode(await file.readAsString());
|
||||
_cache = json.cast<Map<String, dynamic>>().map(parse).toList();
|
||||
@ -49,7 +49,7 @@ abstract class BaseSerializationHelper<T extends SerializableElement> {
|
||||
_cache.sort();
|
||||
} catch (e, s) {
|
||||
print("Failed to read serialized data! $e => $s");
|
||||
_cache = List();
|
||||
_cache = [];
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user