|
|
|
@ -110,21 +110,32 @@ class _CompleteProfilePageState extends State<CompleteProfilePage> {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Future<void> performCompleteProfile() async {
|
|
|
|
Future<void> performCompleteProfile() async {
|
|
|
|
if (password == confirmPassword) {
|
|
|
|
if(validateStructure(password??"")){
|
|
|
|
print(widget.user.data!.userId??"userId");
|
|
|
|
if (password == confirmPassword) {
|
|
|
|
Utils.showLoading(context);
|
|
|
|
print(widget.user.data!.userId??"userId");
|
|
|
|
RegisterUser user = await UserApiClent().basicComplete(widget.user.data?.userId ?? "", firstName!, lastName!, email!, password!);
|
|
|
|
Utils.showLoading(context);
|
|
|
|
Utils.hideLoading(context);
|
|
|
|
RegisterUser user = await UserApiClent().basicComplete(widget.user.data?.userId ?? "", firstName!, lastName!, email!, password!);
|
|
|
|
if (user.messageStatus == 1) {
|
|
|
|
Utils.hideLoading(context);
|
|
|
|
Utils.showToast( "Successfully registered, Please login once");
|
|
|
|
if (user.messageStatus == 1) {
|
|
|
|
pop(context);
|
|
|
|
Utils.showToast( "Successfully registered, Please login once");
|
|
|
|
// pop(context);
|
|
|
|
pop(context);
|
|
|
|
// navigateReplaceWithName(context, AppRoutes.dashboard,arguments: user);
|
|
|
|
// pop(context);
|
|
|
|
|
|
|
|
// navigateReplaceWithName(context, AppRoutes.dashboard,arguments: user);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
Utils.showToast(user.message ?? "");
|
|
|
|
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
Utils.showToast(user.message ?? "");
|
|
|
|
Utils.showToast("Please enter same password");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
}else{
|
|
|
|
Utils.showToast("Please enter same password");
|
|
|
|
Utils.showToast("Password Should contains character, Number, Capital and small letters");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool validateStructure(String value){
|
|
|
|
|
|
|
|
String pattern = r'^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[!@#\$&*~]).{6,}$';
|
|
|
|
|
|
|
|
RegExp regExp = new RegExp(pattern);
|
|
|
|
|
|
|
|
return regExp.hasMatch(value);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|