mirror of
https://github.com/johrpan/musicus_mobile.git
synced 2025-10-26 18:57:25 +01:00
Work editor: Allow removing composer or instrument
This commit is contained in:
parent
44de5fdae3
commit
554cf4a6ac
1 changed files with 11 additions and 0 deletions
|
|
@ -55,6 +55,12 @@ class WorkProperties extends StatelessWidget {
|
||||||
subtitle: Text(composer != null
|
subtitle: Text(composer != null
|
||||||
? '${composer.firstName} ${composer.lastName}'
|
? '${composer.firstName} ${composer.lastName}'
|
||||||
: 'Select composer'),
|
: 'Select composer'),
|
||||||
|
trailing: IconButton(
|
||||||
|
icon: const Icon(Icons.delete),
|
||||||
|
onPressed: () {
|
||||||
|
onComposerChanged(null);
|
||||||
|
},
|
||||||
|
),
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
final Person person = await Navigator.push(
|
final Person person = await Navigator.push(
|
||||||
context,
|
context,
|
||||||
|
|
@ -73,6 +79,11 @@ class WorkProperties extends StatelessWidget {
|
||||||
subtitle: Text(instruments.isNotEmpty
|
subtitle: Text(instruments.isNotEmpty
|
||||||
? instruments.map((i) => i.name).join(', ')
|
? instruments.map((i) => i.name).join(', ')
|
||||||
: 'Select instruments'),
|
: 'Select instruments'),
|
||||||
|
trailing: IconButton(
|
||||||
|
icon: const Icon(Icons.delete),
|
||||||
|
onPressed: () {
|
||||||
|
onInstrumentsChanged([]);
|
||||||
|
}),
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
final List<Instrument> selection = await Navigator.push(
|
final List<Instrument> selection = await Navigator.push(
|
||||||
context,
|
context,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue