Merge pull request #106 from yaso-meth/NEW--Mzansi-Profile-reDesign
NEW--Mzansi-Profile-reDesign
This commit is contained in:
@@ -1,94 +1,85 @@
|
|||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
||||||
|
import 'package:Mzansi_Innovation_Hub/main.dart';
|
||||||
|
import 'package:Mzansi_Innovation_Hub/mih_components/mih_inputs_and_buttons/mih_button.dart';
|
||||||
|
import 'package:Mzansi_Innovation_Hub/mih_components/mih_inputs_and_buttons/mih_file_input.dart';
|
||||||
|
import 'package:Mzansi_Innovation_Hub/mih_components/mih_inputs_and_buttons/mih_text_input.dart';
|
||||||
|
import 'package:Mzansi_Innovation_Hub/mih_components/mih_package/mih-app_tool_body.dart';
|
||||||
|
import 'package:Mzansi_Innovation_Hub/mih_components/mih_pop_up_messages/mih_error_message.dart';
|
||||||
|
import 'package:Mzansi_Innovation_Hub/mih_components/mih_pop_up_messages/mih_loading_circle.dart';
|
||||||
|
import 'package:Mzansi_Innovation_Hub/mih_components/mih_pop_up_messages/mih_success_message.dart';
|
||||||
|
import 'package:Mzansi_Innovation_Hub/mih_components/mih_profile_picture.dart';
|
||||||
|
import 'package:Mzansi_Innovation_Hub/mih_env/env.dart';
|
||||||
|
import 'package:Mzansi_Innovation_Hub/mih_objects/arguments.dart';
|
||||||
import 'package:file_picker/file_picker.dart';
|
import 'package:file_picker/file_picker.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import '../../main.dart';
|
import 'package:supertokens_flutter/supertokens.dart';
|
||||||
import 'package:supertokens_flutter/http.dart' as http;
|
import 'package:supertokens_flutter/http.dart' as http;
|
||||||
import 'package:http/http.dart' as http2;
|
import 'package:http/http.dart' as http2;
|
||||||
import 'package:supertokens_flutter/supertokens.dart';
|
|
||||||
|
|
||||||
import '../../mih_components/mih_inputs_and_buttons/mih_button.dart';
|
class MihPersonalProfile extends StatefulWidget {
|
||||||
import '../../mih_components/mih_inputs_and_buttons/mih_file_input.dart';
|
|
||||||
import '../../mih_components/mih_inputs_and_buttons/mih_text_input.dart';
|
|
||||||
import '../../mih_components/mih_layout/mih_action.dart';
|
|
||||||
import '../../mih_components/mih_layout/mih_body.dart';
|
|
||||||
import '../../mih_components/mih_layout/mih_header.dart';
|
|
||||||
import '../../mih_components/mih_layout/mih_layout_builder.dart';
|
|
||||||
import '../../mih_components/mih_pop_up_messages/mih_error_message.dart';
|
|
||||||
import '../../mih_components/mih_pop_up_messages/mih_loading_circle.dart';
|
|
||||||
import '../../mih_components/mih_pop_up_messages/mih_success_message.dart';
|
|
||||||
import '../../mih_components/mih_profile_picture.dart';
|
|
||||||
import '../../mih_env/env.dart';
|
|
||||||
import '../../mih_objects/arguments.dart';
|
|
||||||
|
|
||||||
class ProfileUserUpdate extends StatefulWidget {
|
|
||||||
final AppProfileUpdateArguments arguments;
|
final AppProfileUpdateArguments arguments;
|
||||||
// final AppUser signedInUser;
|
const MihPersonalProfile({
|
||||||
// final ImageProvider<Object>? propicFile;
|
|
||||||
const ProfileUserUpdate({
|
|
||||||
super.key,
|
super.key,
|
||||||
required this.arguments,
|
required this.arguments,
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<ProfileUserUpdate> createState() => _ProfileUserUpdateState();
|
State<MihPersonalProfile> createState() => _MihPersonalProfileState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _ProfileUserUpdateState extends State<ProfileUserUpdate> {
|
class _MihPersonalProfileState extends State<MihPersonalProfile> {
|
||||||
final proPicController = TextEditingController();
|
final proPicController = TextEditingController();
|
||||||
final usernameController = TextEditingController();
|
final usernameController = TextEditingController();
|
||||||
final fnameController = TextEditingController();
|
final fnameController = TextEditingController();
|
||||||
final lnameController = TextEditingController();
|
final lnameController = TextEditingController();
|
||||||
|
|
||||||
PlatformFile? proPic;
|
PlatformFile? proPic;
|
||||||
late ImageProvider<Object>? propicPreview;
|
late ImageProvider<Object>? propicPreview;
|
||||||
late bool businessUser;
|
late bool businessUser;
|
||||||
final FocusNode _focusNode = FocusNode();
|
|
||||||
|
|
||||||
late String oldProPicName;
|
late String oldProPicName;
|
||||||
|
|
||||||
Future<void> deleteFileApiCall(String filename) async {
|
Future<void> submitForm() async {
|
||||||
// delete file from minio
|
// print("============\nsubmiit form\n=================");
|
||||||
var fname = filename.replaceAll(RegExp(r' '), '-');
|
if (isFieldsFilled()) {
|
||||||
var filePath =
|
if (oldProPicName != proPicController.text) {
|
||||||
"${widget.arguments.signedInUser.app_id}/profile_files/$fname";
|
// print("here 1");
|
||||||
var response = await http.delete(
|
// print("Pro File Name: ${proPic!.name}");
|
||||||
Uri.parse("${AppEnviroment.baseApiUrl}/minio/delete/file/"),
|
// print("Pro File Bytes: ${proPic!.bytes}");
|
||||||
headers: <String, String>{
|
await uploadSelectedFile(proPic);
|
||||||
"Content-Type": "application/json; charset=UTF-8"
|
}
|
||||||
},
|
await updateUserApiCall();
|
||||||
body: jsonEncode(<String, dynamic>{"file_path": filePath}),
|
|
||||||
);
|
|
||||||
//print("Here4");
|
|
||||||
//print(response.statusCode);
|
|
||||||
if (response.statusCode == 200) {
|
|
||||||
//SQL delete
|
|
||||||
} else {
|
} else {
|
||||||
internetConnectionPopUp();
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (context) {
|
||||||
|
return const MIHErrorMessage(errorType: "Input Error");
|
||||||
|
},
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<String> getFileUrlApiCall(String filePath) async {
|
bool isFieldsFilled() {
|
||||||
if (widget.arguments.signedInUser.pro_pic_path == "") {
|
if (fnameController.text.isEmpty ||
|
||||||
return "";
|
lnameController.text.isEmpty ||
|
||||||
} else if (AppEnviroment.getEnv() == "Dev") {
|
usernameController.text.isEmpty) {
|
||||||
return "${AppEnviroment.baseFileUrl}/mih/$filePath";
|
return false;
|
||||||
} else {
|
} else {
|
||||||
var url = "${AppEnviroment.baseApiUrl}/minio/pull/file/$filePath/prod";
|
return true;
|
||||||
var response = await http.get(Uri.parse(url));
|
|
||||||
|
|
||||||
if (response.statusCode == 200) {
|
|
||||||
String body = response.body;
|
|
||||||
var decodedData = jsonDecode(body);
|
|
||||||
|
|
||||||
return decodedData['minioURL'];
|
|
||||||
} else {
|
|
||||||
throw Exception(
|
|
||||||
"Error: GetUserData status code ${response.statusCode}");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool isBusinessUser() {
|
||||||
|
if (widget.arguments.signedInUser.type == "personal") {
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool isUsernameValid(String username) {
|
||||||
|
return RegExp(r'^[a-zA-Z][a-zA-Z0-9_]{5,19}$').hasMatch(username);
|
||||||
|
}
|
||||||
|
|
||||||
Future<void> uploadSelectedFile(PlatformFile? file) async {
|
Future<void> uploadSelectedFile(PlatformFile? file) async {
|
||||||
//print("MIH Profile Picture: $file");
|
//print("MIH Profile Picture: $file");
|
||||||
//var strem = new http.ByteStream.fromBytes(file.bytes.)
|
//var strem = new http.ByteStream.fromBytes(file.bytes.)
|
||||||
@@ -99,7 +90,6 @@ class _ProfileUserUpdateState extends State<ProfileUserUpdate> {
|
|||||||
return const Mihloadingcircle();
|
return const Mihloadingcircle();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
var token = await SuperTokens.getAccessToken();
|
var token = await SuperTokens.getAccessToken();
|
||||||
var request = http2.MultipartRequest(
|
var request = http2.MultipartRequest(
|
||||||
'POST', Uri.parse("${AppEnviroment.baseApiUrl}/minio/upload/file/"));
|
'POST', Uri.parse("${AppEnviroment.baseApiUrl}/minio/upload/file/"));
|
||||||
@@ -113,7 +103,6 @@ class _ProfileUserUpdateState extends State<ProfileUserUpdate> {
|
|||||||
var response1 = await request.send();
|
var response1 = await request.send();
|
||||||
if (response1.statusCode == 200) {
|
if (response1.statusCode == 200) {
|
||||||
deleteFileApiCall(oldProPicName);
|
deleteFileApiCall(oldProPicName);
|
||||||
|
|
||||||
// end loading circle
|
// end loading circle
|
||||||
//Navigator.of(context).pop();
|
//Navigator.of(context).pop();
|
||||||
// String message =
|
// String message =
|
||||||
@@ -124,16 +113,6 @@ class _ProfileUserUpdateState extends State<ProfileUserUpdate> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isFieldsFilled() {
|
|
||||||
if (fnameController.text.isEmpty ||
|
|
||||||
lnameController.text.isEmpty ||
|
|
||||||
usernameController.text.isEmpty) {
|
|
||||||
return false;
|
|
||||||
} else {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> updateUserApiCall() async {
|
Future<void> updateUserApiCall() async {
|
||||||
var fname = proPicController.text.replaceAll(RegExp(r' '), '-');
|
var fname = proPicController.text.replaceAll(RegExp(r' '), '-');
|
||||||
var filePath =
|
var filePath =
|
||||||
@@ -165,9 +144,10 @@ class _ProfileUserUpdateState extends State<ProfileUserUpdate> {
|
|||||||
//print(response.statusCode);
|
//print(response.statusCode);
|
||||||
if (response.statusCode == 200) {
|
if (response.statusCode == 200) {
|
||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
Navigator.of(context).popAndPushNamed(
|
Navigator.of(context).pushNamed(
|
||||||
'/',
|
'/user-profile',
|
||||||
arguments: AuthArguments(true, false),
|
arguments: AppProfileUpdateArguments(
|
||||||
|
widget.arguments.signedInUser, widget.arguments.propicFile),
|
||||||
);
|
);
|
||||||
String message =
|
String message =
|
||||||
"${widget.arguments.signedInUser.email}'s information has been updated successfully!";
|
"${widget.arguments.signedInUser.email}'s information has been updated successfully!";
|
||||||
@@ -178,21 +158,25 @@ class _ProfileUserUpdateState extends State<ProfileUserUpdate> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isBusinessUser() {
|
Future<void> deleteFileApiCall(String filename) async {
|
||||||
if (widget.arguments.signedInUser.type == "personal") {
|
// delete file from minio
|
||||||
return false;
|
var fname = filename.replaceAll(RegExp(r' '), '-');
|
||||||
} else {
|
var filePath =
|
||||||
return true;
|
"${widget.arguments.signedInUser.app_id}/profile_files/$fname";
|
||||||
}
|
var response = await http.delete(
|
||||||
}
|
Uri.parse("${AppEnviroment.baseApiUrl}/minio/delete/file/"),
|
||||||
|
headers: <String, String>{
|
||||||
void internetConnectionPopUp() {
|
"Content-Type": "application/json; charset=UTF-8"
|
||||||
showDialog(
|
|
||||||
context: context,
|
|
||||||
builder: (context) {
|
|
||||||
return const MIHErrorMessage(errorType: "Internet Connection");
|
|
||||||
},
|
},
|
||||||
|
body: jsonEncode(<String, dynamic>{"file_path": filePath}),
|
||||||
);
|
);
|
||||||
|
//print("Here4");
|
||||||
|
//print(response.statusCode);
|
||||||
|
if (response.statusCode == 200) {
|
||||||
|
//SQL delete
|
||||||
|
} else {
|
||||||
|
internetConnectionPopUp();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void successPopUp(String message) {
|
void successPopUp(String message) {
|
||||||
@@ -207,6 +191,15 @@ class _ProfileUserUpdateState extends State<ProfileUserUpdate> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void internetConnectionPopUp() {
|
||||||
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (context) {
|
||||||
|
return const MIHErrorMessage(errorType: "Internet Connection");
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
void usernamePopUp() {
|
void usernamePopUp() {
|
||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
@@ -216,64 +209,44 @@ class _ProfileUserUpdateState extends State<ProfileUserUpdate> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isUsernameValid(String username) {
|
@override
|
||||||
return RegExp(r'^[a-zA-Z][a-zA-Z0-9_]{5,19}$').hasMatch(username);
|
void dispose() {
|
||||||
|
proPicController.dispose();
|
||||||
|
usernameController.dispose();
|
||||||
|
fnameController.dispose();
|
||||||
|
lnameController.dispose();
|
||||||
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> submitForm() async {
|
@override
|
||||||
// print("============\nsubmiit form\n=================");
|
void initState() {
|
||||||
if (isFieldsFilled()) {
|
var proPicName = "";
|
||||||
if (oldProPicName != proPicController.text) {
|
if (widget.arguments.signedInUser.pro_pic_path.isNotEmpty) {
|
||||||
// print("here 1");
|
proPicName = widget.arguments.signedInUser.pro_pic_path.split("/").last;
|
||||||
// print("Pro File Name: ${proPic!.name}");
|
|
||||||
// print("Pro File Bytes: ${proPic!.bytes}");
|
|
||||||
await uploadSelectedFile(proPic);
|
|
||||||
}
|
|
||||||
await updateUserApiCall();
|
|
||||||
} else {
|
|
||||||
showDialog(
|
|
||||||
context: context,
|
|
||||||
builder: (context) {
|
|
||||||
return const MIHErrorMessage(errorType: "Input Error");
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
setState(() {
|
||||||
|
propicPreview = widget.arguments.propicFile;
|
||||||
|
oldProPicName = proPicName;
|
||||||
|
proPicController.text = proPicName;
|
||||||
|
fnameController.text = widget.arguments.signedInUser.fname;
|
||||||
|
lnameController.text = widget.arguments.signedInUser.lname;
|
||||||
|
usernameController.text = widget.arguments.signedInUser.username;
|
||||||
|
businessUser = isBusinessUser();
|
||||||
|
});
|
||||||
|
super.initState();
|
||||||
}
|
}
|
||||||
|
|
||||||
MIHAction getActionButton() {
|
@override
|
||||||
return MIHAction(
|
Widget build(BuildContext context) {
|
||||||
icon: const Icon(Icons.arrow_back),
|
return MihAppToolBody(
|
||||||
iconSize: 35,
|
borderOn: true,
|
||||||
onTap: () {
|
bodyItem: getBody(),
|
||||||
Navigator.of(context).pop();
|
|
||||||
|
|
||||||
Navigator.of(context).popAndPushNamed(
|
|
||||||
'/',
|
|
||||||
arguments: AuthArguments(true, false),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
MIHHeader getHeader() {
|
Widget getBody() {
|
||||||
return const MIHHeader(
|
return Column(
|
||||||
headerAlignment: MainAxisAlignment.center,
|
children: [
|
||||||
headerItems: [
|
|
||||||
Text(
|
|
||||||
"Mzansi Profile",
|
|
||||||
style: TextStyle(
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
fontSize: 25,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
MIHBody getBody() {
|
|
||||||
return MIHBody(
|
|
||||||
borderOn: false,
|
|
||||||
bodyItems: [
|
|
||||||
//displayProPic(),
|
//displayProPic(),
|
||||||
MIHProfilePicture(
|
MIHProfilePicture(
|
||||||
profilePictureFile: widget.arguments.propicFile,
|
profilePictureFile: widget.arguments.propicFile,
|
||||||
@@ -385,48 +358,4 @@ class _ProfileUserUpdateState extends State<ProfileUserUpdate> {
|
|||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
|
||||||
void dispose() {
|
|
||||||
proPicController.dispose();
|
|
||||||
usernameController.dispose();
|
|
||||||
fnameController.dispose();
|
|
||||||
lnameController.dispose();
|
|
||||||
_focusNode.dispose();
|
|
||||||
super.dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
void initState() {
|
|
||||||
var proPicName = "";
|
|
||||||
if (widget.arguments.signedInUser.pro_pic_path.isNotEmpty) {
|
|
||||||
proPicName = widget.arguments.signedInUser.pro_pic_path.split("/").last;
|
|
||||||
}
|
|
||||||
setState(() {
|
|
||||||
propicPreview = widget.arguments.propicFile;
|
|
||||||
oldProPicName = proPicName;
|
|
||||||
proPicController.text = proPicName;
|
|
||||||
fnameController.text = widget.arguments.signedInUser.fname;
|
|
||||||
lnameController.text = widget.arguments.signedInUser.lname;
|
|
||||||
usernameController.text = widget.arguments.signedInUser.username;
|
|
||||||
businessUser = isBusinessUser();
|
|
||||||
});
|
|
||||||
|
|
||||||
super.initState();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return MIHLayoutBuilder(
|
|
||||||
actionButton: getActionButton(),
|
|
||||||
header: getHeader(),
|
|
||||||
secondaryActionButton: null,
|
|
||||||
body: getBody(),
|
|
||||||
actionDrawer: null,
|
|
||||||
secondaryActionDrawer: null,
|
|
||||||
bottomNavBar: null,
|
|
||||||
pullDownToRefresh: false,
|
|
||||||
onPullDown: () async {},
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
import 'package:Mzansi_Innovation_Hub/mih_components/mih_package/mih_app.dart';
|
||||||
|
import 'package:Mzansi_Innovation_Hub/mih_components/mih_package/mih_app_action.dart';
|
||||||
|
import 'package:Mzansi_Innovation_Hub/mih_components/mih_package/mih_app_tools.dart';
|
||||||
|
import 'package:Mzansi_Innovation_Hub/mih_objects/arguments.dart';
|
||||||
|
import 'package:Mzansi_Innovation_Hub/mih_packages/mzansi_profile/personal_profile/app_tools/mih_personal_profile.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class MzansiProfile extends StatefulWidget {
|
||||||
|
final AppProfileUpdateArguments arguments;
|
||||||
|
const MzansiProfile({
|
||||||
|
super.key,
|
||||||
|
required this.arguments,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<MzansiProfile> createState() => _MzansiProfileState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _MzansiProfileState extends State<MzansiProfile> {
|
||||||
|
int _selcetedIndex = 0;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return MihApp(
|
||||||
|
appActionButton: getAction(),
|
||||||
|
appTools: getTools(),
|
||||||
|
appBody: getToolBody(),
|
||||||
|
selectedbodyIndex: _selcetedIndex,
|
||||||
|
onIndexChange: (newValue) {
|
||||||
|
setState(() {
|
||||||
|
_selcetedIndex = newValue;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
MihAppAction getAction() {
|
||||||
|
return MihAppAction(
|
||||||
|
icon: const Icon(Icons.arrow_back),
|
||||||
|
iconSize: 35,
|
||||||
|
onTap: () {
|
||||||
|
Navigator.of(context).pop();
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
MihAppTools getTools() {
|
||||||
|
Map<Widget, void Function()?> temp = {};
|
||||||
|
temp[const Icon(Icons.perm_identity)] = () {
|
||||||
|
setState(() {
|
||||||
|
_selcetedIndex = 0;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
return MihAppTools(
|
||||||
|
tools: temp,
|
||||||
|
selcetedIndex: _selcetedIndex,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
List<Widget> getToolBody() {
|
||||||
|
List<Widget> toolBodies = [
|
||||||
|
MihPersonalProfile(
|
||||||
|
arguments: widget.arguments,
|
||||||
|
),
|
||||||
|
];
|
||||||
|
return toolBodies;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6,6 +6,7 @@ import 'package:Mzansi_Innovation_Hub/mih_packages/access_review/mih_access.dart
|
|||||||
import 'package:Mzansi_Innovation_Hub/mih_packages/calculator/mih_calculator.dart';
|
import 'package:Mzansi_Innovation_Hub/mih_packages/calculator/mih_calculator.dart';
|
||||||
import 'package:Mzansi_Innovation_Hub/mih_packages/calendar/mzansi_calendar.dart';
|
import 'package:Mzansi_Innovation_Hub/mih_packages/calendar/mzansi_calendar.dart';
|
||||||
import 'package:Mzansi_Innovation_Hub/mih_packages/mzansi_ai/mzansi_ai.dart';
|
import 'package:Mzansi_Innovation_Hub/mih_packages/mzansi_ai/mzansi_ai.dart';
|
||||||
|
import 'package:Mzansi_Innovation_Hub/mih_packages/mzansi_profile/personal_profile/mzansi_profile.dart';
|
||||||
import 'package:Mzansi_Innovation_Hub/mih_packages/mzansi_wallet/components/mih_barcode_scanner.dart';
|
import 'package:Mzansi_Innovation_Hub/mih_packages/mzansi_wallet/components/mih_barcode_scanner.dart';
|
||||||
import 'package:Mzansi_Innovation_Hub/mih_packages/mzansi_wallet/mih_wallet.dart';
|
import 'package:Mzansi_Innovation_Hub/mih_packages/mzansi_wallet/mih_wallet.dart';
|
||||||
import 'package:Mzansi_Innovation_Hub/mih_packages/patient_profile/pat_manager/pat_manager.dart';
|
import 'package:Mzansi_Innovation_Hub/mih_packages/patient_profile/pat_manager/pat_manager.dart';
|
||||||
@@ -27,7 +28,6 @@ import '../mih_packages/manage_business/manage_business_profile.dart';
|
|||||||
import '../mih_packages/patient_profile/patient_view.dart';
|
import '../mih_packages/patient_profile/patient_view.dart';
|
||||||
import '../mih_packages/manage_business/profile_business_add.dart';
|
import '../mih_packages/manage_business/profile_business_add.dart';
|
||||||
import '../mih_packages/manage_business/business_details.dart';
|
import '../mih_packages/manage_business/business_details.dart';
|
||||||
import '../mih_packages/mzansi_profile/profile_user_update.dart';
|
|
||||||
|
|
||||||
class RouteGenerator {
|
class RouteGenerator {
|
||||||
static Route<dynamic> generateRoute(RouteSettings settings) {
|
static Route<dynamic> generateRoute(RouteSettings settings) {
|
||||||
@@ -119,9 +119,10 @@ class RouteGenerator {
|
|||||||
if (args is AppProfileUpdateArguments) {
|
if (args is AppProfileUpdateArguments) {
|
||||||
return MaterialPageRoute(
|
return MaterialPageRoute(
|
||||||
settings: settings,
|
settings: settings,
|
||||||
builder: (_) => ProfileUserUpdate(
|
builder: (_) => MzansiProfile(arguments: args),
|
||||||
arguments: args,
|
// ProfileUserUpdate(
|
||||||
),
|
// arguments: args,
|
||||||
|
// ),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return _errorRoute();
|
return _errorRoute();
|
||||||
|
|||||||
Reference in New Issue
Block a user