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) {
|
if (newPerson != null) {
|
||||||
setState(() {
|
setState(() {
|
||||||
person = newPerson;
|
person = newPerson;
|
||||||
|
ensemble = null;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -89,6 +90,7 @@ class _PerformanceEditorState extends State<PerformanceEditor> {
|
||||||
if (newEnsemble != null) {
|
if (newEnsemble != null) {
|
||||||
setState(() {
|
setState(() {
|
||||||
ensemble = newEnsemble;
|
ensemble = newEnsemble;
|
||||||
|
person = null;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -96,6 +98,16 @@ class _PerformanceEditorState extends State<PerformanceEditor> {
|
||||||
ListTile(
|
ListTile(
|
||||||
title: Text('Role'),
|
title: Text('Role'),
|
||||||
subtitle: Text(role?.name ?? 'Select instrument/role'),
|
subtitle: Text(role?.name ?? 'Select instrument/role'),
|
||||||
|
trailing: role != null
|
||||||
|
? IconButton(
|
||||||
|
icon: const Icon(Icons.delete),
|
||||||
|
onPressed: () {
|
||||||
|
setState(() {
|
||||||
|
role = null;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
)
|
||||||
|
: null,
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
final Instrument newRole = await Navigator.push(
|
final Instrument newRole = await Navigator.push(
|
||||||
context,
|
context,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue