diff --git a/assets/images/png/appbararrowbutton.png b/assets/images/png/appbararrowbutton.png new file mode 100644 index 0000000..fa62d33 Binary files /dev/null and b/assets/images/png/appbararrowbutton.png differ diff --git a/assets/images/png/arrowdown.png b/assets/images/png/arrowdown.png new file mode 100644 index 0000000..9824e16 Binary files /dev/null and b/assets/images/png/arrowdown.png differ diff --git a/assets/images/png/arrowup.png b/assets/images/png/arrowup.png new file mode 100644 index 0000000..a5df1c3 Binary files /dev/null and b/assets/images/png/arrowup.png differ diff --git a/assets/images/png/blureffect.png b/assets/images/png/blureffect.png new file mode 100644 index 0000000..824f0c5 Binary files /dev/null and b/assets/images/png/blureffect.png differ diff --git a/assets/images/png/blurwhole.png b/assets/images/png/blurwhole.png new file mode 100644 index 0000000..0b6f0f7 Binary files /dev/null and b/assets/images/png/blurwhole.png differ diff --git a/assets/images/png/briefcase.png b/assets/images/png/briefcase.png new file mode 100644 index 0000000..4ecd73d Binary files /dev/null and b/assets/images/png/briefcase.png differ diff --git a/assets/images/png/camera.png b/assets/images/png/camera.png new file mode 100644 index 0000000..783ebb9 Binary files /dev/null and b/assets/images/png/camera.png differ diff --git a/assets/images/png/dateimage.png b/assets/images/png/dateimage.png new file mode 100644 index 0000000..44bba4b Binary files /dev/null and b/assets/images/png/dateimage.png differ diff --git a/assets/images/png/gendericon.png b/assets/images/png/gendericon.png new file mode 100644 index 0000000..37634f1 Binary files /dev/null and b/assets/images/png/gendericon.png differ diff --git a/assets/images/png/informationicon.png b/assets/images/png/informationicon.png new file mode 100644 index 0000000..4eaf58f Binary files /dev/null and b/assets/images/png/informationicon.png differ diff --git a/assets/images/png/location.png b/assets/images/png/location.png new file mode 100644 index 0000000..2b8bb45 Binary files /dev/null and b/assets/images/png/location.png differ diff --git a/assets/images/png/lock.png b/assets/images/png/lock.png new file mode 100644 index 0000000..23a8858 Binary files /dev/null and b/assets/images/png/lock.png differ diff --git a/assets/images/png/login1.png b/assets/images/png/login1.png new file mode 100644 index 0000000..72ef655 Binary files /dev/null and b/assets/images/png/login1.png differ diff --git a/assets/images/png/login2.png b/assets/images/png/login2.png new file mode 100644 index 0000000..c12ddf6 Binary files /dev/null and b/assets/images/png/login2.png differ diff --git a/assets/images/png/login3.png b/assets/images/png/login3.png new file mode 100644 index 0000000..3fb4ec1 Binary files /dev/null and b/assets/images/png/login3.png differ diff --git a/assets/images/png/login4.png b/assets/images/png/login4.png new file mode 100644 index 0000000..94ccb2f Binary files /dev/null and b/assets/images/png/login4.png differ diff --git a/assets/images/png/mail.png b/assets/images/png/mail.png new file mode 100644 index 0000000..e2c9d68 Binary files /dev/null and b/assets/images/png/mail.png differ diff --git a/assets/images/png/tellusprofileimage.png b/assets/images/png/tellusprofileimage.png new file mode 100644 index 0000000..4594212 Binary files /dev/null and b/assets/images/png/tellusprofileimage.png differ diff --git a/assets/images/png/user.png b/assets/images/png/user.png new file mode 100644 index 0000000..187649a Binary files /dev/null and b/assets/images/png/user.png differ diff --git a/assets/images/svg/loginpasswordclose.svg b/assets/images/svg/loginpasswordclose.svg new file mode 100644 index 0000000..ef2fa49 --- /dev/null +++ b/assets/images/svg/loginpasswordclose.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/images/svg/loginpasswordopen.svg b/assets/images/svg/loginpasswordopen.svg new file mode 100644 index 0000000..8da6623 --- /dev/null +++ b/assets/images/svg/loginpasswordopen.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/images/svg/mail.svg b/assets/images/svg/mail.svg new file mode 100644 index 0000000..74e472e --- /dev/null +++ b/assets/images/svg/mail.svg @@ -0,0 +1,4 @@ + + + + diff --git a/lib/Common/CommonWidget.dart b/lib/Common/CommonWidget.dart index 56b7533..af71d28 100644 --- a/lib/Common/CommonWidget.dart +++ b/lib/Common/CommonWidget.dart @@ -1,11 +1,9 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:flutter_svg/svg.dart'; -import 'package:get/get.dart'; -import 'package:path/path.dart' as path; import 'package:remove_emoji_input_formatter/remove_emoji_input_formatter.dart'; +import 'package:path/path.dart' as path; - +// ignore: must_be_immutable class TextInputField extends StatefulWidget { TextInputField({Key? key, this.hinttext, this.controller, this.validator}) : super(key: key); @@ -119,6 +117,10 @@ Widget MessageTextInputField( ); } + +String extractFileName(String filePath) { + return path.basename(filePath); + Widget commonDivider(){ return Container( height: 1.5.h, @@ -135,4 +137,5 @@ Widget commonDivider(){ ), ), ); + } \ No newline at end of file diff --git a/lib/Common/controller/profileimagecontroller.dart b/lib/Common/controller/profileimagecontroller.dart new file mode 100644 index 0000000..12bfa42 --- /dev/null +++ b/lib/Common/controller/profileimagecontroller.dart @@ -0,0 +1,125 @@ +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; +import 'package:image_picker/image_picker.dart'; +import 'package:image_cropper/image_cropper.dart'; + +class ProfileImageController extends GetxController { + RxString profilePicPath = "".obs; + //RxString fileNameFromPath = "".obs; + + // void getImage(ImageSource imgSource) async { + // final ImagePicker picker = ImagePicker(); + // print('profilePicPath $profilePicPath'); + // final XFile? pickedImg = await picker.pickImage(source: imgSource); + // if (pickedImg != null) { + // final CroppedFile? croppedImg = await ImageCropper().cropImage( + // sourcePath: pickedImg.path, + // aspectRatio: const CropAspectRatio(ratioX: 1, ratioY: 1), + // compressFormat: ImageCompressFormat.jpg, + // maxHeight: 512, + // maxWidth: 512, + // compressQuality: 100, + // cropStyle: CropStyle.circle, + // aspectRatioPresets: [ + // CropAspectRatioPreset.square, + // ], + // uiSettings: [ + // AndroidUiSettings( + // toolbarTitle: "Crop Image", + // toolbarColor: Get.theme.appBarTheme.backgroundColor, + // // toolbarWidgetColor: ColorConstants.kWhite, + // backgroundColor: Colors.black, + // activeControlsWidgetColor: Colors.red, + // // initAspectRatio: CropAspectRatioPreset.original, + // cropFrameColor: Colors.white, + // lockAspectRatio: false, + // ), + // IOSUiSettings( + // title: 'Crop Image', + // ), + // ]); + // if (croppedImg != null) { + // // profilPic = croppedImg.path; + // profilePicPath.value = croppedImg.path; + + // // Get.back(); + // // fileNameFromPath.value = extractFileName(croppedImg.path); + // } + // } + + // // if (pickedImg != null) { + // // final CroppedFile? croppedImg = await ImageCropper().cropImage( + // // sourcePath: pickedImg.path, + // // aspectRatio: const CropAspectRatio(ratioX: 1, ratioY: 1), + // // compressFormat: ImageCompressFormat.jpg, + // // maxHeight: 512, + // // maxWidth: 512, + // // compressQuality: 100, + // // cropStyle: CropStyle.circle, + // // aspectRatioPresets: [ + // // CropAspectRatioPreset.square, + // // ], + // // uiSettings: [ + // // AndroidUiSettings( + // // toolbarTitle: "Crop Image", + // // toolbarColor: Get.theme.appBarTheme.backgroundColor, + // // // toolbarWidgetColor: ColorConstants.kWhite, + // // backgroundColor: Colors.black, + // // activeControlsWidgetColor: Colors.red, + // // // initAspectRatio: CropAspectRatioPreset.original, + // // cropFrameColor: Colors.white, + // // lockAspectRatio: false, + // // ), + // // IOSUiSettings( + // // title: 'Crop Image', + // // ), + // // ]); + // // if (croppedImg != null) { + // // // profilPic = croppedImg.path; + // // profilePicPath.value = croppedImg.path; + + // // // Get.back(); + // // // fileNameFromPath.value = extractFileName(croppedImg.path); + // // } + // // } + // } + + void getImage(ImageSource imgSource) async { + final ImagePicker picker = ImagePicker(); + print('profilePicPath $profilePicPath'); + final XFile? pickedImg = await picker.pickImage(source: imgSource); + if (pickedImg != null) { + final CroppedFile? croppedImg = await ImageCropper().cropImage( + sourcePath: pickedImg.path, + aspectRatio: const CropAspectRatio(ratioX: 1, ratioY: 1), + compressFormat: ImageCompressFormat.jpg, + maxHeight: 512, + maxWidth: 512, + compressQuality: 100, + cropStyle: CropStyle.circle, + aspectRatioPresets: [ + CropAspectRatioPreset.square, + ], + uiSettings: [ + AndroidUiSettings( + toolbarTitle: "Crop Image", + toolbarColor: Get.theme.appBarTheme.backgroundColor, + backgroundColor: Colors.black, + activeControlsWidgetColor: Colors.red, + cropFrameColor: Colors.white, + cropGridColor: Colors.white, // Ensure this matches the theme + cropGridColumnCount: 2, // Add to make the grid lines prominent + cropGridRowCount: 2, // Add to make the grid lines prominent + lockAspectRatio: true, // Ensure the aspect ratio is locked + ), + IOSUiSettings( + title: 'Crop Image', + ), + ], + ); + if (croppedImg != null) { + profilePicPath.value = croppedImg.path; + } + } +} +} diff --git a/lib/Login/View/loginscreen.dart b/lib/Login/View/loginscreen.dart new file mode 100644 index 0000000..fef858a --- /dev/null +++ b/lib/Login/View/loginscreen.dart @@ -0,0 +1,499 @@ +import 'dart:ui'; + +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:get/get.dart'; +import 'package:glassmorphism/glassmorphism.dart'; +import 'package:regroup/Utils/Common/CustomNextButton.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/texts.dart'; +import 'package:regroup/resources/routes/route_name.dart'; +import 'package:remove_emoji_input_formatter/remove_emoji_input_formatter.dart'; + +class LoginScreen extends StatefulWidget { + const LoginScreen({super.key}); + + @override + State createState() => _LoginScreenState(); +} + +class _LoginScreenState extends State { + TextEditingController _email = TextEditingController(); + RxBool isObscured = true.obs; + TextEditingController _password = TextEditingController(); + // final GlobalKey _form = GlobalKey(); + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: Color.fromARGB(255, 18, 32, 47), + body: Stack( + children: [ + Positioned( + top: 210, + left: -30, + child: CommonBlurLeftSecond()), + Positioned( + top: 400, + right: -30, + child: CommonBlurRightSecond()), + Positioned( + top: 550, + left: -30, + child: CommonBlurLeftBlue()), + SingleChildScrollView( + child: GlassmorphicContainer( + width: MediaQuery.of(context).size.width, + height: + // 500.h, + MediaQuery.of(context).size.height, + borderRadius: 2, + blur: 10, + 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(0XFF222935).withOpacity(0.60), + ], + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + width: double.infinity, + height: 271.h, + decoration: BoxDecoration( + image: DecorationImage( + image: AssetImage( + "assets/images/png/blurwhole.png"), + fit: BoxFit.fill)), + child: Column( + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + Padding( + padding: EdgeInsets.only(top: 100.h), + child: Center( + child: SvgPicture.asset( + "assets/images/svg/onboarding2.svg", + width: 104.w, + height: 104.h, + ), + ), + ), + sizedBoxHeight(15.h), + Center( + child: text22400white('Find your community')), + ], + )), + Padding( + padding: EdgeInsets.symmetric(horizontal: 16.w), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + sizedBoxHeight(35.h), + text16400white('Email address'), + sizedBoxHeight(10.h), + // TextFormField( + // style: TextStyle( + // fontSize: 16.sp, color: Colors.white), + // validator: (value) { + // if (value == null || value.isEmpty) { + // return "Please enter email"; + // } + + // // Check if the entered value is a valid email address + // bool isEmailValid = RegExp( + // r'^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$') + // .hasMatch(value); + + // if (!isEmailValid) { + // return "Please enter valid email"; + // } + + // return null; + // }, + // inputFormatters: [ + // RemoveEmojiInputFormatter(), + // LengthLimitingTextInputFormatter(50) + // ], + // controller: _email, + // cursorColor: Colors.white, + // autovalidateMode: + // AutovalidateMode.onUserInteraction, + // decoration: InputDecoration( + // fillColor: Color(0xFFFFFFFF).withOpacity(0.10), + // filled: true, + // prefixIcon: Image.asset( + // 'assets/images/png/mail.png', + // width: 22.w, + // height: 17.h, + // ), + // // Icon( + // // Icons.mail_outline, + // // color: Colors.white, + // // ), + // hintText: 'Enter your email address', + // hintStyle: TextStyle( + // color: Colors.white, + // fontSize: 14.sp, + // fontWeight: FontWeight.w400, + // fontFamily: + // "Helvetica" // Default label color + // ), + // enabledBorder: OutlineInputBorder( + // borderSide: const BorderSide( + // color: Color(0xFF434A53), + // ), + // borderRadius: BorderRadius.all( + // Radius.circular(30.r), + // ), + // ), + // focusedBorder: OutlineInputBorder( + // borderSide: BorderSide( + // color: Color( + // 0xFF434A53), // Border color when focused + // ), + // borderRadius: BorderRadius.all( + // Radius.circular(30.r), + // ), + // ), + // errorBorder: OutlineInputBorder( + // borderRadius: BorderRadius.circular(30.r), + // borderSide: + // const BorderSide(color: Colors.red), + // ), + // focusedErrorBorder: OutlineInputBorder( + // // borderRadius: BorderRadius.circular(8.r), + // borderSide: BorderSide( + // color: Colors.red, + // ), + // borderRadius: BorderRadius.all( + // Radius.circular(30.r), + // ), + // ), + // ), + // ), + CustomTextFormField( + textEditingController: _email, + 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(20.h), + text16400white('Password'), + sizedBoxHeight(10.h), + // Obx(() { + // return TextFormField( + // style: TextStyle( + // fontSize: 16.sp, color: Colors.white), + // cursorColor: Colors.white, + // autovalidateMode: + // AutovalidateMode.onUserInteraction, + // obscureText: isObscured.value, + // controller: _password, + // decoration: InputDecoration( + // filled: true, + // fillColor: + // Color(0xFFFFFFFF).withOpacity(0.10), + // prefixIcon: Image.asset( + // 'assets/images/png/lock.png', + // width: 22.w, + // height: 17.h, + // ), + // // const Icon( + // // Icons.lock_outline, + // // color: Colors.white, + // // ), + // suffixIcon: Padding( + // padding: EdgeInsets.only(right: 5.w), + // child: IconButton( + // onPressed: () { + // isObscured.value = !isObscured.value; + // }, + // color: Color(0xFF959595), + // icon: isObscured.value + // // ? const Icon(Icons.visibility_off) + // // : const Icon(Icons.visibility)), + // ? SvgPicture.asset( + // "assets/images/svg/loginpasswordclose.svg") + // // const Icon(Icons.remove_red_eye) + // : SvgPicture.asset( + // 'assets/images/svg/loginpasswordopen.svg') + // // const Icon( + // // Icons.remove_red_eye_outlined) + // ), + // ), + // hintText: 'Enter your password', + // hintStyle: TextStyle( + // color: Colors.white, + // fontSize: 14.sp, + // fontWeight: FontWeight.w400, + // fontFamily: + // "Helvetica" // Default label color + // ), + // enabledBorder: OutlineInputBorder( + // borderSide: const BorderSide( + // color: Color(0xFF434A53), + // ), + // borderRadius: BorderRadius.all( + // Radius.circular(30.r), + // ), + // ), + // focusedBorder: OutlineInputBorder( + // borderSide: BorderSide( + // color: Color( + // 0xFF434A53), // Border color when focused + // ), + // borderRadius: BorderRadius.all( + // Radius.circular(30.r), + // ), + // ), + // errorBorder: OutlineInputBorder( + // borderRadius: BorderRadius.circular(30.r), + // borderSide: + // const BorderSide(color: Colors.red), + // ), + // focusedErrorBorder: OutlineInputBorder( + // // borderRadius: BorderRadius.circular(8.r), + // borderSide: BorderSide( + // color: Colors.red, + // ), + // borderRadius: BorderRadius.all( + // Radius.circular(30.r), + // ), + // ), + // ), + // validator: (val) { + // if (val == null || val.isEmpty) { + // return 'Please enter your password'; + // } + // return null; + // }, + // inputFormatters: [ + // RemoveEmojiInputFormatter(), + // LengthLimitingTextInputFormatter(50) + // ], + // ); + // }), + CustomTextFormFieldPassword( + isInputPassword: true, + textEditingController: _password, + hintText: 'Enter your password', + leadingIcon: Image.asset( + 'assets/images/png/lock.png', + width: 22.w, + height: 17.h, + ), + // const Icon(Icons.lock_outline), + validatorText: "Enter your password", + validator: (val) { + if (val == null || val.isEmpty) { + return 'Please enter your password'; + } + return null; + }, + inputFormatters: [ + LengthLimitingTextInputFormatter(20), + RemoveEmojiInputFormatter() + ], + ), + sizedBoxHeight(10.h), + Align( + alignment: Alignment.centerRight, + child: Padding( + padding: EdgeInsets.only(right: 6.w), + child: text14400white('Forgot password ?'), + )), + sizedBoxHeight(40.h), + CustomButton(text: "Login", onPressed: () {}), + sizedBoxHeight(20.h), + GestureDetector( + onTap: () { + Get.toNamed(RouteName.signupscreen); + }, + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + text14400white('Don’t have account ? '), + sizedBoxWidth(5.w), + text14700white('Sign up') + ], + ), + ), + sizedBoxHeight(30.h), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Container( + width: 160, + decoration: ShapeDecoration( + shape: RoundedRectangleBorder( + side: BorderSide( + width: 0.50, + strokeAlign: + BorderSide.strokeAlignCenter, + color: Color(0xFF434A53), + ), + ), + ), + ), + sizedBoxWidth(6.w), + text14400white('Or'), + sizedBoxWidth(6.w), + Container( + width: 160, + decoration: ShapeDecoration( + shape: RoundedRectangleBorder( + side: BorderSide( + width: 0.50, + strokeAlign: + BorderSide.strokeAlignCenter, + color: Color(0xFF434A53), + ), + ), + ), + ), + ], + ), + sizedBoxHeight(20.h), + Center( + child: SizedBox( + width: 220.w, + child: Row( + children: [ + Container( + width: 55, + height: 55, + decoration: ShapeDecoration( + gradient: LinearGradient( + begin: Alignment(0.71, -0.70), + end: Alignment(-0.71, 0.7), + colors: [ + Colors.white.withOpacity( + 0.07999999821186066), + Colors.white.withOpacity( + 0.12999999523162842) + ], + ), + shape: OvalBorder( + side: BorderSide( + width: 0.50, + color: Color(0xFF434A53)), + ), + image: DecorationImage( + image: AssetImage( + 'assets/images/png/login2.png'))), + ), + Spacer(), + Container( + width: 55, + height: 55, + decoration: ShapeDecoration( + gradient: LinearGradient( + begin: Alignment(0.71, -0.70), + end: Alignment(-0.71, 0.7), + colors: [ + Colors.white.withOpacity( + 0.07999999821186066), + Colors.white.withOpacity( + 0.12999999523162842) + ], + ), + shape: OvalBorder( + side: BorderSide( + width: 0.50, + color: Color(0xFF434A53)), + ), + image: DecorationImage( + image: AssetImage( + 'assets/images/png/login3.png'))), + ), + Spacer(), + Container( + width: 55, + height: 55, + decoration: ShapeDecoration( + gradient: LinearGradient( + begin: Alignment(0.71, -0.70), + end: Alignment(-0.71, 0.7), + colors: [ + Colors.white.withOpacity( + 0.07999999821186066), + Colors.white.withOpacity( + 0.12999999523162842) + ], + ), + shape: OvalBorder( + side: BorderSide( + width: 0.50, + color: Color(0xFF434A53)), + ), + image: DecorationImage( + image: AssetImage( + 'assets/images/png/login4.png'))), + ), + ], + ), + ), + ) + ], + ), + ) + ], + )), + ), + ], + )); + } +} diff --git a/lib/Utils/Common/CommonAppbar.dart b/lib/Utils/Common/CommonAppbar.dart index 332b794..d7eb293 100644 --- a/lib/Utils/Common/CommonAppbar.dart +++ b/lib/Utils/Common/CommonAppbar.dart @@ -1,4 +1,25 @@ -// ignore_for_file: non_constant_identifier_names, file_names, prefer_const_constructors +// // ignore_for_file: non_constant_identifier_names, file_names, prefer_const_constructors + +// import 'package:flutter/material.dart'; +// import 'package:flutter_screenutil/flutter_screenutil.dart'; +// import 'package:get/get.dart'; + +// class CommonAppbar extends StatelessWidget implements PreferredSizeWidget { +// @override +// Size get preferredSize => Size.fromHeight(90); +// const CommonAppbar({ +// Key? key, +// required this.titleTxt, +// this.showLeading = true, +// this.customBack, +// this.profileverifyback, +// this.backPageName = '', +// // this.height = 105 +// }) : super(key: key); + +// final String titleTxt; +// final bool? showLeading; +// final bool? customBack; // import 'package:flutter/material.dart'; // import 'package:flutter_screenutil/flutter_screenutil.dart'; diff --git a/lib/Utils/Common/CommonDropdown.dart b/lib/Utils/Common/CommonDropdown.dart index b03eecf..80ef97b 100644 --- a/lib/Utils/Common/CommonDropdown.dart +++ b/lib/Utils/Common/CommonDropdown.dart @@ -1,137 +1,133 @@ import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:remove_emoji_input_formatter/remove_emoji_input_formatter.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:get/get.dart'; +import 'package:regroup/Utils/Common/sized_box.dart'; -// ignore: must_be_immutable -class CommonDropdownfield extends StatefulWidget { - CommonDropdownfield( - {Key? key, - this.validator, - this.inputFormatters, - required this.hintText, - required this.validatorText, - this.textEditingController, - this.leadingIcon, - this.readonly = false, - this.textCapital = false, - this.isInputPassword = false, - this.outlineColor = Colors.black, - this.texttype, - this.onInput, - this.onTap, - this.maxlines = 1, - this.suffixIcon}) - : super(key: key); +class CustomDropDownWidgetSignup extends StatefulWidget { + const CustomDropDownWidgetSignup({ + Key? key, + required this.header, + required this.title, + required this.listData, + required this.onItemSelected, + required this.leadingImage, + }) : super(key: key); - dynamic validator; - final TextEditingController? textEditingController; - final String hintText; - final String validatorText; - final Widget? leadingIcon; - final bool isInputPassword; - final bool readonly; - final bool textCapital; - final dynamic inputFormatters; - final Color outlineColor; - final TextInputType? texttype; - Function(String)? onInput; - final VoidCallback? onTap; - final int maxlines; - final Widget? suffixIcon; + final String header; + final String title; + final List listData; + final Function(String) onItemSelected; + final Widget? leadingImage; @override - State createState() => _CommonDropdownfieldState(); + State createState() => + _CustomDropDownWidgetSignupState(); } -class _CommonDropdownfieldState extends State { - late bool obscureText; - var emojiFormatter = RemoveEmojiInputFormatter(); - +class _CustomDropDownWidgetSignupState + extends State { + RxBool onDropTap = false.obs; + RxString selectedValue = "".obs; @override - void initState() { - super.initState(); - obscureText = widget.isInputPassword; - } - Widget build(BuildContext context) { - List allFormatters = [emojiFormatter]; -if (widget.inputFormatters != null) { - allFormatters.addAll(widget.inputFormatters); -} - return TextFormField( - textCapitalization: widget.textCapital - ? TextCapitalization.characters - : TextCapitalization.none, - onTap: widget.onTap, - style: TextStyle( - fontSize: 16, - ), - readOnly: widget.readonly, - maxLines: widget.maxlines, - cursorColor: const Color(0xFF1B8DC9), - autovalidateMode: AutovalidateMode.onUserInteraction, - obscureText: obscureText, - controller: widget.textEditingController, - decoration: InputDecoration( - errorStyle: - TextStyle(fontSize: 13, color: Color.fromARGB(255, 245, 130, 122)), - contentPadding: EdgeInsets.symmetric(vertical: 10, horizontal: 20), - filled: true, - fillColor: Color(0xFFFFF3E4), - border: OutlineInputBorder( - borderRadius: BorderRadius.circular(5), - borderSide: - BorderSide(color: Color.fromRGBO(232, 198, 159, 0.50), width: 1), - ), - enabledBorder: OutlineInputBorder( - borderRadius: BorderRadius.circular(5), - borderSide: BorderSide(color: Color(0xFFDBDBDB), width: 1), - ), - focusedBorder: OutlineInputBorder( - borderRadius: BorderRadius.circular(5), - borderSide: BorderSide(color: Color(0xFF707070), width: 1), - ), - errorBorder: OutlineInputBorder( - borderRadius: BorderRadius.circular(5), - borderSide: const BorderSide(color: Colors.red, width: 1), - ), - focusedErrorBorder: OutlineInputBorder( - borderRadius: BorderRadius.circular(5), - borderSide: const BorderSide(color: Colors.red, width: 1), - ), - hintStyle: TextStyle( - color: Color(0xFF737373), - fontSize: 14, - fontWeight: FontWeight.w400, - fontFamily: "DM Sans"), - hintText: widget.hintText, - prefixIconColor: Color(0xFF737373), - prefixIcon: widget.leadingIcon == null - ? null - : Padding( - padding: const EdgeInsets.only(left: 14, right: 14), - child: widget.leadingIcon!, + return Obx( + () => Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + GestureDetector( + onTap: () { + onDropTap.value = !onDropTap.value; + }, + child: Container( + width: double.infinity, + height: 50.h, + padding: EdgeInsets.only( + top: 14.0, bottom: 14.0, right: 14.w, left: 12.w), + decoration: BoxDecoration( + color: Color(0xFFFFFFFF).withOpacity(0.10), + borderRadius: onDropTap.value + ? BorderRadius.vertical( + top: Radius.circular(30.r), + ) + : BorderRadius.circular(30.r), + border: Border.all(color: const Color(0xFF434A53)), ), - suffixIcon: widget.suffixIcon == null - ? null - : Padding( - padding: const EdgeInsets.only(left: 14, right: 14), - child: widget.suffixIcon!, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Row( + children: [ + // Image.asset( + // 'assets/images/png/user.png', + // ), + widget.leadingImage!, + SizedBox(width: 16.w), + Text( + selectedValue.value.isEmpty + ? widget.header + : selectedValue.value, + style: TextStyle( + color: Colors.white, + fontSize: 16.sp, + fontWeight: FontWeight.w400), + ), + ], + ), + onDropTap.value + ? Image.asset('assets/images/png/arrowup.png') + : Image.asset('assets/images/png/arrowdown.png'), + ], ), + ), + ), + if (onDropTap.value) + Container( + width: double.infinity, + decoration: BoxDecoration( + color: Color(0xFFFFFFFF).withOpacity(0.10), + borderRadius: BorderRadius.vertical( + bottom: Radius.circular(30.r), + ), + border: Border.all(color: const Color(0xFF434A53)), + ), + child: ListView.builder( + shrinkWrap: true, + itemCount: widget.listData.length, + itemBuilder: (context, index) { + return InkWell( + onTap: () { + selectedValue.value = widget.listData[index]; + onDropTap.value = !onDropTap.value; + widget.onItemSelected(selectedValue.value); + }, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.only( + left: 20.0, right: 20.0, top: 10.0, bottom: 10.0), + child: Text( + widget.listData[index], + style: TextStyle( + color: Colors.white, + fontSize: 16.sp, + fontWeight: FontWeight.w400, + fontFamily: 'Helvetica'), + ), + ), + // sizedBoxHeight(5.h), + if (index != widget.listData.length - 1) + Divider(thickness: 1, color: const Color(0xFF434A53)), + ], + ), + ); + }, + ), + ), + ], ), - keyboardType: widget.texttype, - validator: widget.validator ?? - (value) { - if (value == null || value.isEmpty) { - return "Empty value"; - } - return null; - }, - inputFormatters: allFormatters, - onChanged: (value) { - widget.onInput?.call(value); - }, ); } } diff --git a/lib/Utils/Common/CustomNextButton.dart b/lib/Utils/Common/CustomNextButton.dart index 7e6c678..c26dd9e 100644 --- a/lib/Utils/Common/CustomNextButton.dart +++ b/lib/Utils/Common/CustomNextButton.dart @@ -68,7 +68,12 @@ class CustomButton2 extends StatelessWidget { @override Widget build(BuildContext context) { return InkWell( - onTap: onPressed(), + onTap: + () { + onPressed(); + + }, + // () => onPressed, child: Container( width: double.infinity, height: 50.h, diff --git a/lib/Utils/Common/CustomTextformfield.dart b/lib/Utils/Common/CustomTextformfield.dart index e9d0740..73b4be9 100644 --- a/lib/Utils/Common/CustomTextformfield.dart +++ b/lib/Utils/Common/CustomTextformfield.dart @@ -3,7 +3,11 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; + +import 'package:flutter_svg/flutter_svg.dart'; + import 'package:glassmorphism/glassmorphism.dart'; + import 'package:remove_emoji_input_formatter/remove_emoji_input_formatter.dart'; class CustomTextFormField extends StatefulWidget { @@ -19,7 +23,15 @@ class CustomTextFormField extends StatefulWidget { this.value, this.readonly = false, this.enabled = true, + + this.textCapital = false, + this.isInputPassword = false, + this.outlineColor = Colors.black, + // this.bgColor = const Color(0xFFFFF3E4), + this.prefixIconColor = Colors.white, + this.maxlines = 1, + this.texttype, this.inputFormatters, this.onInput, @@ -40,6 +52,10 @@ class CustomTextFormField extends StatefulWidget { final int maxlines; final TextInputType? texttype; final dynamic inputFormatters; + + final Color outlineColor; + // final Color bgColor; + final Function(String)? onInput; final VoidCallback? onTap; final Widget? suffixIcon; diff --git a/lib/Utils/Common/ImageUpload.dart b/lib/Utils/Common/ImageUpload.dart index e909641..2f3bc7a 100644 --- a/lib/Utils/Common/ImageUpload.dart +++ b/lib/Utils/Common/ImageUpload.dart @@ -15,6 +15,7 @@ class ImageUploadBottomSheet { Function(String) onImagePicked, ) { return showModalBottomSheet( + backgroundColor: Color(0XFF222935), isScrollControlled: true, context: context, shape: RoundedRectangleBorder( @@ -35,7 +36,7 @@ class ImageUploadBottomSheet { Text( (showFile) ? 'Select Image/File' : 'Select Image', style: TextStyle( - color: const Color(0xff444444), + color: Colors.white, fontSize: 22.sp, ), ), @@ -58,7 +59,7 @@ class ImageUploadBottomSheet { children: [ CircleAvatar( radius: 27.r, - backgroundColor: const Color(0xFFE8C69F80), + backgroundColor: Color(0xFF858585), child: Icon( Icons.camera_alt_outlined, size: 30.sp, @@ -72,7 +73,7 @@ class ImageUploadBottomSheet { 'Camera', style: TextStyle( fontSize: 13.sp, - color: const Color(0xff444444), + color: Colors.white, ), ) ], @@ -90,7 +91,7 @@ class ImageUploadBottomSheet { children: [ CircleAvatar( radius: 27.r, - backgroundColor: const Color(0xFFE8C69F80), + backgroundColor: Color(0xFF858585), child: Icon( Icons.image_outlined, size: 30.sp, @@ -104,7 +105,7 @@ class ImageUploadBottomSheet { 'Gallery', style: TextStyle( fontSize: 13.sp, - color: const Color(0xff444444), + color: Colors.white, ), ) ], @@ -121,7 +122,7 @@ class ImageUploadBottomSheet { children: [ CircleAvatar( radius: 27.r, - backgroundColor: const Color(0xFFE8C69F80), + backgroundColor: Color(0xFF858585), child: Icon( Icons.file_copy_outlined, size: 30.sp, @@ -135,7 +136,7 @@ class ImageUploadBottomSheet { 'File', style: TextStyle( fontSize: 13.sp, - color: const Color(0xff444444), + color: Colors.white, fontFamily: 'Poppins'), ) ], @@ -160,7 +161,7 @@ class ImageUploadBottomSheet { children: [ CircleAvatar( radius: 27.r, - backgroundColor: const Color(0xFFE8C69F80), + backgroundColor: Color(0xFF858585), child: Icon( Icons.camera_alt_outlined, size: 30.sp, @@ -174,7 +175,7 @@ class ImageUploadBottomSheet { 'Camera', style: TextStyle( fontSize: 13.sp, - color: const Color(0xff444444), + color: Colors.white, ), ) ], @@ -192,7 +193,7 @@ class ImageUploadBottomSheet { children: [ CircleAvatar( radius: 27.r, - backgroundColor: const Color(0xFFE8C69F80), + backgroundColor: Color(0xFF858585), child: Icon( Icons.image_outlined, size: 30.sp, @@ -206,7 +207,7 @@ class ImageUploadBottomSheet { 'Gallery', style: TextStyle( fontSize: 13.sp, - color: const Color(0xff444444), + color: Colors.white, ), ) ], diff --git a/lib/Utils/Common/blureffect.dart b/lib/Utils/Common/blureffect.dart index 6510f93..65bee14 100644 --- a/lib/Utils/Common/blureffect.dart +++ b/lib/Utils/Common/blureffect.dart @@ -121,3 +121,81 @@ class CommonBlurRight extends StatelessWidget { ); } } + +class CommonBlurLeftSecond extends StatelessWidget { + const CommonBlurLeftSecond({ + super.key, + }); + + @override + Widget build(BuildContext context) { + return Container( + height: 150, + width: 150, + decoration: BoxDecoration( + shape: BoxShape.circle, + color: Color(0x4CD90B2E).withOpacity(0.5), + ), + child: BackdropFilter( + filter: ImageFilter.blur(sigmaX: 30, sigmaY: 30), + child: Container( + height: 200, + width: 200, + color: Colors.transparent, + ), + ), + ); + } +} + +class CommonBlurRightSecond extends StatelessWidget { + const CommonBlurRightSecond({ + super.key, + }); + + @override + Widget build(BuildContext context) { + return Container( + height: 160, + width: 160, + decoration: BoxDecoration( + shape: BoxShape.circle, + color: Color(0x4CD90B2E).withOpacity(0.5), + ), + child: BackdropFilter( + filter: ImageFilter.blur(sigmaX: 30, sigmaY: 30), + child: Container( + height: 200, + width: 200, + color: Colors.transparent, + ), + ), + ); + } +} + +class CommonBlurLeftBlue extends StatelessWidget { + const CommonBlurLeftBlue({ + super.key, + }); + + @override + Widget build(BuildContext context) { + return Container( + height: 150, + width: 180, + decoration: BoxDecoration( + shape: BoxShape.circle, + color: Color(0xFF009DAB).withOpacity(0.50), + ), + child: BackdropFilter( + filter: ImageFilter.blur(sigmaX: 30, sigmaY: 30), + child: Container( + height: 200, + width: 200, + color: Colors.transparent, + ), + ), + ); + } +} diff --git a/lib/Utils/texts.dart b/lib/Utils/texts.dart index bc9129e..20beea2 100644 --- a/lib/Utils/texts.dart +++ b/lib/Utils/texts.dart @@ -19,6 +19,55 @@ Widget text22400white(String text) { color: AppColors.white, fontWeight: FontWeight.w400, fontFamily: 'Helvetica'), + + ); +} + +Widget text20400white(String text) { + return Text( + text, + style: TextStyle( + fontSize: 20.sp, + color: AppColors.white, + fontWeight: FontWeight.w400, + fontFamily: 'Helvetica'), + ); +} + +Widget text16400white(String text) { + return Text( + text, + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 16.sp, + color: AppColors.white, + fontWeight: FontWeight.w400, + fontFamily: 'Helvetica'), + ); +} + +Widget text14400white(String text) { + return Text( + text, + // textAlign: TextAlign.center, + style: TextStyle( + fontSize: 14.sp, + color: AppColors.white, + fontWeight: FontWeight.w400, + fontFamily: 'Helvetica'), + ); +} + +Widget text14700white(String text) { + return Text( + text, + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 14.sp, + color: AppColors.white, + fontWeight: FontWeight.w700, + fontFamily: 'Helvetica'), + ); } diff --git a/lib/onboarding/Signup/View/Business/tellusbusiness.dart b/lib/onboarding/Signup/View/Business/tellusbusiness.dart new file mode 100644 index 0000000..042b9a1 --- /dev/null +++ b/lib/onboarding/Signup/View/Business/tellusbusiness.dart @@ -0,0 +1,233 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:glassmorphism/glassmorphism.dart'; +import 'package:regroup/Utils/Common/CommonDropdown.dart'; +import 'package:regroup/Utils/Common/CustomNextButton.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:remove_emoji_input_formatter/remove_emoji_input_formatter.dart'; + +class TellusaboutBusiness extends StatefulWidget { + const TellusaboutBusiness({super.key}); + + @override + State createState() => _TellusaboutBusinessState(); +} + +class _TellusaboutBusinessState extends State { + TextEditingController businessownerController = TextEditingController(); + TextEditingController businessNameController = TextEditingController(); + TextEditingController businesslocation = TextEditingController(); + + final List _businesslist = [ + 'Retail', + 'Hospitality', + 'Event provider', + 'Coaching services', + 'Recruitment & Scouting', + 'Healthcare & Wellbeing', + 'Other', + ]; + + String _selectedbusinesstype = ''; + + void _onItemSelected(String value) { + setState(() { + _selectedbusinesstype = value; + }); + } + + @override + 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: 10, + 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(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', + ), + 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(20.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(20.h), + text16400white('Business location'), + sizedBoxHeight(10.h), + CustomTextFormField( + textEditingController: businessNameController, + 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(20.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: () { + if (_selectedbusinesstype.isNotEmpty) { + // Get.toNamed(page) + + // 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/tellusindividual.dart b/lib/onboarding/Signup/View/Individual/tellusindividual.dart new file mode 100644 index 0000000..810436d --- /dev/null +++ b/lib/onboarding/Signup/View/Individual/tellusindividual.dart @@ -0,0 +1,429 @@ +import 'dart:io'; + +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:get/get.dart'; +import 'package:glassmorphism/glassmorphism.dart'; +import 'package:regroup/Common/CommonWidget.dart'; +import 'package:regroup/Common/controller/profileimagecontroller.dart'; +import 'package:regroup/Utils/Common/CommonDropdown.dart'; +import 'package:regroup/Utils/Common/CustomNextButton.dart'; +import 'package:regroup/Utils/Common/CustomTextformfield.dart'; +import 'package:regroup/Utils/Common/ImageUpload.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:remove_emoji_input_formatter/remove_emoji_input_formatter.dart'; + +class TellusaboutIndividual extends StatefulWidget { + const TellusaboutIndividual({super.key}); + + @override + State createState() => _TellusaboutIndividualState(); +} + +class _TellusaboutIndividualState extends State { + TextEditingController fullNameController = TextEditingController(); + TextEditingController userNameController = TextEditingController(); + TextEditingController datecontroller = TextEditingController(); + DateTime? _selectedDate; + final photographController = TextEditingController(); + + final ProfileImageController editProfileImage = + Get.put(ProfileImageController()); + + Future _selectDate(BuildContext context) async { + DateTime yesterday = DateTime.now().subtract(Duration(days: 1)); + DateTime eighteenYearsAgo = + DateTime.now().subtract(const Duration(days: 365 * 18)); + final DateTime? pickedDate = await showDatePicker( + context: context, + initialDate: yesterday, + firstDate: DateTime(1950), + lastDate: DateTime(2026), + builder: (BuildContext context, Widget? child) { + return Theme( + data: ThemeData.light().copyWith( + colorScheme: ColorScheme.dark( + primary: + Color(0XFF222935).withOpacity(0.60), // Change primary color + onPrimary: + // Color(0XFF222935).withOpacity(0.60), // Change primary color + Colors.white + + // Colors.white, // Change text color + ), + textButtonTheme: TextButtonThemeData( + style: TextButton.styleFrom( + foregroundColor: Colors.white, // Change button text color + ), + ), + dialogBackgroundColor: + // Color(0xFF434A53), + Color(0XFF222935).withOpacity(0.60), // Change primary color + + // // Change dialog background color + ), + child: child!, + ); + }, + ); + if (pickedDate != null) { + // if (pickedDate.isBefore(eighteenYearsAgo)) { + + setState(() { + // selectedDate.value = pickedDate; + _selectedDate = pickedDate; + datecontroller.text = + "${_selectedDate!.day.toString().padLeft(2, '0')}-${_selectedDate!.month.toString().padLeft(2, '0')}-${_selectedDate!.year.toString().padLeft(2, '0')}"; + }); + // } + // else { + // showDialog( + // context: context, + // builder: (context) { + // return AlertDialog( + // title: const Text("Age Restriction"), + // content: const Text("Sorry, you must be above 18 years age"), + // actions: [ + // TextButton( + // onPressed: () { + // Navigator.of(context).pop(); + // }, + // child: const Text("OK"), + // ), + // ], + // ); + // }, + // ); + // } + } + } + + final List _gender = ['Male', 'Female', 'Prefer not to say', 'Other']; + + String _selectedgendertype = ''; + + void _onItemSelected(String value) { + setState(() { + _selectedgendertype = value; + }); + } + + @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: 510, left: -30, child: CommonBlurLeftBlue()), + GlassmorphicContainer( + width: MediaQuery.of(context).size.width, + height: + // 500.h, + MediaQuery.of(context).size.height, + borderRadius: 2, + blur: 10, + 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(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(50.h), + Center(child: text20400white('Tell us about yourself')), + sizedBoxHeight(10.w), + Center( + child: Container( + width: 154, + decoration: ShapeDecoration( + shape: RoundedRectangleBorder( + side: BorderSide( + width: 1, + strokeAlign: BorderSide.strokeAlignCenter, + color: Color(0xFF858585), + ), + ), + )), + ), + sizedBoxHeight(20.h), + GestureDetector( + onTap: () { + ImageUploadBottomSheet().showModal( + context, + false, + (result) { + print("File path is $result"); + editProfileImage.profilePicPath.value = result; + var filenameresult = extractFileName(result); + print("File name is $filenameresult"); + photographController.text = filenameresult; + }, + ); + }, + child: Center( + child: Column( + children: [ + Stack( + alignment: Alignment.center, + children: [ + // Outer circle + Container( + width: 139.w, + height: 139.h, + decoration: BoxDecoration( + shape: BoxShape.circle, + color: Colors.transparent, + border: Border.all( + color: Color(0XFFD90B2E) + .withOpacity(0.50), + width: 2), + ), + ), + // Middle circle + Container( + width: 119.w, + height: 119.h, + decoration: BoxDecoration( + shape: BoxShape.circle, + color: Colors.transparent, + border: Border.all( + color: Color(0XFFD90B2E) + .withOpacity(0.50), + width: 2), + ), + ), + // Inner circle + Container( + decoration: BoxDecoration( + shape: BoxShape.circle, + color: Colors.transparent, + border: Border.all( + color: Color(0XFFD90B2E) + .withOpacity(0.50), + width: 2), + ), + child: Obx(() => + // editProfileImage + // .profilePicPath.value != + // '' + // ? + editProfileImage.profilePicPath + .value != + '' + ? ClipOval( + child: SizedBox.fromSize( + size: Size.fromRadius( + 50.r), + child: Image( + image: FileImage( + File( + editProfileImage + .profilePicPath + .value, + ), + ), + fit: BoxFit.cover, + width: 200.w, + height: 200.h, + ), + ), + ) + : Image.asset( + "assets/images/png/camera.png") + // : Image.asset( + // "assets/images/png/camera.png") + )), + // Main button + ], + ), + const SizedBox(height: 9), + text16400white('Add profile picture') + ], + )), + ), + sizedBoxHeight(20.h), + text16400white('Full name'), + sizedBoxHeight(10.h), + CustomTextFormField( + textEditingController: fullNameController, + texttype: TextInputType.text, + hintText: "Enter your full name", + leadingIcon: + // const Icon(Icons.mail_outline), + Image.asset( + width: 22.w, + height: 17.h, + 'assets/images/png/user.png', + ), + validatorText: "Enter your full name", + validator: (value) { + if (value!.isEmpty) { + return 'Enter your full name '; + } + return null; + }, + inputFormatters: [ + // LengthLimitingTextInputFormatter(20), + RemoveEmojiInputFormatter(), + FilteringTextInputFormatter.allow( + RegExp('[a-zA-Z ]')) + ], + ), + sizedBoxHeight(20.h), + text16400white('User name'), + sizedBoxHeight(10.h), + CustomTextFormField( + textEditingController: userNameController, + texttype: TextInputType.text, + hintText: "Enter your user name", + leadingIcon: + // const Icon(Icons.mail_outline), + Image.asset( + width: 22.w, + height: 17.h, + 'assets/images/png/user.png', + ), + validatorText: "Enter your user name", + validator: (value) { + if (value!.isEmpty) { + return 'Enter your user name '; + } + return null; + }, + inputFormatters: [ + // LengthLimitingTextInputFormatter(20), + RemoveEmojiInputFormatter(), + FilteringTextInputFormatter.allow( + RegExp('[a-zA-Z ]')) + ], + ), + sizedBoxHeight(20.h), + text16400white('Date of birth'), + sizedBoxHeight(10.h), + CustomTextFormField( + textEditingController: datecontroller, + readonly: true, + onTap: () { + _selectDate(context); + }, + // texttype: TextInputType.text, + hintText: "Enter your date of birth", + leadingIcon: + // const Icon(Icons.mail_outline), + Image.asset( + width: 22.w, + height: 17.h, + 'assets/images/png/dateimage.png', + ), + validatorText: "Enter date of birth", + validator: (value) { + if (value!.isEmpty) { + return 'Enter your date of birth'; + } + return null; + }, + ), + sizedBoxHeight(20.h), + text16400white('Gender'), + sizedBoxHeight(10.h), + CustomDropDownWidgetSignup( + header: 'Select gender', + title: '', + listData: _gender, + onItemSelected: _onItemSelected, + leadingImage: + Image.asset('assets/images/png/gendericon.png'), + ), + sizedBoxHeight(20.h), + Row( + children: [ + text16400white('Location'), + sizedBoxWidth(5.w), + Image.asset('assets/images/png/informationicon.png') + ], + ), + sizedBoxHeight(10.h), + CustomTextFormField( + textEditingController: userNameController, + texttype: TextInputType.text, + hintText: "Enter your location", + leadingIcon: + // const Icon(Icons.mail_outline), + Image.asset( + width: 22.w, + height: 17.h, + 'assets/images/png/location.png', + ), + validatorText: "Enter your location", + validator: (value) { + if (value!.isEmpty) { + return 'Enter your location '; + } + return null; + }, + inputFormatters: [ + // LengthLimitingTextInputFormatter(20), + RemoveEmojiInputFormatter(), + FilteringTextInputFormatter.allow( + RegExp('[a-zA-Z ]')) + ], + ), + sizedBoxHeight(30.h), + CustomButton( + text: "Continue", + onPressed: () { + if (_selectedgendertype.isNotEmpty) { + // Get.toNamed(page) + + // 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/signupscreen.dart b/lib/onboarding/Signup/View/signupscreen.dart new file mode 100644 index 0000000..3db6e83 --- /dev/null +++ b/lib/onboarding/Signup/View/signupscreen.dart @@ -0,0 +1,440 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:get/get.dart'; +import 'package:glassmorphism/glassmorphism.dart'; +import 'package:regroup/Utils/Common/CommonDropdown.dart'; +import 'package:regroup/Utils/Common/CustomNextButton.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'; + +class SignupScreen extends StatefulWidget { + const SignupScreen({super.key}); + + @override + State createState() => _SignupScreenState(); +} + +class _SignupScreenState extends State { + TextEditingController emailidcontroller = TextEditingController(); + TextEditingController _password = TextEditingController(); + TextEditingController confirmpasscontroller = TextEditingController(); + + final List _dropdownProductItems = [ + 'Individual', + 'Business', + ]; + + String _selectedAccountType = ''; + + void _onItemSelected(String value) { + setState(() { + _selectedAccountType = value; + }); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: Color.fromARGB(255, 18, 32, 47), + body: Stack( + children: [ + Positioned( + top: 210, + left: -30, + child: CommonBlurLeftSecond()), + Positioned( + top: 400, + right: -30, + child: CommonBlurRightSecond()), + Positioned( + top: 550, + left: -30, + child: CommonBlurLeftBlue()), + GlassmorphicContainer( + width: MediaQuery.of(context).size.width, + height: + // 500.h, + MediaQuery.of(context).size.height, + borderRadius: 2, + blur: 10, + 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(0XFF222935).withOpacity(0.60), + ], + ), + child: ListView(physics: ScrollPhysics(), children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + width: double.infinity, + height: 221.h, + decoration: BoxDecoration( + // color: Colors.red, + image: DecorationImage( + image: AssetImage( + "assets/images/png/blurwhole.png"), + fit: BoxFit.fill)), + child: Column( + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + Padding( + padding: EdgeInsets.only(top: 150.h), + child: Center( + child: text22400white('Create account')), + ), + ], + )), + Padding( + padding: EdgeInsets.symmetric(horizontal: 16.w), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + text16400white('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(20.h), + text16400white('Password'), + sizedBoxHeight(10.h), + CustomTextFormFieldPassword( + isInputPassword: true, + textEditingController: _password, + hintText: 'Enter your password', + leadingIcon: Image.asset( + 'assets/images/png/lock.png', + width: 22.w, + height: 17.h, + ), + // const Icon(Icons.lock_outline), + validatorText: "Enter your password", + validator: (val) { + if (val == null || val.isEmpty) { + return 'Please enter your password'; + } + return null; + }, + inputFormatters: [ + LengthLimitingTextInputFormatter(20), + RemoveEmojiInputFormatter() + ], + ), + sizedBoxHeight(20.h), + text16400white('Confirm password'), + sizedBoxHeight(10.h), + CustomTextFormField( + isInputPassword: true, + textEditingController: confirmpasscontroller, + hintText: "Enter your password", + leadingIcon: Image.asset( + 'assets/images/png/lock.png', + width: 22.w, + height: 17.h, + ), + // const Icon(Icons.lock_outline), + validatorText: "Enter your password", + validator: (val) { + if (val == null || val.isEmpty) { + return 'Please enter your password'; + } + if (val != _password.text) { + return 'Password does not match'; + } + return null; + }, + inputFormatters: [ + LengthLimitingTextInputFormatter(20), + RemoveEmojiInputFormatter() + ], + ), + sizedBoxHeight(20.h), + Row( + children: [ + text16400white('Account type'), + sizedBoxWidth(5.w), + Image.asset( + 'assets/images/png/informationicon.png') + ], + ), + sizedBoxHeight(10.h), + CustomDropDownWidgetSignup( + header: 'Select account type', + title: '', + listData: _dropdownProductItems, + onItemSelected: _onItemSelected, + leadingImage: + Image.asset( + 'assets/images/png/user.png', + ), + ), + sizedBoxHeight(30.h), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: 320.w, + height: 42.h, + child: Text.rich( + TextSpan( + children: [ + TextSpan( + text: + 'By signing up to ReGroup you agree to our ', + style: TextStyle( + color: Color(0xCCFCFCFC), + fontSize: 14.sp, + fontFamily: 'Helvetica', + fontWeight: FontWeight.w400, + ), + ), + TextSpan( + text: 'Terms and Conditions', + style: TextStyle( + color: Color(0xCCFCFCFC), + fontSize: 14.sp, + fontFamily: 'Helvetica', + fontWeight: FontWeight.w700, + decoration: + TextDecoration.underline, + decorationColor: Color(0xffFCFCFC) + .withOpacity(0.80), + ), + ), + TextSpan( + text: ' and ', + style: TextStyle( + color: Color(0xCCFCFCFC), + fontSize: 14.sp, + fontFamily: 'Helvetica', + fontWeight: FontWeight.w400, + ), + ), + TextSpan( + text: 'Privacy Policy', + style: TextStyle( + color: Color(0xCCFCFCFC), + fontSize: 14.sp, + fontFamily: 'Helvetica', + fontWeight: FontWeight.w700, + decoration: + TextDecoration.underline, + decorationColor: Color(0xffFCFCFC) + .withOpacity(0.80), + ), + ), + ], + ), + textAlign: TextAlign.center, + ), + ), + ], + ), + sizedBoxHeight(20.h), + CustomButton( + text: "Continue", + onPressed: () { + if (_selectedAccountType == 'Individual') { + // Get.to(() => IndividualPage()); + print('individual selected'); + Get.toNamed(RouteName.verifyusercreen, + arguments: _selectedAccountType + ); + } else if (_selectedAccountType == + 'Business') { + print('business selected'); + Get.toNamed(RouteName.verifyusercreen, + arguments: _selectedAccountType + ); + + // Get.to(() => BusinessPage()); + } else { + // Handle case where no selection is made + utils.showToast( + 'Please select an account type'); + } + }), + sizedBoxHeight(20.h), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Container( + width: 160, + decoration: ShapeDecoration( + shape: RoundedRectangleBorder( + side: BorderSide( + width: 0.50, + strokeAlign: + BorderSide.strokeAlignCenter, + color: Color(0xFF434A53), + ), + ), + ), + ), + sizedBoxWidth(6.w), + text14400white('Or'), + sizedBoxWidth(6.w), + Container( + width: 160, + decoration: ShapeDecoration( + shape: RoundedRectangleBorder( + side: BorderSide( + width: 0.50, + strokeAlign: + BorderSide.strokeAlignCenter, + color: Color(0xFF434A53), + ), + ), + ), + ), + ], + ), + sizedBoxHeight(20.h), + Center( + child: SizedBox( + width: 220.w, + child: Row( + children: [ + Container( + width: 55, + height: 55, + decoration: ShapeDecoration( + gradient: LinearGradient( + begin: Alignment(0.71, -0.70), + end: Alignment(-0.71, 0.7), + colors: [ + Colors.white.withOpacity( + 0.07999999821186066), + Colors.white.withOpacity( + 0.12999999523162842) + ], + ), + shape: OvalBorder( + side: BorderSide( + width: 0.50, + color: Color(0xFF434A53)), + ), + image: DecorationImage( + image: AssetImage( + 'assets/images/png/login2.png'))), + ), + Spacer(), + Container( + width: 55, + height: 55, + decoration: ShapeDecoration( + gradient: LinearGradient( + begin: Alignment(0.71, -0.70), + end: Alignment(-0.71, 0.7), + colors: [ + Colors.white.withOpacity( + 0.07999999821186066), + Colors.white.withOpacity( + 0.12999999523162842) + ], + ), + shape: OvalBorder( + side: BorderSide( + width: 0.50, + color: Color(0xFF434A53)), + ), + image: DecorationImage( + image: AssetImage( + 'assets/images/png/login3.png'))), + ), + Spacer(), + Container( + width: 55, + height: 55, + decoration: ShapeDecoration( + gradient: LinearGradient( + begin: Alignment(0.71, -0.70), + end: Alignment(-0.71, 0.7), + colors: [ + Colors.white.withOpacity( + 0.07999999821186066), + Colors.white.withOpacity( + 0.12999999523162842) + ], + ), + shape: OvalBorder( + side: BorderSide( + width: 0.50, + color: Color(0xFF434A53)), + ), + image: DecorationImage( + image: AssetImage( + 'assets/images/png/login4.png'))), + ), + ], + ), + ), + ), + sizedBoxHeight(20.h), + ], + ), + ) + ], + ), + ])), + ], + )); + } +} diff --git a/lib/onboarding/Signup/View/verifyuser.dart b/lib/onboarding/Signup/View/verifyuser.dart new file mode 100644 index 0000000..7f51a2e --- /dev/null +++ b/lib/onboarding/Signup/View/verifyuser.dart @@ -0,0 +1,171 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:get/get.dart'; +import 'package:glassmorphism/glassmorphism.dart'; +import 'package:pin_code_fields/pin_code_fields.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/sized_box.dart'; +import 'package:regroup/Utils/dialogs.dart'; +import 'package:regroup/Utils/texts.dart'; +import 'package:regroup/resources/routes/route_name.dart'; + +class VerifyuserScreenState extends StatefulWidget { + const VerifyuserScreenState({super.key}); + + @override + State createState() => _VerifyuserScreenStateState(); +} + +class _VerifyuserScreenStateState extends State { + String accounttype = Get.arguments; + TextEditingController? pincode = TextEditingController(); + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: Color.fromARGB(255, 18, 32, 47), + // appBar: CommonAppbar( + // titleTxt: '', + // ), + body: Stack( + children: [ + // CommonBlurLeftSecond(), + Positioned(top: 150, right: -30, child: CommonBlurRightSecond()), + Positioned(top: 350, left: -30, child: CommonBlurLeftBlue()), + GlassmorphicContainer( + width: MediaQuery.of(context).size.width, + height: + // 500.h, + MediaQuery.of(context).size.height, + borderRadius: 2, + blur: 10, + 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(0XFF222935).withOpacity(0.60), + ], + ), + child: Padding( + padding: EdgeInsets.symmetric(horizontal: 16.w), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + text22400white('Check your email'), + sizedBoxHeight(10.h), + text14400white( + 'Enter the verification code that we sent to loremipsum@gmail.com'), + sizedBoxHeight(40.h), + text16400white('Enter code'), + sizedBoxHeight(20.h), + 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: pincode, + 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, + ), + const Spacer( + flex: 3, + ), + CustomButton( + text: 'Continue', + onPressed: () { + if (pincode!.text.isEmpty) { + utils.showToast('Pin field is empty'); + } else { + if (accounttype == 'Individual') { + print('individual selected'); + Get.toNamed(RouteName.tellusindividualscreen); + } else if (accounttype == 'Business') { + print('business selected'); + Get.toNamed(RouteName.tellusbusinessscreen); + } + } + }), + const Spacer( + // flex: 2, + ), + ], + ), + )), + ], + ), + ); + } +} diff --git a/lib/onboarding/onboarding1.dart b/lib/onboarding/onboarding1.dart index 87f7a05..a58f604 100644 --- a/lib/onboarding/onboarding1.dart +++ b/lib/onboarding/onboarding1.dart @@ -1,13 +1,13 @@ -import 'dart:ui'; - import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter_svg/svg.dart'; +import 'package:get/get.dart'; import 'package:glassmorphism/glassmorphism.dart'; import 'package:regroup/Utils/Common/CustomNextButton.dart'; import 'package:regroup/Utils/Common/sized_box.dart'; import 'package:regroup/Utils/texts.dart'; +import 'package:regroup/resources/routes/route_name.dart'; class Onboarding1 extends StatefulWidget { const Onboarding1({super.key}); @@ -22,18 +22,6 @@ class _Onboarding1State extends State { return Scaffold( body: Stack( children: [ - Positioned( - top: 650, - left: 100, - child: Container( - height: 400, - width: 200, - decoration: - BoxDecoration(shape: BoxShape.circle, color: Colors.red - // Color(0xFF001D54).withOpacity(0.5), - ), - ), - ), Container( width: MediaQuery.of(context).size.width, height: MediaQuery.of(context).size.height, @@ -51,9 +39,22 @@ class _Onboarding1State extends State { image: DecorationImage( image: AssetImage("assets/images/png/onboarding1.png"), fit: BoxFit.fill)), - child: Padding( - padding: EdgeInsets.symmetric(horizontal: 16.w), - child: Column( + child: Stack(children: [ + Positioned( + top: 800, + left: 0, + child: Container( + height: 70.h, + width: MediaQuery.of(context).size.width, + decoration: BoxDecoration( + // shape: BoxShape.circle, + color: + // Colors.red + Color(0xFF009DAB).withOpacity(0.50), + ), + ), + ), + Column( crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.start, children: [ @@ -72,151 +73,74 @@ class _Onboarding1State extends State { child: text22400white( "Find motivation and support from like-minded people"), ), - sizedBoxHeight(10.h), - // GlassmorphicContainer( - // width: double.infinity, - // height: 130.h, - // borderRadius: 2, - // blur: 10, - // alignment: Alignment.bottomLeft, - // border: 2, - // linearGradient: LinearGradient( - // begin: Alignment.topLeft, - // end: Alignment.centerRight, - // colors: [ - // // Color(0xFF222935).withOpacity(0.12), - // // Color(0xFF222935).withOpacity(0.60), - // // Color(0XFF222B37), - // // Color(0xFF222935), - - // Color(0xFF009DAB40), - // Color(0xFF35798C6F), - // Color(0xFFD90B2E54), - // Color(0xFFD90B2E85), - // Color(0xFFD90B2E96), - - // // Colors.green.withOpacity(0.9), - // // Colors.amber.withOpacity(0.1) - // ], - // ), - // borderGradient: LinearGradient( - // begin: Alignment.topLeft, - // end: Alignment.bottomRight, - // colors: [ - // // Color(0xFFffffff).withOpacity(0.5), - // // Color((0xFFFFFFFF)).withOpacity(0.5), - - // // Color(0xFF222935).withOpacity(0.12), - // // Color(0xFF222935).withOpacity(0.60), - // // Color(0XFF222B37), - // // Color(0xFF222935), - - // Colors.green.withOpacity(0.1), - // Color((0xFFFFFFFF)).withOpacity(0.5), - // ], - // ), - // child: Column( - // children: [ - // CustomButton(text: "Sign up", onPressed: () {}), - // sizedBoxHeight(30.h), - // CustomButton2(text: "Login", onPressed: () {}), - // ], - // )), - CustomButton(text: "Sign up", onPressed: () {}), sizedBoxHeight(30.h), - CustomButton2(text: "Login", onPressed: () {}), - sizedBoxHeight(90.h), + GlassmorphicContainer( + width: MediaQuery.of(context).size.width, + height: 180.h, + borderRadius: 2, + blur: 30, + alignment: Alignment.bottomLeft, + border: 2, + linearGradient: LinearGradient( + begin: Alignment.topLeft, + end: Alignment.centerRight, + colors: [ + Color(0xFF222935).withOpacity(0.12), + Color(0xFF222935).withOpacity(0.60), + Color(0XFF222B37).withOpacity(0.12), + Color(0xFF222935).withOpacity(0.60), + + // Color(0xFF009DAB40), + // Color(0xFF35798C6F), + // Color(0xFFD90B2E54), + // Color(0xFFD90B2E85), + // Color(0xFFD90B2E96), + + // Colors.green.withOpacity(0.9), + // Colors.amber.withOpacity(0.1) + ], + ), + borderGradient: LinearGradient( + begin: Alignment.topLeft, + end: Alignment.bottomRight, + colors: [ + // Color(0xFFffffff).withOpacity(0.5), + // Color((0xFFFFFFFF)).withOpacity(0.5), + + Color(0xFF222935).withOpacity(0.12), + Color(0xFF222935).withOpacity(0.60), + Color(0XFF222B37), + Color(0xFF222935), + + // Colors.green.withOpacity(0.1), + // Color((0xFFFFFFFF)).withOpacity(0.5), + ], + ), + child: Padding( + padding: EdgeInsets.symmetric(horizontal: 16.w), + child: Column( + children: [ + CustomButton( + text: "Sign up", + onPressed: () { + Get.toNamed(RouteName.signupscreen); + }), + sizedBoxHeight(30.h), + CustomButton2( + text: "Login", + onPressed: () { + Get.toNamed(RouteName.loginScreen); + }), + // sizedBoxHeight(10.h), + ], + ), + )), ], ), - ), + ]), ), - // Positioned( - // bottom: -100, - // left: 100, - // child: Container( - // height: 200, - // width: 200, - // decoration: - // BoxDecoration(shape: BoxShape.circle, color: Colors.red - // // Color(0xFF001D54).withOpacity(0.5), - // ), - // ), - // ), ], ), ); - - // Scaffold( - // backgroundColor: Color(0xff222935), - // body: Container( - // width: MediaQuery.of(context).size.width, - // height: MediaQuery.of(context).size.height, - // decoration: BoxDecoration( - // gradient: LinearGradient( - // begin: Alignment.center, - // end: Alignment.bottomCenter, - // colors: [ - // Color(0xFF222935).withOpacity(0.12), - // Color(0xFF222935).withOpacity(0.60), - // Color(0XFF222B37), - // Color(0xFF222935), - // ], - // ), - // image: DecorationImage( - // image: AssetImage("assets/images/png/onboarding1.png"), - // fit: BoxFit.fill)), - // child: Stack(children: [ - // Positioned.fill( - // child: Container( - // color: Colors.black.withOpacity(0.2), - // ), - // ), - // Positioned( - // bottom: -100, - // left: 100, - // child: BackdropFilter( - // filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10), - // child: Container( - // height: 200, - // width: 200, - // decoration: BoxDecoration( - // shape: BoxShape.circle, - // color: Color(0xFF001D54).withOpacity(0.5), - // ), - // ), - // ), - // ), - // Padding( - // padding: EdgeInsets.symmetric(horizontal: 16.w), - // child: Column( - // crossAxisAlignment: CrossAxisAlignment.center, - // mainAxisAlignment: MainAxisAlignment.start, - // children: [ - // Spacer(), - // SvgPicture.asset( - // "assets/images/svg/onboarding2.svg", - // width: 104.w, - // height: 104.h, - // ), - // const Spacer( - // flex: 8, - // ), - // SizedBox( - // width: 301.w, - // height: 64.h, - // child: text22400white( - // "Find motivation and support from like-minded people"), - // ), - // sizedBoxHeight(50.h), - // CustomButton(text: "Sign up", onPressed: () {}), - // sizedBoxHeight(30.h), - // CustomButton2(text: "Login", onPressed: () {}), - // sizedBoxHeight(50.h), - // ], - // ), - // ), - // ]), - // ), - // ); } } diff --git a/lib/resources/routes/route_name.dart b/lib/resources/routes/route_name.dart index 150e476..51adf65 100644 --- a/lib/resources/routes/route_name.dart +++ b/lib/resources/routes/route_name.dart @@ -3,6 +3,12 @@ class RouteName { static const String onboarding1 = '/onboarding1'; static const String loginScreen = '/loginScreen'; static const String nointernet = '/nointernet'; + + static const String signupscreen = '/signupscreen'; + static const String verifyusercreen = '/verifyuser'; + static const String tellusindividualscreen = '/tellusindividualscreen'; + static const String tellusbusinessscreen = '/tellusbusinessscreen'; + static const String communityScreen = '/communityScreen'; static const String mainscreen = '/mainscreen'; static const String sidemenu = '/sidemenu'; @@ -17,8 +23,4 @@ class RouteName { - - - - } \ No newline at end of file diff --git a/lib/resources/routes/routes.dart b/lib/resources/routes/routes.dart index 2359058..6818dcc 100644 --- a/lib/resources/routes/routes.dart +++ b/lib/resources/routes/routes.dart @@ -1,4 +1,7 @@ import 'package:get/get_navigation/src/routes/get_route.dart'; + +import 'package:regroup/Login/View/loginscreen.dart'; + import 'package:regroup/Common/controller/MainScreen.dart'; import 'package:regroup/Feed%20Module/Main_Screens/Community/Community.dart'; import 'package:regroup/Feed%20Module/Main_Screens/Community/CycleScreen.dart'; @@ -8,7 +11,12 @@ import 'package:regroup/Feed%20Module/sidemenu/MyCommunity/View/CommunityDetails import 'package:regroup/Feed%20Module/sidemenu/MyCommunity/View/MyCommunity.dart'; import 'package:regroup/Feed%20Module/sidemenu/SavedPosts/SavedPosts.dart'; import 'package:regroup/Feed%20Module/sidemenu/sidemenu.dart'; + import 'package:regroup/Utils/Common/NoInternet.dart'; +import 'package:regroup/onboarding/Signup/View/Business/tellusbusiness.dart'; +import 'package:regroup/onboarding/Signup/View/Individual/tellusindividual.dart'; +import 'package:regroup/onboarding/Signup/View/signupscreen.dart'; +import 'package:regroup/onboarding/Signup/View/verifyuser.dart'; import 'package:regroup/onboarding/onboarding1.dart'; import 'package:regroup/onboarding/splashscreen.dart'; import 'package:regroup/resources/routes/route_name.dart'; @@ -27,6 +35,29 @@ class AppRoutes { name: RouteName.nointernet, page: () => const NoInternet(), ), + + GetPage( + name: RouteName.loginScreen, + page: () => const LoginScreen(), + ), + GetPage( + name: RouteName.signupscreen, + page: () => const SignupScreen(), + ), + GetPage( + name: RouteName.verifyusercreen, + page: () => const VerifyuserScreenState(), + ), + GetPage( + name: RouteName.tellusindividualscreen, + page: () => const TellusaboutIndividual(), + ), + GetPage( + name: RouteName.tellusbusinessscreen, + page: () => const TellusaboutBusiness(), + ), + + GetPage( name: RouteName.communityScreen, page: () => const CommunityScreen(), @@ -65,3 +96,4 @@ class AppRoutes { ), ]; } + diff --git a/pubspec.lock b/pubspec.lock index 34436a9..931909c 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -584,6 +584,14 @@ packages: url: "https://pub.dev" source: hosted version: "6.0.2" + pin_code_fields: + dependency: "direct main" + description: + name: pin_code_fields + sha256: "4c0db7fbc889e622e7c71ea54b9ee624bb70c7365b532abea0271b17ea75b729" + url: "https://pub.dev" + source: hosted + version: "8.0.1" platform: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index d2f9dbd..d7baf4b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -54,9 +54,13 @@ dependencies: device_info_plus: ^9.1.2 permission_handler: ^11.3.1 glassmorphism: ^3.0.0 + + pin_code_fields: ^8.0.1 + dropdown_button2: ^2.3.9 flutter_reaction_button: any + dev_dependencies: flutter_test: sdk: flutter