Make app dymanically resizable for phone & web
This commit is contained in:
@@ -3,13 +3,8 @@ import 'package:patient_manager/main.dart';
|
||||
import 'package:patient_manager/components/homeTileGrid.dart';
|
||||
import 'package:patient_manager/components/myAppBar.dart';
|
||||
import 'package:patient_manager/components/homeAppDrawer.dart';
|
||||
//import 'package:patient_manager/components/mySuccessMessage.dart';
|
||||
|
||||
bool darkm = false;
|
||||
|
||||
class Home extends StatefulWidget {
|
||||
//final String userEmail;
|
||||
|
||||
const Home({
|
||||
super.key,
|
||||
});
|
||||
@@ -34,6 +29,18 @@ class _HomeState extends State<Home> {
|
||||
return useremail;
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
// TODO: implement dispose
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
// TODO: implement initState
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return FutureBuilder(
|
||||
@@ -58,19 +65,12 @@ class _HomeState extends State<Home> {
|
||||
// ),
|
||||
// //backgroundColor: Colors.blueAccent,
|
||||
// onPressed: () {
|
||||
// setState(() {
|
||||
// if (darkm) {
|
||||
// darkm = !darkm;
|
||||
// MzanziInnovationHub.of(context)!
|
||||
// .changeTheme(ThemeMode.light);
|
||||
// //print("Dark Mode: $darkm");
|
||||
// } else {
|
||||
// darkm = !darkm;
|
||||
// MzanziInnovationHub.of(context)!
|
||||
// .changeTheme(ThemeMode.dark);
|
||||
// //print("Dark Mode: $darkm");
|
||||
// }
|
||||
// });
|
||||
// showDatePicker(
|
||||
// context: context,
|
||||
// initialDate: DateTime.now(),
|
||||
// firstDate: DateTime(2000),
|
||||
// lastDate: DateTime(2100),
|
||||
// );
|
||||
// // showDialog(
|
||||
// // context: context,
|
||||
// // builder: (context) =>
|
||||
@@ -83,6 +83,7 @@ class _HomeState extends State<Home> {
|
||||
// ),
|
||||
// ),
|
||||
);
|
||||
//);
|
||||
} else {
|
||||
return const Center(child: CircularProgressIndicator());
|
||||
}
|
||||
|
||||
@@ -361,7 +361,7 @@ class _AddPatientState extends State<AddPatient> {
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
SizedBox(
|
||||
width: 400.0,
|
||||
width: 450.0,
|
||||
height: 100.0,
|
||||
child: MyButton(
|
||||
onTap: () {
|
||||
|
||||
@@ -172,8 +172,8 @@ class _EditPatientState extends State<EditPatient> {
|
||||
children: [
|
||||
Container(
|
||||
padding: const EdgeInsets.all(10.0),
|
||||
width: width / 3,
|
||||
height: height / 2,
|
||||
width: 700.0,
|
||||
height: (height / 3) * 2,
|
||||
decoration: BoxDecoration(
|
||||
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
borderRadius: BorderRadius.circular(25.0),
|
||||
@@ -553,7 +553,7 @@ class _EditPatientState extends State<EditPatient> {
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
SizedBox(
|
||||
width: 400.0,
|
||||
width: 450.0,
|
||||
height: 100.0,
|
||||
child: MyButton(
|
||||
onTap: () {
|
||||
|
||||
@@ -27,17 +27,24 @@ class _PatientViewState extends State<PatientView> {
|
||||
const SizedBox(
|
||||
height: 10.0,
|
||||
),
|
||||
Row(
|
||||
Wrap(
|
||||
spacing: 10.0,
|
||||
runSpacing: 10.0,
|
||||
direction: Axis.horizontal,
|
||||
alignment: WrapAlignment.center,
|
||||
children: [
|
||||
PatientNotes(
|
||||
patientIndex: widget.selectedPatient.idpatients,
|
||||
SizedBox(
|
||||
width: 725,
|
||||
child: PatientNotes(
|
||||
patientIndex: widget.selectedPatient.idpatients,
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
width: 10,
|
||||
),
|
||||
PatientFiles(
|
||||
patientIndex: widget.selectedPatient.idpatients,
|
||||
selectedPatient: widget.selectedPatient,
|
||||
SizedBox(
|
||||
width: 725,
|
||||
child: PatientFiles(
|
||||
patientIndex: widget.selectedPatient.idpatients,
|
||||
selectedPatient: widget.selectedPatient,
|
||||
),
|
||||
)
|
||||
],
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user