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

View File

@@ -50,6 +50,18 @@ class _PatientManagerState extends State<PatientManager> {
return Scaffold(
appBar: const MyAppBar(barTitle: "Patient Manager"),
drawer: MyAppDrawer(drawerTitle: widget.userEmail),
//floatingActionButtonLocation: FloatingActionButtonLocation.endTop,
floatingActionButton: FloatingActionButton.extended(
label: const Text(
"Create",
style: TextStyle(
fontWeight: FontWeight.bold,
),
),
backgroundColor: Colors.blueAccent,
onPressed: () {},
icon: const Icon(Icons.add),
),
body: FutureBuilder(
future: futurePatients,
builder: (context, snapshot) {