We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f738109 commit e7f82e1Copy full SHA for e7f82e1
lib/model/backup.dart
@@ -28,7 +28,7 @@ class BackupStore extends AsyncNotifier<List<Backup>> {
28
Backup backup = Backup._(ref: ref, dateTime: DateTime.now());
29
Result result = await backup.save(password);
30
if (result is! ResultSuccess) {
31
- return result as Result<Backup>;
+ return result.to<Backup>((value) => null);
32
}
33
state = AsyncData([...(await future), backup]..sort());
34
return ResultSuccess(value: backup);
0 commit comments