Enable use_if_null_to_convert_nulls_to_bools lint (#98753)

This commit is contained in:
Tomasz Gucio
2022-02-22 23:39:20 +01:00
committed by GitHub
parent a7790d8e3a
commit e4351ff053
71 changed files with 179 additions and 166 deletions

View File

@@ -171,7 +171,7 @@ class MotionEventsBodyState extends State<MotionEventsBody> {
}
Future<void> saveRecordedEvents(ByteData data, BuildContext context) async {
if (await channel.invokeMethod<bool>('getStoragePermission') == true) {
if (await channel.invokeMethod<bool>('getStoragePermission') ?? false) {
showMessage(
context, 'External storage permissions are required to save events');
return;