have path route show up in url bar & change routes to make logical sense
This commit is contained in:
@@ -43,7 +43,7 @@ class _HomeTileGridState extends State<HomeTileGrid> {
|
|||||||
tileList.add(HomeTile(
|
tileList.add(HomeTile(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.of(context)
|
Navigator.of(context)
|
||||||
.pushNamed('/profile', arguments: widget.signedInUser);
|
.pushNamed('/user-profile', arguments: widget.signedInUser);
|
||||||
// Navigator.of(context).pushNamedAndRemoveUntil(
|
// Navigator.of(context).pushNamedAndRemoveUntil(
|
||||||
// '/profile',
|
// '/profile',
|
||||||
// (route) => false,
|
// (route) => false,
|
||||||
@@ -62,7 +62,7 @@ class _HomeTileGridState extends State<HomeTileGrid> {
|
|||||||
tileList.add(HomeTile(
|
tileList.add(HomeTile(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.of(context).popAndPushNamed(
|
Navigator.of(context).popAndPushNamed(
|
||||||
'/business/add',
|
'/business-profile/set-up',
|
||||||
arguments: widget.signedInUser,
|
arguments: widget.signedInUser,
|
||||||
);
|
);
|
||||||
// Navigator.of(context).pushNamedAndRemoveUntil(
|
// Navigator.of(context).pushNamedAndRemoveUntil(
|
||||||
@@ -104,7 +104,7 @@ class _HomeTileGridState extends State<HomeTileGrid> {
|
|||||||
tileList.add(HomeTile(
|
tileList.add(HomeTile(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.of(context).pushNamed(
|
Navigator.of(context).pushNamed(
|
||||||
'/patient-access-review',
|
'/access-review',
|
||||||
arguments: widget.signedInUser,
|
arguments: widget.signedInUser,
|
||||||
);
|
);
|
||||||
// Navigator.of(context).pushNamedAndRemoveUntil(
|
// Navigator.of(context).pushNamedAndRemoveUntil(
|
||||||
@@ -196,7 +196,7 @@ class _HomeTileGridState extends State<HomeTileGrid> {
|
|||||||
tileList.add(HomeTile(
|
tileList.add(HomeTile(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.of(context).pushNamed(
|
Navigator.of(context).pushNamed(
|
||||||
'/business/add',
|
'/business-profile/set-up',
|
||||||
arguments: widget.signedInUser,
|
arguments: widget.signedInUser,
|
||||||
);
|
);
|
||||||
// Navigator.of(context).pushNamedAndRemoveUntil(
|
// Navigator.of(context).pushNamedAndRemoveUntil(
|
||||||
@@ -212,7 +212,7 @@ class _HomeTileGridState extends State<HomeTileGrid> {
|
|||||||
));
|
));
|
||||||
tileList.add(HomeTile(
|
tileList.add(HomeTile(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.of(context).pushNamed('/patient-manager/add',
|
Navigator.of(context).pushNamed('/patient-profile/set-up',
|
||||||
arguments: widget.signedInUser);
|
arguments: widget.signedInUser);
|
||||||
// Navigator.of(context).pushNamedAndRemoveUntil(
|
// Navigator.of(context).pushNamedAndRemoveUntil(
|
||||||
// '/patient-manager/add',
|
// '/patient-manager/add',
|
||||||
@@ -229,9 +229,8 @@ class _HomeTileGridState extends State<HomeTileGrid> {
|
|||||||
onTap: () {
|
onTap: () {
|
||||||
// Navigator.of(context)
|
// Navigator.of(context)
|
||||||
// .popAndPushNamed('/profile', arguments: widget.signedInUser);
|
// .popAndPushNamed('/profile', arguments: widget.signedInUser);
|
||||||
Navigator.of(context).pushNamedAndRemoveUntil(
|
Navigator.of(context).pushNamed(
|
||||||
'/profile',
|
'/user-profile',
|
||||||
(route) => false,
|
|
||||||
arguments: widget.signedInUser,
|
arguments: widget.signedInUser,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ class _MIHAppDrawerState extends State<MIHAppDrawer> {
|
|||||||
),
|
),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.of(context)
|
Navigator.of(context)
|
||||||
.pushNamedAndRemoveUntil('/home', (route) => false);
|
.pushNamedAndRemoveUntil('/', (route) => false);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
ListTile(
|
ListTile(
|
||||||
@@ -166,7 +166,7 @@ class _MIHAppDrawerState extends State<MIHAppDrawer> {
|
|||||||
onTap: () {
|
onTap: () {
|
||||||
//signedInUser = snapshot.data!;
|
//signedInUser = snapshot.data!;
|
||||||
//print("MIHAppDrawer: ${signedInUser.runtimeType}");
|
//print("MIHAppDrawer: ${signedInUser.runtimeType}");
|
||||||
Navigator.of(context).popAndPushNamed('/profile',
|
Navigator.of(context).popAndPushNamed('/user-profile',
|
||||||
arguments: widget.signedInUser);
|
arguments: widget.signedInUser);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
@@ -219,7 +219,7 @@ class _MIHAppDrawerState extends State<MIHAppDrawer> {
|
|||||||
MzanziInnovationHub.of(context)!.changeTheme(ThemeMode.dark);
|
MzanziInnovationHub.of(context)!.changeTheme(ThemeMode.dark);
|
||||||
//print("Dark Mode: $darkm");
|
//print("Dark Mode: $darkm");
|
||||||
}
|
}
|
||||||
Navigator.of(context).popAndPushNamed('/home');
|
Navigator.of(context).popAndPushNamed('/');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
|
|||||||
@@ -1,13 +1,17 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:patient_manager/components/inputsAndButtons/mihTextInput.dart';
|
import 'package:patient_manager/components/inputsAndButtons/mihTextInput.dart';
|
||||||
import 'package:patient_manager/main.dart';
|
import 'package:patient_manager/main.dart';
|
||||||
|
import 'package:patient_manager/objects/appUser.dart';
|
||||||
|
import 'package:patient_manager/objects/arguments.dart';
|
||||||
import 'package:patient_manager/objects/patients.dart';
|
import 'package:patient_manager/objects/patients.dart';
|
||||||
|
|
||||||
class PatientDetails extends StatefulWidget {
|
class PatientDetails extends StatefulWidget {
|
||||||
|
final AppUser signedInUser;
|
||||||
final Patient selectedPatient;
|
final Patient selectedPatient;
|
||||||
final String type;
|
final String type;
|
||||||
const PatientDetails({
|
const PatientDetails({
|
||||||
super.key,
|
super.key,
|
||||||
|
required this.signedInUser,
|
||||||
required this.selectedPatient,
|
required this.selectedPatient,
|
||||||
required this.type,
|
required this.type,
|
||||||
});
|
});
|
||||||
@@ -194,8 +198,9 @@ class _PatientDetailsState extends State<PatientDetails> {
|
|||||||
alignment: Alignment.topRight,
|
alignment: Alignment.topRight,
|
||||||
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Navigator.of(context).pushNamed('/patient-manager/patient/edit',
|
Navigator.of(context).pushNamed('/patient-profile/edit',
|
||||||
arguments: widget.selectedPatient);
|
arguments: PatientEditArguments(
|
||||||
|
widget.signedInUser, widget.selectedPatient));
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import 'package:flutter_native_splash/flutter_native_splash.dart';
|
|||||||
import 'package:patient_manager/env/env.dart';
|
import 'package:patient_manager/env/env.dart';
|
||||||
import 'package:patient_manager/main.dart';
|
import 'package:patient_manager/main.dart';
|
||||||
import 'package:supertokens_flutter/supertokens.dart';
|
import 'package:supertokens_flutter/supertokens.dart';
|
||||||
|
import 'package:url_strategy/url_strategy.dart';
|
||||||
|
|
||||||
void main() async {
|
void main() async {
|
||||||
WidgetsBinding widgetsBinding = WidgetsFlutterBinding.ensureInitialized();
|
WidgetsBinding widgetsBinding = WidgetsFlutterBinding.ensureInitialized();
|
||||||
@@ -12,6 +13,8 @@ void main() async {
|
|||||||
apiDomain: AppEnviroment.baseApiUrl,
|
apiDomain: AppEnviroment.baseApiUrl,
|
||||||
apiBasePath: "/auth",
|
apiBasePath: "/auth",
|
||||||
);
|
);
|
||||||
|
setPathUrlStrategy();
|
||||||
|
();
|
||||||
FlutterNativeSplash.remove();
|
FlutterNativeSplash.remove();
|
||||||
runApp(const MzanziInnovationHub());
|
runApp(const MzanziInnovationHub());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,3 +40,13 @@ class PatientViewArguments {
|
|||||||
this.type,
|
this.type,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class PatientEditArguments {
|
||||||
|
final AppUser signedInUser;
|
||||||
|
final Patient selectedPatient;
|
||||||
|
|
||||||
|
PatientEditArguments(
|
||||||
|
this.signedInUser,
|
||||||
|
this.selectedPatient,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|||||||
@@ -10,16 +10,19 @@ import 'package:patient_manager/components/inputsAndButtons/mihTextInput.dart';
|
|||||||
import 'package:patient_manager/components/inputsAndButtons/mihButton.dart';
|
import 'package:patient_manager/components/inputsAndButtons/mihButton.dart';
|
||||||
import 'package:patient_manager/env/env.dart';
|
import 'package:patient_manager/env/env.dart';
|
||||||
import 'package:patient_manager/main.dart';
|
import 'package:patient_manager/main.dart';
|
||||||
|
import 'package:patient_manager/objects/appUser.dart';
|
||||||
|
import 'package:patient_manager/objects/arguments.dart';
|
||||||
import 'package:patient_manager/objects/patients.dart';
|
import 'package:patient_manager/objects/patients.dart';
|
||||||
import 'package:supertokens_flutter/supertokens.dart';
|
import 'package:supertokens_flutter/supertokens.dart';
|
||||||
import 'package:supertokens_flutter/http.dart' as http;
|
import 'package:supertokens_flutter/http.dart' as http;
|
||||||
|
|
||||||
class EditPatient extends StatefulWidget {
|
class EditPatient extends StatefulWidget {
|
||||||
final Patient selectedPatient;
|
final Patient selectedPatient;
|
||||||
|
final AppUser signedInUser;
|
||||||
const EditPatient({
|
const EditPatient({
|
||||||
super.key,
|
super.key,
|
||||||
required this.selectedPatient,
|
required this.selectedPatient,
|
||||||
|
required this.signedInUser,
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -101,7 +104,12 @@ class _EditPatientState extends State<EditPatient> {
|
|||||||
// print("Here4");
|
// print("Here4");
|
||||||
// print(response.statusCode);
|
// print(response.statusCode);
|
||||||
if (response.statusCode == 200) {
|
if (response.statusCode == 200) {
|
||||||
Navigator.of(context).pushNamed('/home');
|
Navigator.of(context).pop();
|
||||||
|
Navigator.of(context).pop();
|
||||||
|
Navigator.of(context).pushNamed('/patient-profile',
|
||||||
|
arguments: PatientViewArguments(
|
||||||
|
widget.signedInUser, null, null, null, "personal"));
|
||||||
|
//Navigator.of(context).pushNamed('/');
|
||||||
String message =
|
String message =
|
||||||
"${fnameController.text} ${lnameController.text}'s information has been updated successfully! Their medical records and details are now current.";
|
"${fnameController.text} ${lnameController.text}'s information has been updated successfully! Their medical records and details are now current.";
|
||||||
successPopUp(message);
|
successPopUp(message);
|
||||||
@@ -130,7 +138,11 @@ class _EditPatientState extends State<EditPatient> {
|
|||||||
//print("Here4");
|
//print("Here4");
|
||||||
//print(response.statusCode);
|
//print(response.statusCode);
|
||||||
if (response.statusCode == 200) {
|
if (response.statusCode == 200) {
|
||||||
Navigator.of(context).pushNamed('/home');
|
Navigator.of(context).pop();
|
||||||
|
Navigator.of(context).pop();
|
||||||
|
Navigator.of(context).popAndPushNamed('/patient-profile',
|
||||||
|
arguments: PatientViewArguments(
|
||||||
|
widget.signedInUser, null, null, null, "personal"));
|
||||||
String message =
|
String message =
|
||||||
"${fnameController.text} ${lnameController.text}'s record has been deleted successfully. This means it will no longer be visible in patient manager and cannot be used for future appointments.";
|
"${fnameController.text} ${lnameController.text}'s record has been deleted successfully. This means it will no longer be visible in patient manager and cannot be used for future appointments.";
|
||||||
successPopUp(message);
|
successPopUp(message);
|
||||||
|
|||||||
@@ -60,6 +60,7 @@ class _PatientViewState extends State<PatientView> {
|
|||||||
Widget showSelection(int index) {
|
Widget showSelection(int index) {
|
||||||
if (index == 0) {
|
if (index == 0) {
|
||||||
return PatientDetails(
|
return PatientDetails(
|
||||||
|
signedInUser: widget.arguments.signedInUser,
|
||||||
selectedPatient: widget.arguments.selectedPatient!,
|
selectedPatient: widget.arguments.selectedPatient!,
|
||||||
type: widget.arguments.type,
|
type: widget.arguments.type,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
|
|||||||
final nameController = TextEditingController();
|
final nameController = TextEditingController();
|
||||||
final typeController = TextEditingController();
|
final typeController = TextEditingController();
|
||||||
final regController = TextEditingController();
|
final regController = TextEditingController();
|
||||||
|
final addressController = TextEditingController();
|
||||||
final logonameController = TextEditingController();
|
final logonameController = TextEditingController();
|
||||||
final fnameController = TextEditingController();
|
final fnameController = TextEditingController();
|
||||||
final lnameController = TextEditingController();
|
final lnameController = TextEditingController();
|
||||||
@@ -87,7 +88,7 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
|
|||||||
);
|
);
|
||||||
if (response.statusCode == 201) {
|
if (response.statusCode == 201) {
|
||||||
uploadSelectedFile(selectedSignature, signtureController);
|
uploadSelectedFile(selectedSignature, signtureController);
|
||||||
Navigator.of(context).pushNamed('/home');
|
Navigator.of(context).pushNamed('/');
|
||||||
String message =
|
String message =
|
||||||
"Your business profile is now live! You can now start connecting with customers and growing your business.";
|
"Your business profile is now live! You can now start connecting with customers and growing your business.";
|
||||||
successPopUp(message);
|
successPopUp(message);
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ class _ProfileBusinessUpdateState extends State<ProfileBusinessUpdate> {
|
|||||||
deleteFileApiCall(oldSigPath);
|
deleteFileApiCall(oldSigPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
Navigator.of(context).pushNamed('/home');
|
Navigator.of(context).pushNamed('/');
|
||||||
String message =
|
String message =
|
||||||
"Your business profile is now live! You can now start connecting with customers and growing your business.";
|
"Your business profile is now live! You can now start connecting with customers and growing your business.";
|
||||||
successPopUp(message);
|
successPopUp(message);
|
||||||
|
|||||||
@@ -2,12 +2,9 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:patient_manager/Authentication/authCheck.dart';
|
import 'package:patient_manager/Authentication/authCheck.dart';
|
||||||
import 'package:patient_manager/components/addOrViewPatient.dart';
|
import 'package:patient_manager/components/addOrViewPatient.dart';
|
||||||
import 'package:patient_manager/components/mihAppBar.dart';
|
import 'package:patient_manager/components/mihAppBar.dart';
|
||||||
import 'package:patient_manager/components/signInOrRegister.dart';
|
|
||||||
import 'package:patient_manager/objects/appUser.dart';
|
import 'package:patient_manager/objects/appUser.dart';
|
||||||
import 'package:patient_manager/objects/arguments.dart';
|
import 'package:patient_manager/objects/arguments.dart';
|
||||||
import 'package:patient_manager/objects/patients.dart';
|
|
||||||
import 'package:patient_manager/pages/fullScreenFile.dart';
|
import 'package:patient_manager/pages/fullScreenFile.dart';
|
||||||
import 'package:patient_manager/pages/home.dart';
|
|
||||||
import 'package:patient_manager/pages/patientAccessReview.dart';
|
import 'package:patient_manager/pages/patientAccessReview.dart';
|
||||||
import 'package:patient_manager/pages/patientAdd.dart';
|
import 'package:patient_manager/pages/patientAdd.dart';
|
||||||
import 'package:patient_manager/pages/patientEdit.dart';
|
import 'package:patient_manager/pages/patientEdit.dart';
|
||||||
@@ -22,120 +19,132 @@ class RouteGenerator {
|
|||||||
final args = settings.arguments;
|
final args = settings.arguments;
|
||||||
|
|
||||||
switch (settings.name) {
|
switch (settings.name) {
|
||||||
|
// Home or Sign in or Register Pages
|
||||||
case '/':
|
case '/':
|
||||||
return MaterialPageRoute(builder: (_) => const AuthCheck());
|
return MaterialPageRoute(
|
||||||
|
settings: settings, builder: (_) => const AuthCheck());
|
||||||
|
//===============================================================
|
||||||
|
|
||||||
case '/home':
|
//User Profile
|
||||||
return MaterialPageRoute(builder: (_) => const Home());
|
case '/user-profile':
|
||||||
|
|
||||||
case '/patient-profile':
|
|
||||||
if (args is PatientViewArguments) {
|
|
||||||
//print("route generator: $args");
|
|
||||||
return MaterialPageRoute(
|
|
||||||
builder: (_) => AddOrViewPatient(
|
|
||||||
arguments: args,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return _errorRoute();
|
|
||||||
|
|
||||||
case '/patient-access-review':
|
|
||||||
if (args is AppUser) {
|
|
||||||
//print("route generator: $args");
|
|
||||||
return MaterialPageRoute(
|
|
||||||
builder: (_) => PatientAccessRequest(
|
|
||||||
signedInUser: args,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return _errorRoute();
|
|
||||||
|
|
||||||
case '/patient-manager':
|
|
||||||
if (args is BusinessArguments) {
|
|
||||||
//print("route generator: $args");
|
|
||||||
return MaterialPageRoute(
|
|
||||||
builder: (_) => PatientManager(
|
|
||||||
arguments: args,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return _errorRoute();
|
|
||||||
|
|
||||||
case '/patient-manager/add':
|
|
||||||
if (args is AppUser) {
|
|
||||||
return MaterialPageRoute(
|
|
||||||
builder: (_) => AddPatient(
|
|
||||||
signedInUser: args,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return _errorRoute();
|
|
||||||
|
|
||||||
case '/patient-manager/patient':
|
|
||||||
if (args is PatientViewArguments) {
|
|
||||||
return MaterialPageRoute(
|
|
||||||
builder: (_) => PatientView(
|
|
||||||
arguments: args,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return _errorRoute();
|
|
||||||
|
|
||||||
case '/patient-manager/patient/edit':
|
|
||||||
if (args is Patient) {
|
|
||||||
return MaterialPageRoute(
|
|
||||||
builder: (_) => EditPatient(
|
|
||||||
selectedPatient: args,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return _errorRoute();
|
|
||||||
|
|
||||||
case '/profile':
|
|
||||||
if (args is AppUser) {
|
if (args is AppUser) {
|
||||||
return MaterialPageRoute(
|
return MaterialPageRoute(
|
||||||
|
settings: settings,
|
||||||
builder: (_) => ProfileUserUpdate(
|
builder: (_) => ProfileUserUpdate(
|
||||||
signedInUser: args,
|
signedInUser: args,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return _errorRoute();
|
return _errorRoute();
|
||||||
|
//===============================================================
|
||||||
|
|
||||||
case '/file-veiwer':
|
//Business Profile Pages
|
||||||
if (args is FileViewArguments) {
|
|
||||||
return MaterialPageRoute(
|
|
||||||
builder: (_) => FullScreenFileViewer(
|
|
||||||
arguments: args,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return _errorRoute();
|
|
||||||
|
|
||||||
case '/business-profile':
|
case '/business-profile':
|
||||||
if (args is BusinessArguments) {
|
if (args is BusinessArguments) {
|
||||||
return MaterialPageRoute(
|
return MaterialPageRoute(
|
||||||
|
settings: settings,
|
||||||
builder: (_) => ProfileBusinessUpdate(
|
builder: (_) => ProfileBusinessUpdate(
|
||||||
arguments: args,
|
arguments: args,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return _errorRoute();
|
return _errorRoute();
|
||||||
|
case '/business-profile/set-up':
|
||||||
case '/business/add':
|
|
||||||
if (args is AppUser) {
|
if (args is AppUser) {
|
||||||
return MaterialPageRoute(
|
return MaterialPageRoute(
|
||||||
|
settings: settings,
|
||||||
builder: (_) => ProfileBusinessAdd(
|
builder: (_) => ProfileBusinessAdd(
|
||||||
signedInUser: args,
|
signedInUser: args,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return _errorRoute();
|
return _errorRoute();
|
||||||
case '/signin':
|
//===============================================================
|
||||||
return MaterialPageRoute(builder: (_) => const SignInOrRegister());
|
|
||||||
// //case '/signIn':
|
// Patient Profile Pages
|
||||||
// // return MaterialPageRoute(builder: (_) => SignIn());
|
case '/patient-profile':
|
||||||
// case '/auth':
|
if (args is PatientViewArguments) {
|
||||||
// return MaterialPageRoute(builder: (_) => const AuthPage());
|
//print("route generator: $args");
|
||||||
|
return MaterialPageRoute(
|
||||||
|
settings: settings,
|
||||||
|
builder: (_) => AddOrViewPatient(
|
||||||
|
arguments: args,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return _errorRoute();
|
||||||
|
case '/patient-profile/set-up':
|
||||||
|
if (args is AppUser) {
|
||||||
|
return MaterialPageRoute(
|
||||||
|
settings: settings,
|
||||||
|
builder: (_) => AddPatient(
|
||||||
|
signedInUser: args,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return _errorRoute();
|
||||||
|
case '/patient-profile/edit':
|
||||||
|
if (args is PatientEditArguments) {
|
||||||
|
return MaterialPageRoute(
|
||||||
|
settings: settings,
|
||||||
|
builder: (_) => EditPatient(
|
||||||
|
signedInUser: args.signedInUser,
|
||||||
|
selectedPatient: args.selectedPatient,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return _errorRoute();
|
||||||
|
//===============================================================
|
||||||
|
|
||||||
|
// Access Review Page
|
||||||
|
case '/access-review':
|
||||||
|
if (args is AppUser) {
|
||||||
|
//print("route generator: $args");
|
||||||
|
return MaterialPageRoute(
|
||||||
|
settings: settings,
|
||||||
|
builder: (_) => PatientAccessRequest(
|
||||||
|
signedInUser: args,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return _errorRoute();
|
||||||
|
//===============================================================
|
||||||
|
|
||||||
|
//Patient Manager Pages
|
||||||
|
case '/patient-manager':
|
||||||
|
if (args is BusinessArguments) {
|
||||||
|
//print("route generator: $args");
|
||||||
|
return MaterialPageRoute(
|
||||||
|
settings: settings,
|
||||||
|
builder: (_) => PatientManager(
|
||||||
|
arguments: args,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return _errorRoute();
|
||||||
|
case '/patient-manager/patient':
|
||||||
|
if (args is PatientViewArguments) {
|
||||||
|
return MaterialPageRoute(
|
||||||
|
settings: settings,
|
||||||
|
builder: (_) => PatientView(
|
||||||
|
arguments: args,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return _errorRoute();
|
||||||
|
//===============================================================
|
||||||
|
|
||||||
|
//Full Screen File Viewer
|
||||||
|
case '/file-veiwer':
|
||||||
|
if (args is FileViewArguments) {
|
||||||
|
return MaterialPageRoute(
|
||||||
|
settings: settings,
|
||||||
|
builder: (_) => FullScreenFileViewer(
|
||||||
|
arguments: args,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return _errorRoute();
|
||||||
}
|
}
|
||||||
throw '';
|
throw '';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1229,6 +1229,14 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.1.2"
|
version: "3.1.2"
|
||||||
|
url_strategy:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: url_strategy
|
||||||
|
sha256: "6eff69fa0900b731a23552b38b54389f399d247dbb0998f2cbdf25bef6790a7c"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.3.0"
|
||||||
uuid:
|
uuid:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|||||||
@@ -49,6 +49,8 @@ dependencies:
|
|||||||
gif: ^2.3.0
|
gif: ^2.3.0
|
||||||
intl: ^0.19.0
|
intl: ^0.19.0
|
||||||
flutter_native_splash: ^2.4.1
|
flutter_native_splash: ^2.4.1
|
||||||
|
#google_maps_flutter_web: ^0.5.10
|
||||||
|
url_strategy: ^0.3.0
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
This is a placeholder for base href that will be replaced by the value of
|
This is a placeholder for base href that will be replaced by the value of
|
||||||
the `--base-href` argument provided to `flutter build`.
|
the `--base-href` argument provided to `flutter build`.
|
||||||
-->
|
-->
|
||||||
<base href="$FLUTTER_BASE_HREF">
|
<base href="/">
|
||||||
|
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta content="IE=Edge" http-equiv="X-UA-Compatible">
|
<meta content="IE=Edge" http-equiv="X-UA-Compatible">
|
||||||
|
|||||||
Reference in New Issue
Block a user