mirror of
https://github.com/johrpan/musicus_mobile.git
synced 2025-10-26 10:47:25 +01:00
Performance editor: Allow clearing role
This commit is contained in:
parent
c0cb41b8d0
commit
e57fe4b97a
1 changed files with 12 additions and 0 deletions
|
|
@ -70,6 +70,7 @@ class _PerformanceEditorState extends State<PerformanceEditor> {
|
|||
if (newPerson != null) {
|
||||
setState(() {
|
||||
person = newPerson;
|
||||
ensemble = null;
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
@ -89,6 +90,7 @@ class _PerformanceEditorState extends State<PerformanceEditor> {
|
|||
if (newEnsemble != null) {
|
||||
setState(() {
|
||||
ensemble = newEnsemble;
|
||||
person = null;
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
@ -96,6 +98,16 @@ class _PerformanceEditorState extends State<PerformanceEditor> {
|
|||
ListTile(
|
||||
title: Text('Role'),
|
||||
subtitle: Text(role?.name ?? 'Select instrument/role'),
|
||||
trailing: role != null
|
||||
? IconButton(
|
||||
icon: const Icon(Icons.delete),
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
role = null;
|
||||
});
|
||||
},
|
||||
)
|
||||
: null,
|
||||
onTap: () async {
|
||||
final Instrument newRole = await Navigator.push(
|
||||
context,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue