Add pop up dialog to display selected note
This commit is contained in:
@@ -30,7 +30,23 @@ class _BuildNotesListState extends State<BuildNotesList> {
|
|||||||
),
|
),
|
||||||
subtitle: Text(widget.notes[index].note_text),
|
subtitle: Text(widget.notes[index].note_text),
|
||||||
trailing: const Icon(Icons.arrow_forward),
|
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"))
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -50,6 +50,18 @@ class _PatientManagerState extends State<PatientManager> {
|
|||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: const MyAppBar(barTitle: "Patient Manager"),
|
appBar: const MyAppBar(barTitle: "Patient Manager"),
|
||||||
drawer: MyAppDrawer(drawerTitle: widget.userEmail),
|
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(
|
body: FutureBuilder(
|
||||||
future: futurePatients,
|
future: futurePatients,
|
||||||
builder: (context, snapshot) {
|
builder: (context, snapshot) {
|
||||||
|
|||||||
Reference in New Issue
Block a user