Add pop up dialog to display selected note

This commit is contained in:
2024-04-13 14:49:04 +02:00
parent 16fcd2783f
commit 34e8e7ad45
2 changed files with 29 additions and 1 deletions

View File

@@ -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"))
],
),
);
},
);
},
);