mirror of
https://gitlab.com/comunic/comunicmobile
synced 2024-11-26 06:49:22 +00:00
Hide useless fields
This commit is contained in:
parent
07adf8c2ca
commit
a48e7f57a6
@ -12,13 +12,16 @@ class MultiChoiceEntry<T> {
|
||||
final T id;
|
||||
final String title;
|
||||
final String subtitle;
|
||||
final bool hidden;
|
||||
|
||||
const MultiChoiceEntry({
|
||||
@required this.id,
|
||||
@required this.title,
|
||||
this.subtitle,
|
||||
this.hidden = false,
|
||||
}) : assert(id != null),
|
||||
assert(title != null);
|
||||
assert(title != null),
|
||||
assert(hidden != null);
|
||||
|
||||
bool get hasSubtitle => subtitle != null;
|
||||
}
|
||||
@ -76,6 +79,7 @@ class __MultiChoicesEntryDialogState<T>
|
||||
content: AutoSizeDialogContentWidget(
|
||||
child: Column(
|
||||
children: widget.choices
|
||||
.where((f) => !f.hidden)
|
||||
.map((f) => ListTile(
|
||||
leading: Radio<T>(
|
||||
groupValue: _currChoice,
|
||||
|
@ -126,9 +126,20 @@ List<MultiChoiceEntry<GroupMembershipLevel>> get _membershipLevels => [
|
||||
title: tr("Member"),
|
||||
subtitle: tr("Can access to all group posts")),
|
||||
MultiChoiceEntry(
|
||||
id: GroupMembershipLevel.PENDING, title: tr("Requested")),
|
||||
MultiChoiceEntry(id: GroupMembershipLevel.INVITED, title: tr("Invited")),
|
||||
MultiChoiceEntry(id: GroupMembershipLevel.VISITOR, title: tr("Visitor")),
|
||||
id: GroupMembershipLevel.PENDING,
|
||||
title: tr("Requested"),
|
||||
hidden: true,
|
||||
),
|
||||
MultiChoiceEntry(
|
||||
id: GroupMembershipLevel.INVITED,
|
||||
title: tr("Invited"),
|
||||
hidden: true,
|
||||
),
|
||||
MultiChoiceEntry(
|
||||
id: GroupMembershipLevel.VISITOR,
|
||||
title: tr("Visitor"),
|
||||
hidden: true,
|
||||
),
|
||||
];
|
||||
|
||||
class _GroupMembershipTile extends StatefulWidget {
|
||||
|
Loading…
Reference in New Issue
Block a user