|
|
|
@ -29,15 +29,18 @@ class _RegisterPageState extends State<RegisterProviderPage> {
|
|
|
|
|
String phoneNum = "", countryCode = "";
|
|
|
|
|
|
|
|
|
|
int role = -1, countryId = -1;
|
|
|
|
|
DropValue? selectedDrop;
|
|
|
|
|
|
|
|
|
|
TextEditingController emailController = TextEditingController();
|
|
|
|
|
|
|
|
|
|
Future<Role>? futureRoles;
|
|
|
|
|
Future<Country>? futureCountries;
|
|
|
|
|
UserVM? userVM;
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
void initState() {
|
|
|
|
|
super.initState();
|
|
|
|
|
userVM = context.read<UserVM>();
|
|
|
|
|
fetchData();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -57,7 +60,6 @@ class _RegisterPageState extends State<RegisterProviderPage> {
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
final UserVM userVM = context.read<UserVM>();
|
|
|
|
|
return Scaffold(
|
|
|
|
|
appBar: const CustomAppBar(isRemoveBackButton: false, title: ""),
|
|
|
|
|
body: Container(
|
|
|
|
@ -129,13 +131,15 @@ class _RegisterPageState extends State<RegisterProviderPage> {
|
|
|
|
|
10.height,
|
|
|
|
|
DropdownField(
|
|
|
|
|
(DropValue value) {
|
|
|
|
|
selectedDrop = value;
|
|
|
|
|
setState(() {
|
|
|
|
|
countryCode = value.subValue;
|
|
|
|
|
countryId = value.id;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
dropdownValue: selectedDrop,
|
|
|
|
|
list: dropList,
|
|
|
|
|
hint: LocaleKeys.chooseCountry.tr(),
|
|
|
|
|
hint: LocaleKeys.chooseCountry .tr(),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
@ -205,7 +209,7 @@ class _RegisterPageState extends State<RegisterProviderPage> {
|
|
|
|
|
title: LocaleKeys.continu.tr(),
|
|
|
|
|
maxWidth: double.infinity,
|
|
|
|
|
onPressed: () {
|
|
|
|
|
if (validation()) userVM.performBasicOtpRegisterPage(context, countryCode: countryCode, phoneNum: phoneNum, role: role);
|
|
|
|
|
if (validation()) userVM!.performBasicOtpRegisterPage(context, countryCode: countryCode, phoneNum: phoneNum, role: role);
|
|
|
|
|
// if (validation()) performBasicOtp(context);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|