diff --git a/packages/settings/lib/src/widgets/checkbox_settings_tile.dart b/packages/settings/lib/src/widgets/checkbox_settings_tile.dart index 3971ee33..72c99838 100644 --- a/packages/settings/lib/src/widgets/checkbox_settings_tile.dart +++ b/packages/settings/lib/src/widgets/checkbox_settings_tile.dart @@ -18,7 +18,7 @@ class CheckBoxSettingsTile extends InputSettingsTile { : CheckboxListTile( title: Text(option.label(context)), value: value, - onChanged: enabledSnapshot.data! + onChanged: enabledSnapshot.requireData ? (final value) async { await option.set(value!); } diff --git a/packages/settings/lib/src/widgets/dropdown_button_settings_tile.dart b/packages/settings/lib/src/widgets/dropdown_button_settings_tile.dart index 3f006644..89b9dbcd 100644 --- a/packages/settings/lib/src/widgets/dropdown_button_settings_tile.dart +++ b/packages/settings/lib/src/widgets/dropdown_button_settings_tile.dart @@ -42,12 +42,12 @@ class DropdownButtonSettingsTile extends InputSettingsTile> { child: DropdownButton( isExpanded: true, value: value, - items: valuesSnapshot.data!.keys + items: valuesSnapshot.requireData.keys .map( (final k) => DropdownMenuItem( value: k, child: Text( - valuesSnapshot.data![k]!(context), + valuesSnapshot.requireData[k]!(context), overflow: TextOverflow.ellipsis, ), ),