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 534e695..616bbca 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); @@ -117,4 +115,8 @@ Widget MessageTextInputField( ), keyboardType: TextInputType.text, ); +} + +String extractFileName(String filePath) { + return path.basename(filePath); } \ 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 d3da29f..4bf3836 100644 --- a/lib/Utils/Common/CommonAppbar.dart +++ b/lib/Utils/Common/CommonAppbar.dart @@ -1,101 +1,182 @@ +// // 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; + +// final String? backPageName; +// // final double height; +// final bool? profileverifyback; + +// @override +// Widget build(BuildContext context) { +// return AppBar( +// scrolledUnderElevation: 0.0, +// backgroundColor: +// // Colors.red, +// Color(0XFF222935).withOpacity(0.55), +// elevation: 0, +// leading: Padding( +// padding: +// EdgeInsets.only(left: 16.w, top: 20.h), // Adjust top padding here +// child: GestureDetector( +// onTap: () { +// // aifBack == true +// // ? +// // Get.back() +// // : +// // customBack ?? false ? Get.toNamed(backPageName!) : +// // profileverifyback == true +// // ? +// // Get.offNamed( +// // RouteName.investorprofile) +// // : +// Get.back(); +// }, +// child: SizedBox( +// width: 40.w, +// height: 40.h, +// child: Container( +// // height: 40.h, +// // width: 40.w, +// decoration: BoxDecoration( +// color: Color(0XFF434A53), +// shape: BoxShape.circle, +// ), +// child: Padding( +// padding: EdgeInsets.only(left: 0.w), +// child: Image.asset( +// 'assets/images/png/appbararrowbutton.png', +// width: 19.w, +// height: 19.h, +// ), +// ), +// ), +// ), +// ), +// ), +// title: Padding( +// padding: EdgeInsets.only(top: 25.h), +// child: Text( +// titleTxt, +// softWrap: true, +// textAlign: TextAlign.center, +// style: TextStyle( +// fontFamily: 'Helvetica', +// fontSize: 20.sp, +// fontWeight: FontWeight.w600, +// color: Colors.white, +// ), +// ), +// ), +// ); +// } +// } + // 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'; +// import 'package:flutter/material.dart'; +// import 'package:flutter_screenutil/flutter_screenutil.dart'; +// import 'package:get/get.dart'; +// import 'package:get/get_connect/http/src/utils/utils.dart'; -class CommonAppbar extends StatelessWidget implements PreferredSizeWidget { - @override - Size get preferredSize => Size.fromHeight(height); - const CommonAppbar( - {Key? key, - required this.titleTxt, - this.showLeading = true, - this.customBack, - this.aifBack, - this.profileverifyback, +// 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); - this.backPageName = '', - this.height = 105}) - : super(key: key); +// final String titleTxt; +// final bool? showLeading; +// final bool? customBack; - final String titleTxt; - final bool? showLeading; - final bool? customBack; - final bool? aifBack; +// final String? backPageName; +// // final double height; +// final bool? profileverifyback; - final String? backPageName; - final double height; - final bool? profileverifyback; - - @override - Widget build(BuildContext context) { - return PreferredSize( - preferredSize: Size.fromHeight(130), - child: AppBar( - scrolledUnderElevation: 0.0, - backgroundColor: Color(0xFFFFF3E4), - elevation: 0, - leadingWidth: 56.w, - leading: Padding( - padding: EdgeInsets.only(left: 16.w, top: 20.h), - child: GestureDetector( - onTap: () { - // aifBack == true - // ? - // Get.back() - // : - // customBack ?? false ? Get.toNamed(backPageName!) : - // profileverifyback == true - // ? - // Get.offNamed( - // RouteName.investorprofile) - // : - Get.back(); - }, - child: Container( - height: 40.h, - width: 40.w, - decoration: const BoxDecoration( - color: Color(0xFFFFE3BF), - shape: BoxShape.circle, - ), - child: Padding( - padding: EdgeInsets.only(left: 8.w), - child: Icon( - Icons.arrow_back_ios, - color: Colors.black, - size: 25.r, - ), - ), - ), - ), - ), - flexibleSpace: FlexibleSpaceBar( - centerTitle: false, - titlePadding: EdgeInsets.all(0), - title: Padding( - padding: EdgeInsets.only(left: 16.w), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.end, - children: [ - Text( - titleTxt, - style: TextStyle( - color: Color(0xFF1A1A1A), - fontSize: 22, - fontFamily: 'Georgia'), - maxLines: 2, - softWrap: true, - ), - // newTextfield( - // FontWeight.w400, 0) - ], - ), - ), - ), - ), - ); - } -} +// @override +// Widget build(BuildContext context) { +// return AppBar( +// centerTitle: false, +// forceMaterialTransparency: false, +// scrolledUnderElevation: 0.0, +// backgroundColor: +// // Colors.red, +// Color(0XFF222935).withOpacity(0.55), +// elevation: 0, +// leading: Padding( +// padding: +// EdgeInsets.only(left: 16.w, top: 20.h), // Adjust top padding here +// child: GestureDetector( +// onTap: () { +// // aifBack == true +// // ? +// // Get.back() +// // : +// // customBack ?? false ? Get.toNamed(backPageName!) : +// // profileverifyback == true +// // ? +// // Get.offNamed( +// // RouteName.investorprofile) +// // : +// Get.back(); +// }, +// child: Container( +// height: 40.h, +// width: 40.w, +// decoration: BoxDecoration( +// color: Color(0XFF434A53), +// shape: BoxShape.circle, +// ), +// child: Padding( +// padding: EdgeInsets.only(left: 0.w), +// child: Image.asset( +// 'assets/images/png/appbararrowbutton.png', +// width: 19.w, +// height: 19.h, +// ), +// ), +// ), +// ), +// ), +// title: Padding( +// padding: EdgeInsets.only(top: 25.h), +// child: Text( +// titleTxt, +// softWrap: true, +// textAlign: TextAlign.center, +// style: TextStyle( +// fontFamily: 'Helvetica', +// fontSize: 20.sp, +// fontWeight: FontWeight.w600, +// color: Colors.white, +// ), +// ), +// ), +// ); +// } +// } 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 b50a58b..c4891fb 100644 --- a/lib/Utils/Common/CustomTextformfield.dart +++ b/lib/Utils/Common/CustomTextformfield.dart @@ -3,6 +3,7 @@ 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:remove_emoji_input_formatter/remove_emoji_input_formatter.dart'; class CustomTextFormField extends StatefulWidget { @@ -20,8 +21,8 @@ class CustomTextFormField extends StatefulWidget { this.textCapital = false, this.isInputPassword = false, this.outlineColor = Colors.black, - this.bgColor = const Color(0xFFFFF3E4), - this.prefixIconColor = const Color(0xFF737373), + // this.bgColor = const Color(0xFFFFF3E4), + this.prefixIconColor = Colors.white, this.texttype, this.onInput, this.onTap, @@ -40,7 +41,7 @@ class CustomTextFormField extends StatefulWidget { final bool textCapital; final dynamic inputFormatters; final Color outlineColor; - final Color bgColor; + // final Color bgColor; final Color prefixIconColor; final TextInputType? texttype; Function(String)? onInput; @@ -64,60 +65,73 @@ class _CustomtextFormFieldState extends State { @override Widget build(BuildContext context) { List allFormatters = [emojiFormatter]; -if (widget.inputFormatters != null) { - allFormatters.addAll(widget.inputFormatters); -} + if (widget.inputFormatters != null) { + allFormatters.addAll(widget.inputFormatters); + } return TextFormField( textCapitalization: widget.textCapital ? TextCapitalization.characters : TextCapitalization.none, onTap: widget.onTap, - style: TextStyle( - fontSize: 16.sp, - ), + style: TextStyle(fontSize: 16.sp, color: Colors.white,fontFamily: 'Helvetica'), initialValue: widget.value, readOnly: widget.readonly, enabled: widget.enabled, //enableInteractiveSelection: false, maxLines: widget.maxlines, - cursorColor: Colors.black, + cursorColor: Colors.white, autovalidateMode: AutovalidateMode.onUserInteraction, obscureText: obscureText, controller: widget.textEditingController, decoration: InputDecoration( - labelStyle: const TextStyle(color: Colors.black), + labelStyle: const TextStyle(color: Colors.white), errorStyle: TextStyle( fontSize: 13.sp, color: Color.fromARGB(255, 245, 130, 122), ), - contentPadding: EdgeInsets.symmetric(vertical: 10, horizontal: 20), + contentPadding: EdgeInsets.symmetric(vertical: 10, horizontal: 0), filled: true, - fillColor: widget.bgColor, + fillColor: Color(0xFFFFFFFF).withOpacity(0.10), + // widget.bgColor, border: OutlineInputBorder( - borderRadius: BorderRadius.circular(5), - borderSide: const BorderSide(color: Color(0xFFE8C69F80), width: 1), + borderRadius: BorderRadius.all(Radius.circular(30.r)), + borderSide: const BorderSide( + color: Color(0xFF434A53), + ), + // borderSide: const BorderSide(color: Color(0xFFE8C69F80), width: 1), ), enabledBorder: OutlineInputBorder( - borderRadius: BorderRadius.circular(5), - borderSide: const BorderSide(color: Color(0xFFE8C69F80), width: 1), + // borderRadius: BorderRadius.circular(5), + borderRadius: BorderRadius.all(Radius.circular(30.r)), + borderSide: const BorderSide( + color: Color(0xFF434A53), + ), + // borderSide: const BorderSide(color: Color(0xFFE8C69F80), width: 1), ), focusedBorder: OutlineInputBorder( - borderRadius: BorderRadius.circular(5), - borderSide: const BorderSide(color: Color(0xFFE8C69F80), width: 1), + borderRadius: BorderRadius.all(Radius.circular(30.r)), + // borderSide: const BorderSide(color: Color(0xFFE8C69F80), width: 1), + borderSide: const BorderSide( + color: Color(0xFF434A53), + ), ), errorBorder: OutlineInputBorder( - borderRadius: BorderRadius.circular(5), - borderSide: const BorderSide(color: Colors.red, width: 1), + // borderRadius: BorderRadius.circular(5), + borderRadius: BorderRadius.all(Radius.circular(30.r)), + // borderSide: const BorderSide(color: Colors.red, width: 1), + borderSide: const BorderSide(color: Colors.red), ), focusedErrorBorder: OutlineInputBorder( - borderRadius: BorderRadius.circular(5), - borderSide: const BorderSide(color: Colors.red, width: 1), + borderRadius: BorderRadius.all(Radius.circular(30.r)), + borderSide: const BorderSide(color: Colors.red), + // borderRadius: BorderRadius.circular(5), + // borderSide: const BorderSide(color: Colors.red, width: 1), ), - hintStyle: const TextStyle( - color: Color(0xFF737373), - fontSize: 14, + hintStyle: TextStyle( + color: Colors.white, + fontSize: 14.sp, fontWeight: FontWeight.w400, - fontFamily: "DM Sans"), + fontFamily: "Helvetica"), hintText: widget.hintText, prefixIconColor: widget.prefixIconColor, // ignore: prefer_null_aware_operators @@ -126,28 +140,215 @@ if (widget.inputFormatters != null) { ? GestureDetector( onTap: () => setState(() => obscureText = !obscureText), child: obscureText - ? const Column( + ? Column( mainAxisAlignment: MainAxisAlignment.center, children: [ Padding( - padding: EdgeInsets.only(right: 20.0), - child: Icon( - Icons.remove_red_eye, - color: Color(0xFF959595), - ), - ), + padding: EdgeInsets.only(right: 20.0), + child: SvgPicture.asset( + "assets/images/svg/loginpasswordclose.svg") + + // Icon( + // Icons.remove_red_eye, + // color: Color(0xFF959595), + // ), + ), ], ) - : const Column( + : Column( mainAxisAlignment: MainAxisAlignment.center, children: [ Padding( - padding: EdgeInsets.only(right: 20.0), - child: Icon( - Icons.remove_red_eye_outlined, - color: Color(0xFF959595), - ), - ), + padding: EdgeInsets.only(right: 20.0), + child: SvgPicture.asset( + 'assets/images/svg/loginpasswordopen.svg') + // Icon( + // Icons.remove_red_eye_outlined, + // color: Color(0xFF959595), + // ), + ), + ], + ), + ) + : null, + ), + 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); + }, + ); + } +} + +class CustomTextFormFieldPassword extends StatefulWidget { + CustomTextFormFieldPassword({ + Key? key, + this.validator, + this.inputFormatters, + this.hintText, + this.validatorText, + this.value, + this.textEditingController, + this.leadingIcon, + 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.texttype, + this.onInput, + this.onTap, + this.maxlines = 1, + }) : super(key: key); + + dynamic validator; + final TextEditingController? textEditingController; + final String? hintText; + final String? validatorText; + final String? value; + final Widget? leadingIcon; + final bool isInputPassword; + final bool readonly; + final bool enabled; + final bool textCapital; + final dynamic inputFormatters; + final Color outlineColor; + // final Color bgColor; + final Color prefixIconColor; + final TextInputType? texttype; + Function(String)? onInput; + final VoidCallback? onTap; + final int maxlines; + + @override + State createState() => _CustomtextFormFieldPasswordState(); +} + +class _CustomtextFormFieldPasswordState extends State { + late bool obscureText; + var emojiFormatter = RemoveEmojiInputFormatter(); + + @override + void initState() { + super.initState(); + obscureText = widget.isInputPassword; + } + + @override + 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.sp, color: Colors.white), + initialValue: widget.value, + readOnly: widget.readonly, + enabled: widget.enabled, + //enableInteractiveSelection: false, + maxLines: widget.maxlines, + cursorColor: Colors.white, + autovalidateMode: AutovalidateMode.onUserInteraction, + obscureText: obscureText, + controller: widget.textEditingController, + decoration: InputDecoration( + labelStyle: const TextStyle(color: Colors.white), + errorStyle: TextStyle( + fontSize: 13.sp, + color: Color.fromARGB(255, 245, 130, 122), + ), + contentPadding: EdgeInsets.symmetric(vertical: 10, horizontal: 0), + filled: true, + fillColor: Color(0xFFFFFFFF).withOpacity(0.10), + // widget.bgColor, + border: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(30.r)), + borderSide: const BorderSide( + color: Color(0xFF434A53), + ), + // borderSide: const BorderSide(color: Color(0xFFE8C69F80), width: 1), + ), + enabledBorder: OutlineInputBorder( + // borderRadius: BorderRadius.circular(5), + borderRadius: BorderRadius.all(Radius.circular(30.r)), + borderSide: const BorderSide( + color: Color(0xFF434A53), + ), + // borderSide: const BorderSide(color: Color(0xFFE8C69F80), width: 1), + ), + focusedBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(30.r)), + // borderSide: const BorderSide(color: Color(0xFFE8C69F80), width: 1), + borderSide: const BorderSide( + color: Color(0xFF434A53), + ), + ), + errorBorder: OutlineInputBorder( + // borderRadius: BorderRadius.circular(5), + borderRadius: BorderRadius.all(Radius.circular(30.r)), + // borderSide: const BorderSide(color: Colors.red, width: 1), + borderSide: const BorderSide(color: Colors.red), + ), + focusedErrorBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(30.r)), + borderSide: const BorderSide(color: Colors.red), + // borderRadius: BorderRadius.circular(5), + // borderSide: const BorderSide(color: Colors.red, width: 1), + ), + hintStyle: TextStyle( + color: Colors.white, + fontSize: 14.sp, + fontWeight: FontWeight.w400, + fontFamily: "Helvetica"), + hintText: widget.hintText, + prefixIconColor: widget.prefixIconColor, + // ignore: prefer_null_aware_operators + prefixIcon: widget.leadingIcon == null ? null : widget.leadingIcon!, + suffixIcon: widget.isInputPassword + ? GestureDetector( + onTap: () => setState(() => obscureText = !obscureText), + child: obscureText + ? Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Padding( + padding: EdgeInsets.only(right: 20.0), + child: SvgPicture.asset( + "assets/images/svg/loginpasswordclose.svg") + + // Icon( + // Icons.remove_red_eye, + // color: Color(0xFF959595), + // ), + ), + ], + ) + : Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Padding( + padding: EdgeInsets.only(right: 20.0), + child: SvgPicture.asset( + 'assets/images/svg/loginpasswordopen.svg') + // Icon( + // Icons.remove_red_eye_outlined, + // color: Color(0xFF959595), + // ), + ), ], ), ) 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 8c6d674..b7dcde8 100644 --- a/lib/Utils/Common/blureffect.dart +++ b/lib/Utils/Common/blureffect.dart @@ -61,3 +61,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 55c6665..3335154 100644 --- a/lib/Utils/texts.dart +++ b/lib/Utils/texts.dart @@ -16,10 +16,56 @@ Widget text22400white(String text) { textAlign: TextAlign.center, style: TextStyle( fontSize: 22.sp, - color: AppColors.white, - fontWeight: FontWeight.w400, - fontFamily: 'Helvetica' - ), + 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'), ); } @@ -42,8 +88,6 @@ Widget text20Blackw600(String text) { ); } - - Widget textA4856_20500(String text) { return Text( text, 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 d7e4fa4..fb27b9c 100644 --- a/lib/resources/routes/route_name.dart +++ b/lib/resources/routes/route_name.dart @@ -3,5 +3,10 @@ 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'; + } \ No newline at end of file diff --git a/lib/resources/routes/routes.dart b/lib/resources/routes/routes.dart index 235a325..d129885 100644 --- a/lib/resources/routes/routes.dart +++ b/lib/resources/routes/routes.dart @@ -1,5 +1,10 @@ import 'package:get/get_navigation/src/routes/get_route.dart'; +import 'package:regroup/Login/View/loginscreen.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'; @@ -20,5 +25,28 @@ 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(), + ), + + + ]; } \ No newline at end of file diff --git a/pubspec.lock b/pubspec.lock index 4839982..a21a4d8 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -568,6 +568,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 98fade5..4fdd86d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -54,6 +54,7 @@ dependencies: device_info_plus: ^9.1.2 permission_handler: ^11.3.1 glassmorphism: ^3.0.0 + pin_code_fields: ^8.0.1 dev_dependencies: flutter_test: