fresh start
This commit is contained in:
@@ -26,7 +26,7 @@ class AuthCheck extends StatelessWidget {
|
||||
}
|
||||
|
||||
// Connection state not active, show loading indicator
|
||||
return CircularProgressIndicator();
|
||||
return const CircularProgressIndicator();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ class _BuildPatientsListState extends State<BuildPatientsList> {
|
||||
Widget build(BuildContext context) {
|
||||
return ListView.separated(
|
||||
separatorBuilder: (BuildContext context, int index) {
|
||||
return Divider();
|
||||
return const Divider();
|
||||
},
|
||||
itemCount: widget.patients.length,
|
||||
itemBuilder: (context, index) {
|
||||
@@ -37,7 +37,7 @@ class _BuildPatientsListState extends State<BuildPatientsList> {
|
||||
arguments: widget.patients[index]);
|
||||
});
|
||||
},
|
||||
trailing: Icon(Icons.arrow_forward),
|
||||
trailing: const Icon(Icons.arrow_forward),
|
||||
)
|
||||
: Container();
|
||||
},
|
||||
|
||||
@@ -17,13 +17,13 @@ class _MyAppDrawerState extends State<MyAppDrawer> {
|
||||
padding: EdgeInsets.zero,
|
||||
children: [
|
||||
DrawerHeader(
|
||||
child: Text(widget.drawerTitle as String),
|
||||
decoration: const BoxDecoration(
|
||||
color: Colors.blueAccent,
|
||||
),
|
||||
child: Text(widget.drawerTitle),
|
||||
),
|
||||
ListTile(
|
||||
title: Text("Home"),
|
||||
title: const Text("Home"),
|
||||
onTap: () {
|
||||
Navigator.of(context).pushNamed('/home');
|
||||
},
|
||||
|
||||
@@ -21,8 +21,9 @@ class _MyPassFieldState extends State<MyPassField> {
|
||||
void _toggleObscured() {
|
||||
setState(() {
|
||||
_obscured = !_obscured;
|
||||
if (textFieldFocusNode.hasPrimaryFocus)
|
||||
if (textFieldFocusNode.hasPrimaryFocus) {
|
||||
return; // If focus is on text field, dont unfocus
|
||||
}
|
||||
textFieldFocusNode.canRequestFocus =
|
||||
false; // Prevents focus if tap on eye
|
||||
});
|
||||
|
||||
@@ -37,7 +37,7 @@ class _HomeState extends State<Home> {
|
||||
builder: (contexts, snapshot) {
|
||||
if (snapshot.connectionState == ConnectionState.done) {
|
||||
return Scaffold(
|
||||
appBar: MyAppBar(barTitle: "Mzanzi Innovation Hub"),
|
||||
appBar: const MyAppBar(barTitle: "Mzanzi Innovation Hub"),
|
||||
drawer: MyAppDrawer(
|
||||
drawerTitle: useremail,
|
||||
),
|
||||
@@ -46,7 +46,7 @@ class _HomeState extends State<Home> {
|
||||
),
|
||||
);
|
||||
} else {
|
||||
return Center(child: CircularProgressIndicator());
|
||||
return const Center(child: CircularProgressIndicator());
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
@@ -66,7 +66,7 @@ class _PatientManagerState extends State<PatientManager> {
|
||||
future: futurePatients,
|
||||
builder: (context, snapshot) {
|
||||
if (snapshot.connectionState == ConnectionState.waiting) {
|
||||
return const CircularProgressIndicator();
|
||||
return const Center(child: CircularProgressIndicator());
|
||||
} else if (snapshot.hasData) {
|
||||
final patientsList = snapshot.data!;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:patient_manager/components/PatientDetails.dart';
|
||||
import 'package:patient_manager/components/patientDetails.dart';
|
||||
import 'package:patient_manager/components/myAppBar.dart';
|
||||
import 'package:patient_manager/components/patientNotes.dart';
|
||||
import 'package:patient_manager/objects/patients.dart';
|
||||
|
||||
@@ -14,7 +14,7 @@ class RouteGenerator {
|
||||
|
||||
switch (settings.name) {
|
||||
case '/':
|
||||
return MaterialPageRoute(builder: (_) => AuthCheck());
|
||||
return MaterialPageRoute(builder: (_) => const AuthCheck());
|
||||
case '/home':
|
||||
return MaterialPageRoute(builder: (_) => const Home());
|
||||
case '/patient-manager':
|
||||
|
||||
Reference in New Issue
Block a user