Dialogs Mobile. Adjust radio und checkbox tiles
This commit is contained in:
parent
7351c58336
commit
331d2d0fc5
@ -1154,25 +1154,32 @@ class AndroidPermissionManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO move this to mobile/widgets.
|
||||||
|
// Used only for mobile, pages remote, settings, dialog
|
||||||
|
// TODO remove argument contentPadding, it’s not used, getToggle() has not
|
||||||
RadioListTile<T> getRadio<T>(
|
RadioListTile<T> getRadio<T>(
|
||||||
String name, T toValue, T curValue, void Function(T?) onChange,
|
String name, T toValue, T curValue, void Function(T?) onChange,
|
||||||
{EdgeInsetsGeometry? contentPadding}) {
|
{EdgeInsetsGeometry? contentPadding}) {
|
||||||
return RadioListTile<T>(
|
return RadioListTile<T>(
|
||||||
contentPadding: contentPadding,
|
contentPadding: contentPadding ?? EdgeInsets.zero,
|
||||||
|
visualDensity: VisualDensity.compact,
|
||||||
controlAffinity: ListTileControlAffinity.trailing,
|
controlAffinity: ListTileControlAffinity.trailing,
|
||||||
title: Text(translate(name)),
|
title: Text(translate(name)),
|
||||||
value: toValue,
|
value: toValue,
|
||||||
groupValue: curValue,
|
groupValue: curValue,
|
||||||
onChanged: onChange,
|
onChanged: onChange,
|
||||||
dense: true,
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO move this to mobile/widgets.
|
||||||
|
// Used only for mobile, pages remote, settings, dialog
|
||||||
CheckboxListTile getToggle(
|
CheckboxListTile getToggle(
|
||||||
String id, void Function(void Function()) setState, option, name,
|
String id, void Function(void Function()) setState, option, name,
|
||||||
{FFI? ffi}) {
|
{FFI? ffi}) {
|
||||||
final opt = bind.sessionGetToggleOptionSync(id: id, arg: option);
|
final opt = bind.sessionGetToggleOptionSync(id: id, arg: option);
|
||||||
return CheckboxListTile(
|
return CheckboxListTile(
|
||||||
|
contentPadding: EdgeInsets.zero,
|
||||||
|
visualDensity: VisualDensity.compact,
|
||||||
value: opt,
|
value: opt,
|
||||||
onChanged: (v) {
|
onChanged: (v) {
|
||||||
setState(() {
|
setState(() {
|
||||||
@ -1182,7 +1189,6 @@ CheckboxListTile getToggle(
|
|||||||
(ffi ?? gFFI).qualityMonitorModel.checkShowQualityMonitor(id);
|
(ffi ?? gFFI).qualityMonitorModel.checkShowQualityMonitor(id);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
dense: true,
|
|
||||||
title: Text(translate(name)));
|
title: Text(translate(name)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user