Add pop up dialog to display selected note
This commit is contained in:
parent
16fcd2783f
commit
34e8e7ad45
2 changed files with 29 additions and 1 deletions
|
|
@ -30,7 +30,23 @@ class _BuildNotesListState extends State<BuildNotesList> {
|
|||
),
|
||||
subtitle: Text(widget.notes[index].note_text),
|
||||
trailing: const Icon(Icons.arrow_forward),
|
||||
onTap: () {},
|
||||
onTap: () {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) => AlertDialog(
|
||||
title: Text(widget.notes[index].note_name),
|
||||
content: Text(
|
||||
"${widget.notes[index].insert_date}:\n${widget.notes[index].note_text}"),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: const Text("Close"))
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue