mirror of
https://gitlab.com/comunic/comunicmobile
synced 2025-06-19 08:15:16 +00:00
Can change conversation visibility
This commit is contained in:
@ -11,6 +11,8 @@ class MultiChoicesSettingsTile<T> extends SettingsTile {
|
||||
final List<MultiChoiceEntry<T>> choices;
|
||||
final T currentValue;
|
||||
final Function(T) onChanged;
|
||||
final Widget leading;
|
||||
final Widget trailing;
|
||||
|
||||
const MultiChoicesSettingsTile({
|
||||
Key key,
|
||||
@ -18,6 +20,8 @@ class MultiChoicesSettingsTile<T> extends SettingsTile {
|
||||
@required this.choices,
|
||||
@required this.currentValue,
|
||||
@required this.onChanged,
|
||||
this.leading,
|
||||
this.trailing,
|
||||
}) : assert(title != null),
|
||||
assert(choices != null),
|
||||
assert(currentValue != null),
|
||||
@ -26,6 +30,8 @@ class MultiChoicesSettingsTile<T> extends SettingsTile {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SettingsTile(
|
||||
leading: leading,
|
||||
trailing: trailing,
|
||||
title: title,
|
||||
subtitle: choices.firstWhere((f) => f.id == currentValue).title,
|
||||
onPressed: (_) => _changeValue(context),
|
||||
|
Reference in New Issue
Block a user