Patien View page added to display selected patient.
This commit is contained in:
@@ -48,14 +48,6 @@ class _PatientManagerState extends State<PatientManager> {
|
||||
super.initState();
|
||||
}
|
||||
|
||||
// void filterSearchResults(String query) {
|
||||
// setState(() {
|
||||
// futurePatients = futurePatientsList
|
||||
// .where((item) => item.toLowerCase().contains(query.toLowerCase()))
|
||||
// .toList();
|
||||
// });
|
||||
// }
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
@@ -69,27 +61,33 @@ class _PatientManagerState extends State<PatientManager> {
|
||||
} else if (snapshot.hasData) {
|
||||
final patientsList = snapshot.data!;
|
||||
|
||||
return Column(children: [
|
||||
//spacer
|
||||
const SizedBox(height: 10),
|
||||
MySearchField(
|
||||
controller: searchController,
|
||||
hintText: "ID Search",
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
searchString = value;
|
||||
});
|
||||
},
|
||||
),
|
||||
//spacer
|
||||
const SizedBox(height: 10),
|
||||
Expanded(
|
||||
child: BuildPatientsList(
|
||||
patients: patientsList,
|
||||
searchString: searchString,
|
||||
return Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Column(children: [
|
||||
//spacer
|
||||
const SizedBox(height: 10),
|
||||
MySearchField(
|
||||
controller: searchController,
|
||||
hintText: "ID Search",
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
searchString = value;
|
||||
});
|
||||
},
|
||||
),
|
||||
//spacer
|
||||
const SizedBox(height: 10),
|
||||
Expanded(
|
||||
child: BuildPatientsList(
|
||||
patients: patientsList,
|
||||
searchString: searchString,
|
||||
),
|
||||
),
|
||||
]),
|
||||
),
|
||||
),
|
||||
]);
|
||||
],
|
||||
);
|
||||
} else {
|
||||
return const MyAppDrawer(drawerTitle: "Error pulling email");
|
||||
}
|
||||
|
||||
23
Frontend/patient_manager/lib/pages/patientView.dart
Normal file
23
Frontend/patient_manager/lib/pages/patientView.dart
Normal file
@@ -0,0 +1,23 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:patient_manager/components/myAppBar.dart';
|
||||
import 'package:patient_manager/objects/patients.dart';
|
||||
|
||||
class PatientView extends StatefulWidget {
|
||||
final Patient selectedPatient;
|
||||
const PatientView({super.key, required this.selectedPatient});
|
||||
|
||||
@override
|
||||
State<PatientView> createState() => _PatientViewState();
|
||||
}
|
||||
|
||||
class _PatientViewState extends State<PatientView> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: const MyAppBar(barTitle: "Patient View"),
|
||||
body: Center(
|
||||
child: Text(widget.selectedPatient.first_name),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user