Skip to content

Commit e7f82e1

Browse files
committed
fix: Fixed an error occurring with type casting.
1 parent f738109 commit e7f82e1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/model/backup.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class BackupStore extends AsyncNotifier<List<Backup>> {
2828
Backup backup = Backup._(ref: ref, dateTime: DateTime.now());
2929
Result result = await backup.save(password);
3030
if (result is! ResultSuccess) {
31-
return result as Result<Backup>;
31+
return result.to<Backup>((value) => null);
3232
}
3333
state = AsyncData([...(await future), backup]..sort());
3434
return ResultSuccess(value: backup);

0 commit comments

Comments
 (0)