diff --git a/lib/Common/api_urls.dart b/lib/Common/api_urls.dart index 8d65df2..057a17c 100644 --- a/lib/Common/api_urls.dart +++ b/lib/Common/api_urls.dart @@ -55,6 +55,12 @@ class ApiUrls { static const postremoveuser = "${baseUrl}remove-follower"; + static const postchangepassword = "${baseUrl}update-password-send-otp"; + + static const postchangepassverify = "${baseUrl}verify-update-password-otp"; + + + static const postnotification = "${baseUrl}update-notification-settings"; static const getnotification = "${baseUrl}fetch-notification-settings"; diff --git a/lib/Feed Module/Main_Screens/ProfileTab/Settings/ChangePassword.dart b/lib/Feed Module/Main_Screens/ProfileTab/Settings/ChangePassword.dart index 985436a..6cd5d7f 100644 --- a/lib/Feed Module/Main_Screens/ProfileTab/Settings/ChangePassword.dart +++ b/lib/Feed Module/Main_Screens/ProfileTab/Settings/ChangePassword.dart @@ -3,10 +3,13 @@ import 'package:flutter/services.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:regroup/Common/CommonButton.dart'; +import 'package:regroup/Common/base_manager.dart'; +import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/view_model/profilePostmethod.dart'; import 'package:regroup/Utils/Common/CommonAppbar.dart'; import 'package:regroup/Utils/Common/CustomTextformfield.dart'; import 'package:regroup/Utils/Common/blureffect.dart'; import 'package:regroup/Utils/Common/sized_box.dart'; +import 'package:regroup/Utils/dialogs.dart'; import 'package:regroup/Utils/texts.dart'; import 'package:regroup/resources/routes/route_name.dart'; import 'package:remove_emoji_input_formatter/remove_emoji_input_formatter.dart'; @@ -19,116 +22,164 @@ class ChangePassword extends StatefulWidget { } class _ChangePasswordState extends State { + TextEditingController currentpasscontroller = TextEditingController(); + TextEditingController newpasscontroller = TextEditingController(); + TextEditingController repeatpasscontroller = TextEditingController(); + + Uploadata() async { + utils.loader(); + Map updata = { + "current_password": currentpasscontroller.text, + "new_password": newpasscontroller.text, + "confirm_password": repeatpasscontroller.text, + }; + final data = await Profilepostmethod().postChangepassword(updata); + if (data.status == ResponseStatus.SUCCESS) { + Get.back(); + print("Change pass up done"); + + Get.toNamed(RouteName.verifycode, + arguments: { + "currentpass" : currentpasscontroller.text, + "newpass" : newpasscontroller.text, + "confirmpass" : repeatpasscontroller.text + } + ); + return utils.showToast(data.message); + } else { + Get.back(); + print("change pass not done"); + return utils.showToast(data.message); + } + } + @override Widget build(BuildContext context) { - return Scaffold( - resizeToAvoidBottomInset: false, - // key: _scaffoldKey1, - backgroundColor: Color(0xFF222935), - extendBody: true, - appBar: CommonAppbar( - titleTxt: "Change password", - ), - body: Stack(children: [ - Container( - decoration: const BoxDecoration( - image: DecorationImage( - image: AssetImage("assets/images/png/Ellipse 1496.png"), fit: BoxFit.fill)), + return GestureDetector( + onTap: () => FocusManager.instance.primaryFocus?.unfocus(), + child: Scaffold( + resizeToAvoidBottomInset: false, + // key: _scaffoldKey1, + backgroundColor: Color(0xFF222935), + extendBody: true, + appBar: CommonAppbar( + titleTxt: "Change password", ), - Padding( - padding: EdgeInsets.symmetric(horizontal: 16.w), - child: SingleChildScrollView( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - sizedBoxHeight(25.h), - text16w400_FCFCFC("Current password"), - sizedBoxHeight(16.w), - CustomTextFormField( - isInputPassword: true, - // textEditingController: _password, - hintText: '', - leadingIcon: Image.asset( - 'assets/images/png/lock.png', - width: 22.w, - height: 17.h, - ), - - // const Icon(Icons.lock_outline), - // validationMessage: "Enter your password", - validator: (val) { - if (val == null || val.isEmpty) { - return 'Please enter your password'; - } - return null; - }, - inputFormatters: [ - LengthLimitingTextInputFormatter(20), - RemoveEmojiInputFormatter() - ], - ), - sizedBoxHeight(25.h), - text16w400_FCFCFC("New password"), - sizedBoxHeight(16.w), - CustomTextFormField( - isInputPassword: true, - // textEditingController: _password, - hintText: '', - leadingIcon: Image.asset( - 'assets/images/png/lock.png', - width: 22.w, - height: 17.h, - ), - - // const Icon(Icons.lock_outline), - // validationMessage: "Enter your password", - validator: (val) { - if (val == null || val.isEmpty) { - return 'Please enter your password'; - } - return null; - }, - inputFormatters: [ - LengthLimitingTextInputFormatter(20), - RemoveEmojiInputFormatter() - ], - ), - sizedBoxHeight(25.h), - text16w400_FCFCFC("Repeat password"), - sizedBoxHeight(16.w), - CustomTextFormField( - isInputPassword: true, - // textEditingController: _password, - hintText: '', - leadingIcon: Image.asset( - 'assets/images/png/lock.png', - width: 22.w, - height: 17.h, - ), - - // const Icon(Icons.lock_outline), - // validationMessage: "Enter your password", - validator: (val) { - if (val == null || val.isEmpty) { - return 'Please enter your password'; - } - return null; - }, - inputFormatters: [ - LengthLimitingTextInputFormatter(20), - RemoveEmojiInputFormatter() - ], - ), - sizedBoxHeight(50.h), - CommonBtn( - text: "Verify", - onTap: () { - Get.toNamed(RouteName.verifycode); - }, - ) - ]), + body: Stack(children: [ + Container( + decoration: const BoxDecoration( + image: DecorationImage( + image: AssetImage("assets/images/png/Ellipse 1496.png"), + fit: BoxFit.fill)), ), - ) - ])); + Padding( + padding: EdgeInsets.symmetric(horizontal: 16.w), + child: SingleChildScrollView( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + sizedBoxHeight(25.h), + text16w400_FCFCFC("Current password"), + sizedBoxHeight(16.w), + CustomTextFormField( + textEditingController: currentpasscontroller, + isInputPassword: true, + // textEditingController: _password, + hintText: '', + leadingIcon: Image.asset( + 'assets/images/png/lock.png', + width: 22.w, + height: 17.h, + ), + + // const Icon(Icons.lock_outline), + // validationMessage: "Enter your password", + validator: (val) { + if (val == null || val.isEmpty) { + return 'Please enter your password'; + } + return null; + }, + inputFormatters: [ + LengthLimitingTextInputFormatter(50), + RemoveEmojiInputFormatter() + ], + ), + sizedBoxHeight(25.h), + text16w400_FCFCFC("New password"), + sizedBoxHeight(16.w), + CustomTextFormField( + textEditingController: newpasscontroller, + isInputPassword: true, + // textEditingController: _password, + hintText: '', + leadingIcon: Image.asset( + 'assets/images/png/lock.png', + width: 22.w, + height: 17.h, + ), + + // const Icon(Icons.lock_outline), + // validationMessage: "Enter your password", + validator: (val) { + if (val == null || val.isEmpty) { + return 'Please enter your password'; + } + return null; + }, + inputFormatters: [ + LengthLimitingTextInputFormatter(50), + RemoveEmojiInputFormatter() + ], + ), + sizedBoxHeight(25.h), + text16w400_FCFCFC("Repeat password"), + sizedBoxHeight(16.w), + CustomTextFormField( + isInputPassword: true, + textEditingController: repeatpasscontroller, + hintText: '', + leadingIcon: Image.asset( + 'assets/images/png/lock.png', + width: 22.w, + height: 17.h, + ), + + // const Icon(Icons.lock_outline), + // validationMessage: "Enter your password", + validator: (val) { + if (val == null || val.isEmpty) { + return 'Please enter your password'; + } + if (val != newpasscontroller.text) { + return 'Password does not match'; + } + return null; + }, + inputFormatters: [ + LengthLimitingTextInputFormatter(50), + RemoveEmojiInputFormatter() + ], + ), + sizedBoxHeight(50.h), + CommonBtn( + text: "Verify", + onTap: () { + // Get.toNamed(RouteName.verifycode); + if (currentpasscontroller.text.isBlank! && + newpasscontroller.text.isBlank! && + repeatpasscontroller.text.isBlank!) { + utils.showToast('Please fill all fields'); + } else { + Uploadata(); + + } + }, + ) + ]), + ), + ) + ])), + ); } } diff --git a/lib/Feed Module/Main_Screens/ProfileTab/Settings/VerifyCode.dart b/lib/Feed Module/Main_Screens/ProfileTab/Settings/VerifyCode.dart index 6764e32..efa0b8c 100644 --- a/lib/Feed Module/Main_Screens/ProfileTab/Settings/VerifyCode.dart +++ b/lib/Feed Module/Main_Screens/ProfileTab/Settings/VerifyCode.dart @@ -1,13 +1,20 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:get/get.dart'; +import 'package:pin_code_fields/pin_code_fields.dart'; import 'package:regroup/Common/CommonGlassmorphism.dart'; +import 'package:regroup/Common/base_manager.dart'; +import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/view_model/profilePostmethod.dart'; +import 'package:regroup/Global.dart'; import 'package:regroup/Utils/Common/CommonAppbar.dart'; import 'package:regroup/Utils/Common/CustomNextButton.dart'; import 'package:regroup/Utils/Common/blureffect.dart'; +import 'package:regroup/Utils/Common/googleOAuthService.dart'; import 'package:regroup/Utils/Common/sized_box.dart'; import 'package:regroup/Utils/dialogs.dart'; import 'package:regroup/Utils/texts.dart'; +import 'package:timer_button/timer_button.dart'; class VerifyCode extends StatefulWidget { const VerifyCode({super.key}); @@ -17,8 +24,59 @@ class VerifyCode extends StatefulWidget { } class _VerifyCodeState extends State { - final TextEditingController pincodeController = TextEditingController(); - final GlobalKey _formKey = GlobalKey(); + TextEditingController pincodeController = TextEditingController(); + // final GlobalKey _formKey = GlobalKey(); + + String currentpassword = Get.arguments['currentpass']; + String newpassword = Get.arguments['newpass']; + String confirmpassword = Get.arguments['confirmpass']; + + Uploadata() async { + utils.loader(); + Map updata = { + "otp": pincodeController.text, + "new_password": newpassword, + }; + // final data = res + final res = await Profilepostmethod().postChangepassverifyotp(updata); + if (res.status == ResponseStatus.SUCCESS) { + Get.back(); + print("verification done"); + + Get.back(); + Get.back(); + + return utils.showToast(res.message); + } else { + Get.back(); + print("change pass not done"); + return utils.showToast(res.message); + } + } + + Uploadataresendotp() async { + utils.loader(); + Map updata = { + "current_password": currentpassword, + "new_password": newpassword, + "confirm_password": confirmpassword, + }; + final data = await Profilepostmethod().postChangepassword(updata); + if (data.status == ResponseStatus.SUCCESS) { + Get.back(); + print("otp done"); + + setState(() { + pincodeController.clear(); + // turnValidation = false; + }); + return utils.showToast(data.message); + } else { + Get.back(); + print("otp not done"); + return utils.showToast(data.message); + } + } @override Widget build(BuildContext context) { @@ -44,34 +102,97 @@ class _VerifyCodeState extends State { text20700white("Check your email"), sizedBoxHeight(10.h), text14400whiteblur( - "Enter the verification code that we sent to loremipsum@gmail.com"), + "Enter the verification code that we sent to $emailid"), sizedBoxHeight(30.h), text16400white("Enter code"), sizedBoxHeight(20.h), - commonGlassContainer( - width: double.infinity, - height: 50.h, - borderradius: 30.r, - border: 1, - customWidget: CustomPinCodeField( - controller: pincodeController, - onChanged: (value) { - print(value); - }, - onCompleted: (value) { - print("Completed"); - pincodeController.text = value; + PinCodeTextField( + validator: (value) { + if (value != null && value.isEmpty) { + return "Please Enter verification code"; + } else if (value != null && value.length < 4) { + return "OTP length should be at least 4"; + } + return null; + }, + keyboardType: TextInputType.number, + inputFormatters: [ + FilteringTextInputFormatter.allow(RegExp('[0-9]')), + ], + mainAxisAlignment: MainAxisAlignment.spaceBetween, + length: 4, + obscureText: false, + animationType: AnimationType.fade, + pinTheme: PinTheme( + selectedFillColor: Color(0xFF434A53), + inactiveFillColor: Color(0xFF434A53), + inactiveColor: Color(0xFF434A53), + activeColor: Color(0xFF434A53), + selectedColor: Color(0xFF434A53), + shape: PinCodeFieldShape.underline, + borderRadius: BorderRadius.circular(5), + fieldHeight: 70, + fieldWidth: 70, + activeFillColor: + // Colors.white + Color(0xFF303030).withOpacity(0.4), + // textStyle: TextStyle(color: Colors.white, fontSize: 20), // Change text color and font size + ), + animationDuration: Duration(milliseconds: 300), + enableActiveFill: true, + autovalidateMode: AutovalidateMode.onUserInteraction, + controller: pincodeController, + onCompleted: (v) { + print("Completed"); + }, + onChanged: (value) { + print(value); + setState(() { + // currentText = value; + }); + }, + cursorColor: Colors.white, + textStyle: TextStyle( + color: Colors.white, + fontSize: 20.sp, + fontFamily: 'Helvetica', + ), + beforeTextPaste: (text) { + print("Allowing to paste $text"); + return true; + }, + appContext: context, + ), + sizedBoxHeight(10.h), + Center( + child: TimerButton( + disabledTextStyle: TextStyle(color: Colors.red), + activeTextStyle: TextStyle(color: Colors.white), + disabledColor: Color(0XFF222935).withOpacity(0.10), + buttonType: ButtonType.textButton, + label: "Resend OTP", + timeOutInSeconds: 6, + //mobile.text.isEmpty ? 1 : 60, + onPressed: () { + setState(() { + Uploadataresendotp(); + }); }, + // disabledColor: Colors.white, + color: Color(0XFF222935).withOpacity(0.10), ), ), + // ), sizedBoxHeight(70.h), CustomButton( text: 'Continue', onPressed: () { if (pincodeController.text.isEmpty) { utils.showToast("Pin field is empty"); + } else if (pincodeController.text.length < 4) { + utils.showToast("OTP length should be 4 digits"); } else { - return; + Uploadata(); } }, ), @@ -85,122 +206,176 @@ class _VerifyCodeState extends State { } } -class CustomPinCodeField extends StatefulWidget { - final TextEditingController controller; - final ValueChanged onChanged; - final ValueChanged onCompleted; +// class CustomPinCodeField extends StatefulWidget { +// final TextEditingController controller; +// final ValueChanged onChanged; +// final ValueChanged onCompleted; - CustomPinCodeField({ - required this.controller, - required this.onChanged, - required this.onCompleted, - }); +// CustomPinCodeField({ +// required this.controller, +// required this.onChanged, +// required this.onCompleted, +// }); - @override - _CustomPinCodeFieldState createState() => _CustomPinCodeFieldState(); -} +// @override +// _CustomPinCodeFieldState createState() => _CustomPinCodeFieldState(); +// } -class _CustomPinCodeFieldState extends State { - final GlobalKey _formKey = GlobalKey(); - late List _controllers; - late List _focusNodes; - String _currentText = ""; +// class _CustomPinCodeFieldState extends State { +// final GlobalKey _formKey = GlobalKey(); +// late List _controllers; +// late List _focusNodes; +// String _currentText = ""; - @override - void initState() { - super.initState(); - _controllers = List.generate(4, (_) => TextEditingController()); - _focusNodes = List.generate(4, (_) => FocusNode()); - } +// @override +// void initState() { +// super.initState(); +// _controllers = List.generate(4, (_) => TextEditingController()); +// _focusNodes = List.generate(4, (_) => FocusNode()); +// } - @override - void dispose() { - _controllers.forEach((controller) => controller.dispose()); - _focusNodes.forEach((focusNode) => focusNode.dispose()); - super.dispose(); - } +// @override +// void dispose() { +// _controllers.forEach((controller) => controller.dispose()); +// _focusNodes.forEach((focusNode) => focusNode.dispose()); +// super.dispose(); +// } - String? _validate(int index) { - // _currentText = _controllers.map((controller) => controller.text).join(); - if (_currentText[index].isEmpty) { - return "Please Enter verification code"; - } else if (_currentText.length < 4) { - return "OTP length should be at least 4"; - } - return null; - } +// String? _validate(int index) { +// if (_controllers[index].text.isEmpty) { +// return "Please enter verification code"; +// } else if (_controllers[index].text.length > 1) { +// return "Please enter only one digit"; +// } +// return null; +// } - void _onChanged(String value, int index) { - setState(() { - _currentText = _controllers.map((controller) => controller.text).join(); - }); - if (value.length == 1 && index != 3) { - FocusScope.of(context).nextFocus(); - } else if (value.isEmpty && index != 0) { - FocusScope.of(context).previousFocus(); - } - widget.onChanged(_currentText); +// void _onChanged(String value, int index) { +// setState(() { +// _currentText = _controllers.map((controller) => controller.text).join(); +// }); - if (_currentText.length == 4) { - widget.onCompleted(_currentText); - } - } +// if (value.isNotEmpty) { +// if (index < _controllers.length - 1) { +// FocusScope.of(context).nextFocus(); +// } else { +// // Last field, trigger onCompleted directly +// if (_currentText.length == _controllers.length) { +// widget.onCompleted(_currentText); +// } +// } +// } else { +// // Empty value, focus to previous field if not the first field +// if (index > 0) { +// FocusScope.of(context).previousFocus(); +// } +// } +// widget.onChanged(_currentText); +// } - @override - Widget build(BuildContext context) { - return Form( - key: _formKey, - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: List.generate(4, (index) { - return Row( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Center( - child: Container( - width: 30, - height: 40, - // color: Colors.amber, - child: Center( - child: TextFormField( - controller: _controllers[index], - focusNode: _focusNodes[index], - keyboardType: TextInputType.number, - inputFormatters: [ - FilteringTextInputFormatter.allow(RegExp('[0-9]')), - LengthLimitingTextInputFormatter(1), - ], - textAlign: TextAlign.center, - style: TextStyle( - color: Colors.white, - fontSize: 20.sp, - fontFamily: 'Helvetica', - ), - decoration: InputDecoration( - border: InputBorder.none, - errorStyle: TextStyle(height: 0), - ), - onChanged: (value) => _onChanged(value, index), - validator: (value) { - if (index == 3) return _validate(index); - return null; - }, - ), - ), - ), - ), - if (index != 3) - Container( - width: 12, - height: 2, - color: Colors.white, - margin: EdgeInsets.symmetric(horizontal: 10), - ), - ], - ); - }), - ), - ); - } -} +// @override +// Widget build(BuildContext context) { +// return Form( +// key: _formKey, +// child: Column( +// children: [ +// commonGlassContainer( +// width: double.infinity, +// height: 50.h, +// borderradius: 30.r, +// border: 1, +// customWidget: Row( +// mainAxisAlignment: MainAxisAlignment.center, +// crossAxisAlignment: CrossAxisAlignment.center, +// children: List.generate(4, (index) { +// return Row( +// crossAxisAlignment: CrossAxisAlignment.center, +// children: [ +// Center( +// child: Container( +// width: 30, +// height: 40, +// child: Center( +// child: TextFormField( +// controller: _controllers[index], +// focusNode: _focusNodes[index], +// keyboardType: TextInputType.number, +// inputFormatters: [ +// FilteringTextInputFormatter.allow( +// RegExp('[0-9]')), +// LengthLimitingTextInputFormatter(1), +// ], +// textAlign: TextAlign.center, +// style: TextStyle( +// color: Colors.white, +// fontSize: 20, +// fontFamily: 'Helvetica', +// ), +// decoration: InputDecoration( +// border: InputBorder.none, +// errorStyle: TextStyle(height: 0), +// ), +// onChanged: (value) => _onChanged(value, index), +// validator: (value) => _validate(index), +// ), +// ), +// ), +// ), +// if (index != 3) +// Container( +// width: 12, +// height: 2, +// color: Colors.white, +// margin: EdgeInsets.symmetric(horizontal: 10), +// ), +// ], +// ); +// }), +// ), +// ), +// sizedBoxHeight(10.h), +// Text( +// _validateErrors(), +// style: TextStyle(color: Colors.red), +// ), +// ], +// ), +// ); +// } + +// String _validateErrors() { +// for (int i = 0; i < _controllers.length; i++) { +// String? error = _validate(i); +// if (error != null) { +// return error; +// } +// } + +// // Check if OTP length is less than 4 +// if (_currentText.length < 4) { +// return "OTP length should be 4 digits"; +// } + +// return ""; +// } + +// // String _validateErrors() { +// // List errors = []; + +// // // Validate each TextFormField +// // for (int i = 0; i < _controllers.length; i++) { +// // String? error = _validate(i); +// // if (error != null && !errors.contains(error)) { +// // errors.add(error); +// // } +// // } + +// // // Check OTP length only if there are no other errors +// // if (errors.isEmpty && _currentText.length < 4) { +// // errors.add("OTP length should be 4 digits"); +// // } + +// // // Return concatenated error messages +// // return errors.isNotEmpty ? errors.join("\n") : ""; +// // } +// } diff --git a/lib/Feed Module/Main_Screens/ProfileTab/TimeLine/AddTimeline.dart b/lib/Feed Module/Main_Screens/ProfileTab/TimeLine/AddTimeline.dart index dcb222c..f9ca64d 100644 --- a/lib/Feed Module/Main_Screens/ProfileTab/TimeLine/AddTimeline.dart +++ b/lib/Feed Module/Main_Screens/ProfileTab/TimeLine/AddTimeline.dart @@ -5,6 +5,7 @@ import 'package:regroup/Common/CommonButton.dart'; import 'package:regroup/Common/CommonGlassmorphism.dart'; import 'package:regroup/Common/CommonWidget.dart'; import 'package:regroup/Utils/Common/CommonAppbar.dart'; +import 'package:regroup/Utils/Common/CommonDropdown.dart'; import 'package:regroup/Utils/Common/CustomTextformfield.dart'; import 'package:regroup/Utils/Common/blureffect.dart'; import 'package:regroup/Utils/Common/sized_box.dart'; @@ -22,6 +23,19 @@ class _AddTimelineState extends State { TextEditingController dateController = TextEditingController(); TextEditingController dateController2 = TextEditingController(); + final List _dropdownProductItems = [ + 'Individual', + 'Business', + ]; + + String _selectedAccountType = ''; + + void _onItemSelected(String value) { + setState(() { + _selectedAccountType = value; + }); + } + RxBool isChecked = false.obs; @override Widget build(BuildContext context) { @@ -150,6 +164,18 @@ class _AddTimelineState extends State { ) ], ), + text16400white("Ability"), + sizedBoxHeight(15.h), + CustomDropDownWidgetSignup( + header: 'Select ability', + title: '', + listData: _dropdownProductItems, + onItemSelected: _onItemSelected, + // leadingImage: + // Image.asset( + // 'assets/images/png/user.png', + // ), + ), sizedBoxHeight(80.h), Padding( padding: EdgeInsets.symmetric(horizontal: 20.w), diff --git a/lib/Feed Module/Main_Screens/ProfileTab/view_model/profilePostmethod.dart b/lib/Feed Module/Main_Screens/ProfileTab/view_model/profilePostmethod.dart index 8a833c8..064b81d 100644 --- a/lib/Feed Module/Main_Screens/ProfileTab/view_model/profilePostmethod.dart +++ b/lib/Feed Module/Main_Screens/ProfileTab/view_model/profilePostmethod.dart @@ -59,4 +59,26 @@ class Profilepostmethod { print("response message is ${response.message}"); return response; } + + Future> postChangepassword(updata) async { + print("updata is $updata"); + final response = await NetworkApiServices().postApi( + updata, + ApiUrls.postchangepassword, + ); + print("response is ${response.data}"); + print("response message is ${response.message}"); + return response; + } + + Future> postChangepassverifyotp(updata) async { + print("updata is $updata"); + final response = await NetworkApiServices().postApi( + updata, + ApiUrls.postchangepassverify, + ); + print("response is ${response.data}"); + print("response message is ${response.message}"); + return response; + } } diff --git a/lib/Utils/Common/CommonDropdown.dart b/lib/Utils/Common/CommonDropdown.dart index 2158584..ac68a99 100644 --- a/lib/Utils/Common/CommonDropdown.dart +++ b/lib/Utils/Common/CommonDropdown.dart @@ -12,7 +12,7 @@ class CustomDropDownWidgetSignup extends StatefulWidget { required this.title, required this.listData, required this.onItemSelected, - required this.leadingImage, + this.leadingImage, }) : super(key: key); final String header; @@ -73,7 +73,13 @@ class _CustomDropDownWidgetSignupState // 'assets/images/png/user.png', // ), - widget.leadingImage!, + widget.leadingImage == null + ? + SizedBox() + : + widget.leadingImage! + , + SizedBox(width: 16.w), Text( selectedValue.value.isEmpty diff --git a/lib/onboarding/Signup/View/verifyuser.dart b/lib/onboarding/Signup/View/verifyuser.dart index fd4f506..ab0e64e 100644 --- a/lib/onboarding/Signup/View/verifyuser.dart +++ b/lib/onboarding/Signup/View/verifyuser.dart @@ -32,7 +32,7 @@ class _VerifyuserScreenStateState extends State { int accounttypenumber = Get.arguments["accountypenumber"]; Uploadata() async { - // utils.loader(); + utils.loader(); Map updata = { "email_address": email, "password": userpassword, @@ -65,6 +65,7 @@ class _VerifyuserScreenStateState extends State { return utils.showToast(res.message); } else { + Get.back(); // btnController.error(); // btnController.reset(); Get.snackbar( @@ -87,7 +88,7 @@ class _VerifyuserScreenStateState extends State { } Uploadataresendotp() async { - // utils.loader(); + utils.loader(); Map updata = { "email_address": email, "password": userpassword, @@ -95,7 +96,7 @@ class _VerifyuserScreenStateState extends State { }; final data = await Onboard().Postregisteration(updata); if (data.status == ResponseStatus.SUCCESS) { - // Get.back(); + Get.back(); // print("resend up done"); // return utils.showToast(data.message); Get.snackbar( @@ -120,6 +121,7 @@ class _VerifyuserScreenStateState extends State { // } else { + Get.back(); // btnController.error(); // btnController.reset(); Get.snackbar(