mirror of
https://github.com/johrpan/musicus_mobile.git
synced 2025-10-26 18:57:25 +01:00
mobile: Access editors from context menu
This commit is contained in:
parent
7b63cc7aaf
commit
3af7c23bbc
3 changed files with 88 additions and 43 deletions
|
|
@ -36,22 +36,6 @@ class _PersonScreenState extends State<PersonScreen> {
|
|||
'Works by ${widget.person.firstName} ${widget.person.lastName}',
|
||||
),
|
||||
),
|
||||
actions: <Widget>[
|
||||
IconButton(
|
||||
icon: const Icon(Icons.edit),
|
||||
onPressed: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => PersonEditor(
|
||||
person: widget.person,
|
||||
),
|
||||
fullscreenDialog: true,
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
body: PagedListView<WorkInfo>(
|
||||
search: _search,
|
||||
|
|
@ -68,6 +52,31 @@ class _PersonScreenState extends State<PersonScreen> {
|
|||
),
|
||||
),
|
||||
),
|
||||
onLongPress: () {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return SimpleDialog(
|
||||
children: <Widget>[
|
||||
ListTile(
|
||||
title: Text('Edit work'),
|
||||
onTap: () async {
|
||||
Navigator.pushReplacement(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => WorkEditor(
|
||||
workInfo: workInfo,
|
||||
),
|
||||
fullscreenDialog: true,
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue