diff --git a/lib/Utils/Common/CustomTextformfield.dart b/lib/Utils/Common/CustomTextformfield.dart index 69592fe..474c76c 100644 --- a/lib/Utils/Common/CustomTextformfield.dart +++ b/lib/Utils/Common/CustomTextformfield.dart @@ -113,9 +113,8 @@ class _CustomTextFormFieldState extends State { readOnly: widget.readonly, onTap: widget.onTap, enabled: widget.enabled, - enableInteractiveSelection: false, + enableInteractiveSelection: true, maxLines: widget.maxlines, - obscureText: obscureText, controller: widget.textEditingController, decoration: InputDecoration( @@ -160,7 +159,6 @@ class _CustomTextFormFieldState extends State { ], ), ) - : widget.suffixIcon == null ? null : widget.suffixIcon!, @@ -287,7 +285,7 @@ class _CustomTextFormField2State extends State { readOnly: widget.readonly, onTap: widget.onTap, enabled: widget.enabled, - enableInteractiveSelection: false, + enableInteractiveSelection: true, maxLines: widget.maxlines, autovalidateMode: AutovalidateMode.onUserInteraction, obscureText: obscureText, @@ -648,7 +646,7 @@ class _SearchTextFormFieldState extends State { readOnly: widget.readonly, onTap: widget.onTap, enabled: widget.enabled, - enableInteractiveSelection: false, + enableInteractiveSelection: true, maxLines: widget.maxlines, obscureText: obscureText, controller: widget.textEditingController, diff --git a/lib/main.dart b/lib/main.dart index d117a93..4879914 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -13,6 +13,7 @@ import 'package:regroup/Utils/Common/NoInternet.dart'; import 'package:regroup/firebase_options.dart'; import 'package:regroup/resources/routes/route_name.dart'; import 'package:regroup/resources/routes/routes.dart'; + Future main() async { WidgetsFlutterBinding.ensureInitialized(); await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform); diff --git a/lib/onboarding/Signup/View/Business/View/step1Letusunderstandbetter.dart b/lib/onboarding/Signup/View/Business/View/step1Letusunderstandbetter.dart index 965e40b..f60173a 100644 --- a/lib/onboarding/Signup/View/Business/View/step1Letusunderstandbetter.dart +++ b/lib/onboarding/Signup/View/Business/View/step1Letusunderstandbetter.dart @@ -136,239 +136,300 @@ class _LetusUnderstandState extends State { } } + Future _selectDuration(BuildContext context) async { + final int? picked = await showDialog( + context: context, + builder: (BuildContext context) { + return durationPickerDialog(); + }, + ); + if (picked != null && picked >= 0) { + setState(() { + openinghourscontroller.text = '$picked'; + }); + } + } + + Widget durationPickerDialog() { + int selectedHour = 1; + return AlertDialog( + title: Text('Select Duration'), + content: Container( + width: double.minPositive, + child: Container( + height: 200, + child: ListView.builder( + shrinkWrap: true, + itemCount: 20, + itemBuilder: (BuildContext context, int index) { + int hour = index + 1; + return ListTile( + title: Text('$hour hours'), + onTap: () { + setState(() { + selectedHour = hour; + }); + Navigator.of(context).pop(selectedHour); + }, + ); + }, + ), + ), + ), + actions: [ + TextButton( + child: Text('Cancel'), + onPressed: () { + Navigator.of(context).pop(); + }, + ), + ], + ); + } + @override Widget build(BuildContext context) { return Scaffold( backgroundColor: Color.fromARGB(255, 18, 32, 47), body: Stack( children: [ - Positioned(top: 70, left: -30, child: CommonBlurLeftSecond()), - Positioned(top: 310, right: -30, child: CommonBlurRightSecond()), - Positioned(top: 540, left: -30, child: CommonBlurLeftBlue()), - GlassmorphicContainer( - width: MediaQuery.of(context).size.width, - height: - // 500.h, - MediaQuery.of(context).size.height, - borderRadius: 2, - blur: 6, - alignment: Alignment.bottomLeft, - border: 2, - linearGradient: LinearGradient( - begin: Alignment.topCenter, - end: Alignment.bottomCenter, - colors: [ - Color(0XFF222935).withOpacity(0.60), - Color(0XFF222935).withOpacity(0.60), - Color(0XFF222935).withOpacity(0.60), - Color(0XFF222935).withOpacity(0.60), + // Positioned(top: 70, left: -30, child: CommonBlurLeftSecond()), + // Positioned(top: 310, right: -30, child: CommonBlurRightSecond()), + // Positioned(top: 540, left: -30, child: CommonBlurLeftBlue()), + // GlassmorphicContainer( + // width: MediaQuery.of(context).size.width, + // height: + // // 500.h, + // MediaQuery.of(context).size.height, + // borderRadius: 2, + // blur: 6, + // alignment: Alignment.bottomLeft, + // border: 2, + // linearGradient: LinearGradient( + // begin: Alignment.topCenter, + // end: Alignment.bottomCenter, + // colors: [ + // Color(0XFF222935).withOpacity(0.60), + // Color(0XFF222935).withOpacity(0.60), + // Color(0XFF222935).withOpacity(0.60), + // Color(0XFF222935).withOpacity(0.60), - // Color.fromARGB(255, 18, 32, 47).withOpacity(0.50), - // Color.fromARGB(255, 18, 32, 47).withOpacity(0.50), - // Color.fromARGB(255, 18, 32, 47).withOpacity(0.50), - // Color.fromARGB(255, 18, 32, 47).withOpacity(0.50), - ], - ), - borderGradient: LinearGradient( - begin: Alignment.topCenter, - end: Alignment.bottomCenter, - colors: [ - // Color.fromARGB(255, 18, 32, 47).withOpacity(0.50), - // Color.fromARGB(255, 18, 32, 47).withOpacity(0.50), - Color(0XFF222935).withOpacity(0.60), + // // Color.fromARGB(255, 18, 32, 47).withOpacity(0.50), + // // Color.fromARGB(255, 18, 32, 47).withOpacity(0.50), + // // Color.fromARGB(255, 18, 32, 47).withOpacity(0.50), + // // Color.fromARGB(255, 18, 32, 47).withOpacity(0.50), + // ], + // ), + // borderGradient: LinearGradient( + // begin: Alignment.topCenter, + // end: Alignment.bottomCenter, + // colors: [ + // // Color.fromARGB(255, 18, 32, 47).withOpacity(0.50), + // // Color.fromARGB(255, 18, 32, 47).withOpacity(0.50), + // Color(0XFF222935).withOpacity(0.60), - Color(0XFF222935).withOpacity(0.60), - ], - ), - child: ListView(children: [ - Padding( - padding: - EdgeInsets.symmetric(horizontal: 16.w, vertical: 50.h), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Align( - alignment: Alignment.topRight, - child: GestureDetector( - onTap: () { - Get.toNamed(RouteName.communitycommitscreen); - }, - child: Text( - 'Skip', - style: TextStyle( - color: Colors.white, - fontSize: 16.sp, - fontFamily: 'Helvetica', - fontWeight: FontWeight.w400, - decoration: TextDecoration.underline, - decorationColor: Colors.white), - ), - ), + // Color(0XFF222935).withOpacity(0.60), + // ], + // ), + // child: + + Container( + decoration: const BoxDecoration( + image: DecorationImage( + image: AssetImage("assets/images/png/Ellipse 1496.png"), + fit: BoxFit.fill)), + ), + + ListView(children: [ + Padding( + padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 50.h), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Align( + alignment: Alignment.topRight, + child: GestureDetector( + onTap: () { + Get.toNamed(RouteName.communitycommitscreen); + }, + child: Text( + 'Skip', + style: TextStyle( + color: Colors.white, + fontSize: 16.sp, + fontFamily: 'Helvetica', + fontWeight: FontWeight.w400, + decoration: TextDecoration.underline, + decorationColor: Colors.white), ), - sizedBoxHeight(30.h), - Align( - alignment: Alignment.center, - child: text16400white('Step 1 of 3')), - sizedBoxHeight(20.h), - Container( - width: 358.w, - height: 25.h, - decoration: ShapeDecoration( - shape: RoundedRectangleBorder( - side: BorderSide( - width: 1, color: Color(0xFF434A53)), - borderRadius: BorderRadius.circular(30), - ), - ), - child: Padding( - padding: EdgeInsets.symmetric( - horizontal: 8.w, vertical: 2.h), - child: Row( - children: [ - Container( - width: 15, - height: 15, - decoration: ShapeDecoration( - gradient: LinearGradient( - begin: Alignment(0.98, -0.21), - end: Alignment(-0.98, 0.21), - colors: [ - Color(0xA5D90B2E), - Color(0x42D90B2E) - ], - ), - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(30), - ), - ), - ) - ], - ), - ), + ), + ), + sizedBoxHeight(30.h), + Align( + alignment: Alignment.center, + child: text16400white('Step 1 of 3')), + sizedBoxHeight(20.h), + Container( + width: 358.w, + height: 25.h, + decoration: ShapeDecoration( + shape: RoundedRectangleBorder( + side: BorderSide(width: 1, color: Color(0xFF434A53)), + borderRadius: BorderRadius.circular(30), ), - sizedBoxHeight(30.h), - Center( - child: - text20400white('Let us understand you better')), - sizedBoxHeight(10.w), - Center( - child: Container( - width: 154.w, - decoration: ShapeDecoration( - shape: RoundedRectangleBorder( - side: BorderSide( - width: 1, - strokeAlign: BorderSide.strokeAlignCenter, - color: Color(0xFF858585), + ), + child: Padding( + padding: EdgeInsets.symmetric( + horizontal: 8.w, vertical: 2.h), + child: Row( + children: [ + Container( + width: 15, + height: 15, + decoration: ShapeDecoration( + gradient: LinearGradient( + begin: Alignment(0.98, -0.21), + end: Alignment(-0.98, 0.21), + colors: [ + Color(0xA5D90B2E), + Color(0x42D90B2E) + ], + ), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(30), ), ), + ) + ], + ), + ), + ), + sizedBoxHeight(30.h), + Center( + child: text20400white('Let us understand you better')), + sizedBoxHeight(10.w), + Center( + child: Container( + width: 154.w, + decoration: ShapeDecoration( + shape: RoundedRectangleBorder( + side: BorderSide( + width: 1, + strokeAlign: BorderSide.strokeAlignCenter, + color: Color(0xFF858585), ), ), ), - sizedBoxHeight(30.h), - text16400white('Business contact number'), - sizedBoxHeight(10.h), - CustomTextFormField( - textEditingController: busunesscontactcontroller, + ), + ), + sizedBoxHeight(30.h), + text16400white('Business contact number'), + sizedBoxHeight(10.h), + CustomTextFormField( + textEditingController: busunesscontactcontroller, - texttype: TextInputType.phone, - hintText: "Enter your business contact number", + texttype: TextInputType.phone, + hintText: "Enter your business contact number", - leadingIcon: - // const Icon(Icons.mail_outline), - Image.asset( - width: 22.w, - height: 17.h, - 'assets/images/png/phone.png', - ), - // validatorText: "Enter your business owner name", - validator: (value) { - if (value.isEmpty) { - return 'Enter your phone number'; - } else if (!RegExp(r'(^(?:[+0]9)?[0-9]{10}$)') - .hasMatch(value)) { - return 'Enter a valid phone number'; - } else if (!isValidPhoneNumber(value)) { - return 'Phone number cannot contain 10 zeros'; - } - return null; - }, - inputFormatters: [ - LengthLimitingTextInputFormatter(10), - RemoveEmojiInputFormatter(), - FilteringTextInputFormatter.allow(RegExp('[0-9]')), - ], + leadingIcon: + // const Icon(Icons.mail_outline), + Image.asset( + width: 22.w, + height: 17.h, + 'assets/images/png/phone.png', + ), + // validatorText: "Enter your business owner name", + validator: (value) { + if (value.isEmpty) { + return 'Enter your phone number'; + } else if (!RegExp(r'(^(?:[+0]9)?[0-9]{10}$)') + .hasMatch(value)) { + return 'Enter a valid phone number'; + } else if (!isValidPhoneNumber(value)) { + return 'Phone number cannot contain 10 zeros'; + } + return null; + }, + inputFormatters: [ + LengthLimitingTextInputFormatter(10), + RemoveEmojiInputFormatter(), + FilteringTextInputFormatter.allow(RegExp('[0-9]')), + ], + ), + sizedBoxHeight(15.h), + text16400white('Business email address'), + sizedBoxHeight(10.h), + CustomTextFormField( + textEditingController: emailidcontroller, + hintText: "Enter your email address", + leadingIcon: + // const Icon(Icons.mail_outline), + SizedBox( + width: 22.w, + height: 17.h, + child: Image.asset( + 'assets/images/png/mail.png', + width: 22.w, + height: 17.h, ), - sizedBoxHeight(15.h), - text16400white('Business email address'), - sizedBoxHeight(10.h), - CustomTextFormField( - textEditingController: emailidcontroller, - hintText: "Enter your email address", - leadingIcon: - // const Icon(Icons.mail_outline), - SizedBox( - width: 22.w, - height: 17.h, - child: Image.asset( - 'assets/images/png/mail.png', - width: 22.w, - height: 17.h, - ), - ), - // validatorText: "Email Id", - validator: (value) { - if (value!.isEmpty) { - return 'Enter your e-mail address'; - } - if (!RegExp( - r'^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$') - .hasMatch(value)) { - return 'Enter a valid e-mail address'; - } - return null; - }, - inputFormatters: [ - LengthLimitingTextInputFormatter(20), - RemoveEmojiInputFormatter() - ], - ), - // sizedBoxHeight(10.h), - sizedBoxHeight(15.h), + ), + // validatorText: "Email Id", + validator: (value) { + if (value!.isEmpty) { + return 'Enter your e-mail address'; + } + if (!RegExp( + r'^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$') + .hasMatch(value)) { + return 'Enter a valid e-mail address'; + } + return null; + }, + inputFormatters: [ + LengthLimitingTextInputFormatter(20), + RemoveEmojiInputFormatter() + ], + ), + // sizedBoxHeight(10.h), + sizedBoxHeight(15.h), - text16400white('Business handle'), - sizedBoxHeight(10.h), - CustomTextFormField( - textEditingController: businesshandlecontroller, - texttype: TextInputType.text, - hintText: "Enter your business handle", - leadingIcon: - // const Icon(Icons.mail_outline), - Image.asset( - width: 22.w, - height: 17.h, - 'assets/images/png/user.png', - ), - // validatorText: "Enter your business owner name", - validator: (value) { - if (value!.isEmpty) { - return 'Enter your business handle'; - } - return null; - }, - inputFormatters: [ - // LengthLimitingTextInputFormatter(20), - RemoveEmojiInputFormatter(), - FilteringTextInputFormatter.allow( - RegExp('[a-zA-Z ]')) - ], - ), - // sizedBoxHeight(10.h), - sizedBoxHeight(15.h), + text16400white('Business handle'), + sizedBoxHeight(10.h), + CustomTextFormField( + textEditingController: businesshandlecontroller, + texttype: TextInputType.text, + hintText: "Enter your business handle", + leadingIcon: + // const Icon(Icons.mail_outline), + Image.asset( + width: 22.w, + height: 17.h, + 'assets/images/png/user.png', + ), + // validatorText: "Enter your business owner name", + validator: (value) { + if (value!.isEmpty) { + return 'Enter your business handle'; + } + return null; + }, + inputFormatters: [ + // LengthLimitingTextInputFormatter(20), + RemoveEmojiInputFormatter(), + FilteringTextInputFormatter.allow(RegExp('[a-zA-Z ]')) + ], + ), + // sizedBoxHeight(10.h), + sizedBoxHeight(15.h), - text16400white('Opening hours'), - sizedBoxHeight(10.h), - CustomTextFormField( + text16400white('Opening hours'), + sizedBoxHeight(10.h), + GestureDetector( + onTap: () { + _selectDuration(context); + }, + child: AbsorbPointer( + child: CustomTextFormField( textEditingController: openinghourscontroller, texttype: TextInputType.text, hintText: "Enter your opening hours", @@ -399,373 +460,363 @@ class _LetusUnderstandState extends State { RegExp('[a-zA-ZS0-9 ]')), ], ), - // sizedBoxHeight(10.h), - sizedBoxHeight(15.h), + ), + ), + // sizedBoxHeight(10.h), + sizedBoxHeight(15.h), - text16400white('Website link'), - sizedBoxHeight(10.h), - CustomTextFormField( - textEditingController: websitelinkcontroller, - texttype: TextInputType.text, - hintText: "Enter your website link", - leadingIcon: - // const Icon(Icons.mail_outline), - Image.asset( - width: 22.w, - height: 17.h, - 'assets/images/png/globe.png', - ), - // validatorText: "Enter your business owner name", - validator: (value) { - if (value!.isEmpty) { - return 'Enter your website link'; - } - return null; - }, - inputFormatters: [ - // LengthLimitingTextInputFormatter(20), - RemoveEmojiInputFormatter(), - FilteringTextInputFormatter.allow( - RegExp('[a-zA-ZS0-9 ]')), - ], - ), - // sizedBoxHeight(10.h), - sizedBoxHeight(15.h), - - text16400white('Google review link'), - sizedBoxHeight(10.h), - CustomTextFormField( - textEditingController: googlereviewlinkcontroller, - texttype: TextInputType.text, - hintText: "Enter your google review link", - leadingIcon: - // const Icon(Icons.mail_outline), - Image.asset( - width: 22.w, - height: 17.h, - 'assets/images/png/globe.png', - ), - // validatorText: "Enter your business owner name", - validator: (value) { - if (value!.isEmpty) { - return 'Enter your google review link'; - } - return null; - }, - inputFormatters: [ - // LengthLimitingTextInputFormatter(20), - RemoveEmojiInputFormatter(), - FilteringTextInputFormatter.allow( - RegExp('[a-zA-ZS0-9 ]')), - ], - ), - // sizedBoxHeight(10.h), - sizedBoxHeight(15.h), - - text16400white('Tags'), - sizedBoxHeight(10.h), - CustomTextFormField( - textEditingController: tagscontroller, - texttype: TextInputType.text, - hintText: "Enter your Tags", - leadingIcon: - // const Icon(Icons.mail_outline), - Image.asset( - width: 22.w, - height: 17.h, - 'assets/images/png/hashtag.png', - ), - // validatorText: "Enter your business owner name", - validator: (value) { - if (value!.isEmpty) { - return 'Enter your tags'; - } - return null; - }, - inputFormatters: [ - // LengthLimitingTextInputFormatter(20), - RemoveEmojiInputFormatter(), - // FilteringTextInputFormatter.allow( - // RegExp('[a-zA-ZS0-9 ]')), - ], - ), - // sizedBoxHeight(10.h), - sizedBoxHeight(15.h), - - text16400white('Images upload'), - sizedBoxHeight(10.h), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - logoFile != "" && isImageAdded - ? Container( - width: 169, - height: 115, - decoration: ShapeDecoration( - gradient: LinearGradient( - begin: Alignment(0.98, -0.21), - end: Alignment(-0.98, 0.21), - colors: [ - Colors.white - .withOpacity(0.30000001192092896), - Colors.white - .withOpacity(0.2800000011920929) - ], - ), - shape: RoundedRectangleBorder( - side: BorderSide( - width: 0.50, - color: Color(0xFF7E7E7E)), - borderRadius: BorderRadius.circular(10), - ), - ), - child: Stack( - children: [ - Image.file( - File(logoFile), - fit: BoxFit.cover, - width: double.infinity, - ), - Positioned( - // top: 0, - // left: 0, - right: 5, - bottom: 5, - child: GestureDetector( - onTap: () { - // Clear the list and show the upload button - logoFile = ""; - isImageAdded = false; - setState(() {}); - }, - child: Container( - width: 27, - height: 27, - decoration: ShapeDecoration( - color: Color(0xFF7E7E7E), - shape: - RoundedRectangleBorder( - borderRadius: - BorderRadius - .circular( - 5)), - ), - child: Icon( - Icons - .delete_outline_outlined, - color: Colors.white, - ) - - // SvgPicture.asset( - // "assets/images/SVG/trash-2.svg", - // width: 17.w, - // height: 17.h, - // ), - )), - ), - ], - ), - ) - : GestureDetector( - onTap: () { - ImageUploadBottomSheet().showModal( - context, - false, - (result) { - var filenameresult = - extractFileName(result); - logoFile = result; - isImageAdded = true; - setState(() {}); - }, - ); - }, - child: Container( - width: 169, - height: 115, - decoration: ShapeDecoration( - gradient: LinearGradient( - begin: Alignment(0.98, -0.21), - end: Alignment(-0.98, 0.21), - colors: [ - Colors.white.withOpacity( - 0.30000001192092896), - Colors.white - .withOpacity(0.2800000011920929) - ], - ), - shape: RoundedRectangleBorder( - side: BorderSide( - width: 0.50, - color: Color(0xFF7E7E7E)), - borderRadius: - BorderRadius.circular(10), - ), - ), - child: Column( - crossAxisAlignment: - CrossAxisAlignment.center, - mainAxisAlignment: - MainAxisAlignment.center, - children: [ - Image.asset( - 'assets/images/png/onlycamera.png'), - sizedBoxHeight(5.h), - Text( - 'Upload business \nlogo', - textAlign: TextAlign.center, - style: TextStyle( - color: Colors.white, - fontSize: 14.sp, - fontFamily: 'Poppins', - fontWeight: FontWeight.w400, - ), - ), - ], - ), - ), - ), - bannerFile != "" && isbannerAdded - ? Container( - width: 169, - height: 115, - decoration: ShapeDecoration( - gradient: LinearGradient( - begin: Alignment(0.98, -0.21), - end: Alignment(-0.98, 0.21), - colors: [ - Colors.white - .withOpacity(0.30000001192092896), - Colors.white - .withOpacity(0.2800000011920929) - ], - ), - shape: RoundedRectangleBorder( - side: BorderSide( - width: 0.50, - color: Color(0xFF7E7E7E)), - borderRadius: BorderRadius.circular(10), - ), - ), - child: Stack( - children: [ - Image.file( - File(bannerFile), - fit: BoxFit.cover, - width: double.infinity, - ), - Positioned( - // top: 0, - // left: 0, - right: 5, - bottom: 5, - child: GestureDetector( - onTap: () { - // Clear the list and show the upload button - bannerFile = ""; - isbannerAdded = false; - setState(() {}); - }, - child: Container( - width: 27, - height: 27, - decoration: ShapeDecoration( - color: Color(0xFF7E7E7E), - shape: - RoundedRectangleBorder( - borderRadius: - BorderRadius - .circular( - 5)), - ), - child: Icon( - Icons - .delete_outline_outlined, - color: Colors.white, - ) - - // SvgPicture.asset( - // "assets/images/SVG/trash-2.svg", - // width: 17.w, - // height: 17.h, - // ), - )), - ), - ], - ), - ) - : GestureDetector( - onTap: () { - ImageUploadBottomSheet().showModal( - context, - false, - (result) { - var filenameresult = - extractFileName(result); - bannerFile = result; - isbannerAdded = true; - setState(() {}); - }, - ); - }, - child: Container( - width: 169, - height: 115, - decoration: ShapeDecoration( - gradient: LinearGradient( - begin: Alignment(0.98, -0.21), - end: Alignment(-0.98, 0.21), - colors: [ - Colors.white.withOpacity( - 0.30000001192092896), - Colors.white - .withOpacity(0.2800000011920929) - ], - ), - shape: RoundedRectangleBorder( - side: BorderSide( - width: 0.50, - color: Color(0xFF7E7E7E)), - borderRadius: - BorderRadius.circular(10), - ), - ), - child: Column( - crossAxisAlignment: - CrossAxisAlignment.center, - mainAxisAlignment: - MainAxisAlignment.center, - children: [ - Image.asset( - 'assets/images/png/onlycamera.png'), - sizedBoxHeight(5.h), - Text( - 'Upload banner \nimage', - textAlign: TextAlign.center, - style: TextStyle( - color: Colors.white, - fontSize: 14.sp, - fontFamily: 'Poppins', - fontWeight: FontWeight.w400, - ), - ), - ], - ), - ), - ) - ], - ), - sizedBoxHeight(40.h), - CustomButton( - text: 'Continue', - onPressed: () { - // Get.toNamed(RouteName.businessSelectgroupstep2); - _letusUnderstandDone(); - }) + text16400white('Website link'), + sizedBoxHeight(10.h), + CustomTextFormField( + textEditingController: websitelinkcontroller, + texttype: TextInputType.text, + hintText: "Enter your website link", + leadingIcon: + // const Icon(Icons.mail_outline), + Image.asset( + width: 22.w, + height: 17.h, + 'assets/images/png/globe.png', + ), + // validatorText: "Enter your business owner name", + validator: (value) { + if (value!.isEmpty) { + return 'Enter your website link'; + } + return null; + }, + inputFormatters: [ + // LengthLimitingTextInputFormatter(20), + RemoveEmojiInputFormatter(), + FilteringTextInputFormatter.allow( + RegExp('[a-zA-ZS0-9 ]')), ], ), - ), - ])), + // sizedBoxHeight(10.h), + sizedBoxHeight(15.h), + + text16400white('Google review link'), + sizedBoxHeight(10.h), + CustomTextFormField( + textEditingController: googlereviewlinkcontroller, + texttype: TextInputType.text, + hintText: "Enter your google review link", + leadingIcon: + // const Icon(Icons.mail_outline), + Image.asset( + width: 22.w, + height: 17.h, + 'assets/images/png/globe.png', + ), + // validatorText: "Enter your business owner name", + validator: (value) { + if (value!.isEmpty) { + return 'Enter your google review link'; + } + return null; + }, + inputFormatters: [ + // LengthLimitingTextInputFormatter(20), + RemoveEmojiInputFormatter(), + FilteringTextInputFormatter.allow( + RegExp('[a-zA-ZS0-9 ]')), + ], + ), + // sizedBoxHeight(10.h), + sizedBoxHeight(15.h), + + text16400white('Tags'), + sizedBoxHeight(10.h), + CustomTextFormField( + textEditingController: tagscontroller, + texttype: TextInputType.text, + hintText: "Enter your tags", + leadingIcon: + // const Icon(Icons.mail_outline), + Image.asset( + width: 22.w, + height: 17.h, + 'assets/images/png/hashtag.png', + ), + // validatorText: "Enter your business owner name", + validator: (value) { + if (value!.isEmpty) { + return 'Enter your tags'; + } + return null; + }, + inputFormatters: [ + // LengthLimitingTextInputFormatter(20), + RemoveEmojiInputFormatter(), + // FilteringTextInputFormatter.allow( + // RegExp('[a-zA-ZS0-9 ]')), + ], + ), + // sizedBoxHeight(10.h), + sizedBoxHeight(15.h), + + text16400white('Images upload'), + sizedBoxHeight(10.h), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + logoFile != "" && isImageAdded + ? Container( + width: 169, + height: 115, + decoration: ShapeDecoration( + gradient: LinearGradient( + begin: Alignment(0.98, -0.21), + end: Alignment(-0.98, 0.21), + colors: [ + Colors.white + .withOpacity(0.30000001192092896), + Colors.white + .withOpacity(0.2800000011920929) + ], + ), + shape: RoundedRectangleBorder( + side: BorderSide( + width: 0.50, color: Color(0xFF7E7E7E)), + borderRadius: BorderRadius.circular(10), + ), + ), + child: Stack( + children: [ + Image.file( + File(logoFile), + fit: BoxFit.cover, + width: double.infinity, + ), + Positioned( + // top: 0, + // left: 0, + right: 5, + bottom: 5, + child: GestureDetector( + onTap: () { + // Clear the list and show the upload button + logoFile = ""; + isImageAdded = false; + setState(() {}); + }, + child: Container( + width: 27, + height: 27, + decoration: ShapeDecoration( + color: Color(0xFF7E7E7E), + shape: RoundedRectangleBorder( + borderRadius: + BorderRadius.circular( + 5)), + ), + child: Icon( + Icons.delete_outline_outlined, + color: Colors.white, + ) + + // SvgPicture.asset( + // "assets/images/SVG/trash-2.svg", + // width: 17.w, + // height: 17.h, + // ), + )), + ), + ], + ), + ) + : GestureDetector( + onTap: () { + ImageUploadBottomSheet().showModal( + context, + false, + (result) { + var filenameresult = + extractFileName(result); + logoFile = result; + isImageAdded = true; + setState(() {}); + }, + ); + }, + child: Container( + width: 169, + height: 115, + decoration: ShapeDecoration( + gradient: LinearGradient( + begin: Alignment(0.98, -0.21), + end: Alignment(-0.98, 0.21), + colors: [ + Colors.white + .withOpacity(0.30000001192092896), + Colors.white + .withOpacity(0.2800000011920929) + ], + ), + shape: RoundedRectangleBorder( + side: BorderSide( + width: 0.50, + color: Color(0xFF7E7E7E)), + borderRadius: BorderRadius.circular(10), + ), + ), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Image.asset( + 'assets/images/png/onlycamera.png'), + sizedBoxHeight(5.h), + Text( + 'Upload business \nlogo', + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontSize: 14.sp, + fontFamily: 'Poppins', + fontWeight: FontWeight.w400, + ), + ), + ], + ), + ), + ), + bannerFile != "" && isbannerAdded + ? Container( + width: 169, + height: 115, + decoration: ShapeDecoration( + gradient: LinearGradient( + begin: Alignment(0.98, -0.21), + end: Alignment(-0.98, 0.21), + colors: [ + Colors.white + .withOpacity(0.30000001192092896), + Colors.white + .withOpacity(0.2800000011920929) + ], + ), + shape: RoundedRectangleBorder( + side: BorderSide( + width: 0.50, color: Color(0xFF7E7E7E)), + borderRadius: BorderRadius.circular(10), + ), + ), + child: Stack( + children: [ + Image.file( + File(bannerFile), + fit: BoxFit.cover, + width: double.infinity, + ), + Positioned( + // top: 0, + // left: 0, + right: 5, + bottom: 5, + child: GestureDetector( + onTap: () { + // Clear the list and show the upload button + bannerFile = ""; + isbannerAdded = false; + setState(() {}); + }, + child: Container( + width: 27, + height: 27, + decoration: ShapeDecoration( + color: Color(0xFF7E7E7E), + shape: RoundedRectangleBorder( + borderRadius: + BorderRadius.circular( + 5)), + ), + child: Icon( + Icons.delete_outline_outlined, + color: Colors.white, + ) + + // SvgPicture.asset( + // "assets/images/SVG/trash-2.svg", + // width: 17.w, + // height: 17.h, + // ), + )), + ), + ], + ), + ) + : GestureDetector( + onTap: () { + ImageUploadBottomSheet().showModal( + context, + false, + (result) { + var filenameresult = + extractFileName(result); + bannerFile = result; + isbannerAdded = true; + setState(() {}); + }, + ); + }, + child: Container( + width: 169, + height: 115, + decoration: ShapeDecoration( + gradient: LinearGradient( + begin: Alignment(0.98, -0.21), + end: Alignment(-0.98, 0.21), + colors: [ + Colors.white + .withOpacity(0.30000001192092896), + Colors.white + .withOpacity(0.2800000011920929) + ], + ), + shape: RoundedRectangleBorder( + side: BorderSide( + width: 0.50, + color: Color(0xFF7E7E7E)), + borderRadius: BorderRadius.circular(10), + ), + ), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Image.asset( + 'assets/images/png/onlycamera.png'), + sizedBoxHeight(5.h), + Text( + 'Upload banner \nimage', + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontSize: 14.sp, + fontFamily: 'Poppins', + fontWeight: FontWeight.w400, + ), + ), + ], + ), + ), + ) + ], + ), + sizedBoxHeight(40.h), + CustomButton( + text: 'Continue', + onPressed: () { + // Get.toNamed(RouteName.businessSelectgroupstep2); + _letusUnderstandDone(); + }) + ], + ), + ), + ]) ], )); } diff --git a/lib/onboarding/Signup/View/Business/View/tellusbusiness.dart b/lib/onboarding/Signup/View/Business/View/tellusbusiness.dart index a6a80e0..f38edae 100644 --- a/lib/onboarding/Signup/View/Business/View/tellusbusiness.dart +++ b/lib/onboarding/Signup/View/Business/View/tellusbusiness.dart @@ -135,190 +135,192 @@ class _TellusaboutBusinessState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: Color.fromARGB(255, 18, 32, 47), - body: Stack( - children: [ - Positioned(top: 90, left: -30, child: CommonBlurLeftSecond()), - Positioned(top: 300, right: -30, child: CommonBlurRightSecond()), - Positioned(top: 490, left: -30, child: CommonBlurLeftBlue()), - GlassmorphicContainer( - width: MediaQuery.of(context).size.width, - height: - // 500.h, - MediaQuery.of(context).size.height, - borderRadius: 2, - blur: 6, - alignment: Alignment.bottomLeft, - border: 2, - linearGradient: LinearGradient( - begin: Alignment.topCenter, - end: Alignment.bottomCenter, - colors: [ - Color(0XFF222935).withOpacity(0.60), - Color(0XFF222935).withOpacity(0.60), - Color(0XFF222935).withOpacity(0.60), - Color(0XFF222935).withOpacity(0.60), + body: Stack(children: [ + // Positioned(top: 90, left: -30, child: CommonBlurLeftSecond()), + // Positioned(top: 300, right: -30, child: CommonBlurRightSecond()), + // Positioned(top: 490, left: -30, child: CommonBlurLeftBlue()), + // GlassmorphicContainer( + // width: MediaQuery.of(context).size.width, + // height: + // // 500.h, + // MediaQuery.of(context).size.height, + // borderRadius: 2, + // blur: 6, + // alignment: Alignment.bottomLeft, + // border: 2, + // linearGradient: LinearGradient( + // begin: Alignment.topCenter, + // end: Alignment.bottomCenter, + // colors: [ + // Color(0XFF222935).withOpacity(0.60), + // Color(0XFF222935).withOpacity(0.60), + // Color(0XFF222935).withOpacity(0.60), + // Color(0XFF222935).withOpacity(0.60), - // Color.fromARGB(255, 18, 32, 47).withOpacity(0.50), - // Color.fromARGB(255, 18, 32, 47).withOpacity(0.50), - // Color.fromARGB(255, 18, 32, 47).withOpacity(0.50), - // Color.fromARGB(255, 18, 32, 47).withOpacity(0.50), - ], - ), - borderGradient: LinearGradient( - begin: Alignment.topCenter, - end: Alignment.bottomCenter, - colors: [ - // Color.fromARGB(255, 18, 32, 47).withOpacity(0.50), - // Color.fromARGB(255, 18, 32, 47).withOpacity(0.50), - Color(0XFF222935).withOpacity(0.60), + // // Color.fromARGB(255, 18, 32, 47).withOpacity(0.50), + // // Color.fromARGB(255, 18, 32, 47).withOpacity(0.50), + // // Color.fromARGB(255, 18, 32, 47).withOpacity(0.50), + // // Color.fromARGB(255, 18, 32, 47).withOpacity(0.50), + // ], + // ), + // borderGradient: LinearGradient( + // begin: Alignment.topCenter, + // end: Alignment.bottomCenter, + // colors: [ + // // Color.fromARGB(255, 18, 32, 47).withOpacity(0.50), + // // Color.fromARGB(255, 18, 32, 47).withOpacity(0.50), + // Color(0XFF222935).withOpacity(0.60), - Color(0XFF222935).withOpacity(0.60), - ], - ), - child: ListView(physics: ScrollPhysics(), children: [ - Padding( - padding: EdgeInsets.symmetric(horizontal: 16.w), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - // const Spacer(flex: 1), - sizedBoxHeight(60.h), - Center( - child: - text20400white('Tell us about your business')), - sizedBoxHeight(10.w), - Center( - child: Container( - width: 154, - decoration: ShapeDecoration( - shape: RoundedRectangleBorder( - side: BorderSide( - width: 1, - strokeAlign: BorderSide.strokeAlignCenter, - color: Color(0xFF858585), - ), - ), - )), - ), - sizedBoxHeight(40.h), - text16400white('Business owner name'), - sizedBoxHeight(10.h), - CustomTextFormField( - textEditingController: businessownerController, - texttype: TextInputType.text, - hintText: "Enter your business owner name", - leadingIcon: - // const Icon(Icons.mail_outline), - Image.asset( - width: 22.w, - height: 17.h, - 'assets/images/png/user.png', + // Color(0XFF222935).withOpacity(0.60), + // ], + // ), + // ), + + Container( + decoration: const BoxDecoration( + image: DecorationImage( + image: AssetImage("assets/images/png/Ellipse 1496.png"), + fit: BoxFit.fill)), + ), + + ListView(physics: ScrollPhysics(), children: [ + Padding( + padding: EdgeInsets.symmetric(horizontal: 16.w), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + // const Spacer(flex: 1), + sizedBoxHeight(60.h), + Center(child: text20400white('Tell us about your business')), + sizedBoxHeight(10.w), + Center( + child: Container( + width: 154, + decoration: ShapeDecoration( + shape: RoundedRectangleBorder( + side: BorderSide( + width: 1, + strokeAlign: BorderSide.strokeAlignCenter, + color: Color(0xFF858585), + ), ), - // validatorText: "Enter your business owner name", - validator: (value) { - if (value!.isEmpty) { - return 'Enter your business owner name'; - } - return null; - }, - inputFormatters: [ - // LengthLimitingTextInputFormatter(20), - RemoveEmojiInputFormatter(), - FilteringTextInputFormatter.allow( - RegExp('[a-zA-Z ]')) - ], - ), - sizedBoxHeight(10.h), - text16400white('Business name'), - sizedBoxHeight(10.h), - CustomTextFormField( - textEditingController: businessNameController, - texttype: TextInputType.text, - hintText: "Enter your business name", - leadingIcon: - // const Icon(Icons.mail_outline), - Image.asset( - width: 22.w, - height: 17.h, - 'assets/images/png/briefcase.png', - ), - // validatorText: "Enter your business name", - validator: (value) { - if (value!.isEmpty) { - return 'Enter your business name '; - } - return null; - }, - inputFormatters: [ - // LengthLimitingTextInputFormatter(20), - RemoveEmojiInputFormatter(), - FilteringTextInputFormatter.allow( - RegExp('[a-zA-Z ]')) - ], - ), - sizedBoxHeight(10.h), - text16400white('Business location'), - sizedBoxHeight(10.h), - CustomTextFormField( - textEditingController: businesslocationController, - texttype: TextInputType.text, - hintText: "Enter your business location", - leadingIcon: - // const Icon(Icons.mail_outline), - Image.asset( - width: 22.w, - height: 17.h, - 'assets/images/png/location.png', - ), - // validatorText: "Enter your business location", - validator: (value) { - if (value!.isEmpty) { - return 'Enter your business location '; - } - return null; - }, - inputFormatters: [ - // LengthLimitingTextInputFormatter(20), - RemoveEmojiInputFormatter(), - FilteringTextInputFormatter.allow( - RegExp('[a-zA-Z ]')) - ], - ), - sizedBoxHeight(10.h), - text16400white('Type of business'), - sizedBoxHeight(10.h), - CustomDropDownWidgetSignup( - header: 'Select type of business', - title: '', - listData: _businesslist, - onItemSelected: _onItemSelected, - leadingImage: - Image.asset('assets/images/png/briefcase.png'), - ), - - sizedBoxHeight(50.h), - CustomButton( - text: "Continue", - onPressed: () { - _tellUsBusinessDone(); - // if (_selectedbusinesstype.isNotEmpty) { - // Get.toNamed(RouteName.businessletusunderstandstep1); - - // // Get.to(() => BusinessPage()); - // } else { - // // Handle case where no selection is made - // utils.showToast('Please select an gender type'); - // } - }), - sizedBoxHeight(30.h), - // const Spacer( - // flex: 3, - // ) - ], - ), + )), ), - ])), - ], - )); + sizedBoxHeight(40.h), + text16400white('Business owner name'), + sizedBoxHeight(10.h), + CustomTextFormField( + textEditingController: businessownerController, + texttype: TextInputType.text, + hintText: "Enter your business owner name", + leadingIcon: + // const Icon(Icons.mail_outline), + Image.asset( + width: 22.w, + height: 17.h, + 'assets/images/png/user.png', + ), + // validatorText: "Enter your business owner name", + validator: (value) { + if (value!.isEmpty) { + return 'Enter your business owner name'; + } + return null; + }, + inputFormatters: [ + // LengthLimitingTextInputFormatter(20), + RemoveEmojiInputFormatter(), + FilteringTextInputFormatter.allow(RegExp('[a-zA-Z ]')) + ], + ), + sizedBoxHeight(10.h), + text16400white('Business name'), + sizedBoxHeight(10.h), + CustomTextFormField( + textEditingController: businessNameController, + texttype: TextInputType.text, + hintText: "Enter your business name", + leadingIcon: + // const Icon(Icons.mail_outline), + Image.asset( + width: 22.w, + height: 17.h, + 'assets/images/png/briefcase.png', + ), + // validatorText: "Enter your business name", + validator: (value) { + if (value!.isEmpty) { + return 'Enter your business name '; + } + return null; + }, + inputFormatters: [ + // LengthLimitingTextInputFormatter(20), + RemoveEmojiInputFormatter(), + FilteringTextInputFormatter.allow(RegExp('[a-zA-Z ]')) + ], + ), + sizedBoxHeight(10.h), + text16400white('Business location'), + sizedBoxHeight(10.h), + CustomTextFormField( + textEditingController: businesslocationController, + texttype: TextInputType.text, + hintText: "Enter your business location", + leadingIcon: + // const Icon(Icons.mail_outline), + Image.asset( + width: 22.w, + height: 17.h, + 'assets/images/png/location.png', + ), + // validatorText: "Enter your business location", + validator: (value) { + if (value!.isEmpty) { + return 'Enter your business location '; + } + return null; + }, + inputFormatters: [ + // LengthLimitingTextInputFormatter(20), + RemoveEmojiInputFormatter(), + FilteringTextInputFormatter.allow(RegExp('[a-zA-Z ]')) + ], + ), + sizedBoxHeight(10.h), + text16400white('Type of business'), + sizedBoxHeight(10.h), + CustomDropDownWidgetSignup( + header: 'Select type of business', + title: '', + listData: _businesslist, + onItemSelected: _onItemSelected, + leadingImage: + Image.asset('assets/images/png/briefcase.png'), + ), + + sizedBoxHeight(50.h), + CustomButton( + text: "Continue", + onPressed: () { + _tellUsBusinessDone(); + // if (_selectedbusinesstype.isNotEmpty) { + // Get.toNamed(RouteName.businessletusunderstandstep1); + + // // Get.to(() => BusinessPage()); + // } else { + // // Handle case where no selection is made + // utils.showToast('Please select an gender type'); + // } + }), + sizedBoxHeight(30.h), + // const Spacer( + // flex: 3, + // ) + ], + ), + ), + ]) + ])); } } diff --git a/lib/onboarding/Signup/View/Individual/step3Selectyourgroup.dart b/lib/onboarding/Signup/View/Individual/step3Selectyourgroup.dart index 4cdbf5b..1f7fae5 100644 --- a/lib/onboarding/Signup/View/Individual/step3Selectyourgroup.dart +++ b/lib/onboarding/Signup/View/Individual/step3Selectyourgroup.dart @@ -143,7 +143,8 @@ class _SelectIndividualGroupState extends State { Color(0XFF222935).withOpacity(0.60), ], ), - child: Padding( + child: + Padding( padding: EdgeInsets.symmetric( horizontal: 16.w, vertical: 50.h), child: Column( diff --git a/lib/onboarding/Signup/View/Individual/tellusindividual.dart b/lib/onboarding/Signup/View/Individual/tellusindividual.dart index 0b1c65f..76fab90 100644 --- a/lib/onboarding/Signup/View/Individual/tellusindividual.dart +++ b/lib/onboarding/Signup/View/Individual/tellusindividual.dart @@ -161,7 +161,7 @@ class _TellusaboutIndividualState extends State { utils.showToast("tell us done Successfully!"); Get.back(); // Get.toNamed(RouteName.individualprofilestep1); - Get.toNamed(RouteName.individualactivitystep2); + Get.toNamed(RouteName.individualactivitystep2); } else { Get.back(); return utils.showToast(data.message);