settings: use requireData for AsyncSnapshots
@ -18,7 +18,7 @@ class CheckBoxSettingsTile extends InputSettingsTile<ToggleOption> {
: CheckboxListTile(
title: Text(option.label(context)),
value: value,
onChanged: enabledSnapshot.data!
onChanged: enabledSnapshot.requireData
? (final value) async {
await option.set(value!);
}
@ -42,12 +42,12 @@ class DropdownButtonSettingsTile<T> extends InputSettingsTile<SelectOption<T>> {
child: DropdownButton<T>(
isExpanded: true,
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,
),