Skip to content

Commit

Permalink
fix null issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ubbabeck committed Oct 4, 2023
1 parent 4acb084 commit ec543ac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ class SecurityAndBackupPageState extends State<SecurityAndBackupPage>
}

final backupSettings = backupSnapshot.data;
final isRemoteServer =
backupSettings.backupProvider?.isRemoteServer;
final isRemoteServer = (backupSettings != null &&
backupSettings.backupProvider.isRemoteServer);

return ListView(
children: [
Expand Down
3 changes: 2 additions & 1 deletion lib/widgets/enable_backup_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ class EnableBackupDialogState extends State<EnableBackupDialog> {
}

final backupSettings = snapshot.data;
bool isRemoteServer = backupSettings.backupProvider?.isRemoteServer;
bool isRemoteServer = (backupSettings != null &&
backupSettings.backupProvider.isRemoteServer);

return AlertDialog(
titlePadding: const EdgeInsets.fromLTRB(24.0, 22.0, 0.0, 16.0),
Expand Down

0 comments on commit ec543ac

Please sign in to comment.