conflict resolved
This commit is contained in:
@@ -137,6 +137,12 @@ Widget commonDivider() {
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
String extractFileName(String filePath) {
|
||||
return path.basename(filePath);
|
||||
}
|
||||
|
||||
|
||||
Widget stackContainers({
|
||||
required String number,
|
||||
required List<String> containerImages,
|
||||
@@ -231,7 +237,3 @@ Widget stackReaction({
|
||||
text12w400_FCFCFC(number),
|
||||
]);
|
||||
}
|
||||
|
||||
String extractFileName(String filePath) {
|
||||
return path.basename(filePath);
|
||||
}
|
||||
|
||||
@@ -53,8 +53,9 @@ class _PostScreenState extends State<PostScreen> {
|
||||
children: [
|
||||
sizedBoxHeight(20.h),
|
||||
text16w400_FCFCFC("Caption"),
|
||||
|
||||
sizedBoxHeight(18.h),
|
||||
const CustomTextFormField2(
|
||||
CustomTextFormField2(
|
||||
maxlines: 3,
|
||||
),
|
||||
sizedBoxHeight(25.h),
|
||||
|
||||
@@ -203,7 +203,7 @@ class _LoginScreenState extends State<LoginScreen> {
|
||||
height: 17.h,
|
||||
),
|
||||
),
|
||||
validatorText: "Email Id",
|
||||
// validatorText: "Email Id",
|
||||
validator: (value) {
|
||||
if (value!.isEmpty) {
|
||||
return 'Enter your e-mail address';
|
||||
@@ -216,11 +216,11 @@ class _LoginScreenState extends State<LoginScreen> {
|
||||
return null;
|
||||
},
|
||||
inputFormatters: [
|
||||
LengthLimitingTextInputFormatter(20),
|
||||
LengthLimitingTextInputFormatter(30),
|
||||
RemoveEmojiInputFormatter()
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
sizedBoxHeight(10.h),
|
||||
text16400white('Password'),
|
||||
sizedBoxHeight(10.h),
|
||||
// Obx(() {
|
||||
@@ -326,7 +326,7 @@ class _LoginScreenState extends State<LoginScreen> {
|
||||
height: 17.h,
|
||||
),
|
||||
// const Icon(Icons.lock_outline),
|
||||
validatorText: "Enter your password",
|
||||
validationMessage: "Enter your password",
|
||||
validator: (val) {
|
||||
if (val == null || val.isEmpty) {
|
||||
return 'Please enter your password';
|
||||
|
||||
@@ -62,13 +62,13 @@ class CommonAppbar extends StatelessWidget implements PreferredSizeWidget {
|
||||
preferredSize: Size.fromHeight(80),
|
||||
child: AppBar(
|
||||
scrolledUnderElevation: 0.0,
|
||||
backgroundColor: Color(0xFF222935),
|
||||
backgroundColor: Color(0xFF222935).withOpacity(0.50),
|
||||
elevation: 0,
|
||||
automaticallyImplyLeading: false,
|
||||
titleSpacing: 0,
|
||||
title: showLeading!
|
||||
? Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 10.h),
|
||||
child: SingleChildScrollView(
|
||||
scrollDirection: Axis.horizontal,
|
||||
child: Row(
|
||||
@@ -96,6 +96,7 @@ class CommonAppbar extends StatelessWidget implements PreferredSizeWidget {
|
||||
)
|
||||
: SingleChildScrollView(
|
||||
scrollDirection: Axis.horizontal,
|
||||
padding: EdgeInsets.only(top: 10),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
@@ -119,28 +120,33 @@ class CommonAppbar extends StatelessWidget implements PreferredSizeWidget {
|
||||
),
|
||||
),
|
||||
leading: showLeading!
|
||||
? InkWell(
|
||||
onTap: () {
|
||||
Get.back();
|
||||
},
|
||||
child: Row(
|
||||
children: [
|
||||
sizedBoxWidth(10.w),
|
||||
commonGlassContainer(
|
||||
border: 0.9,
|
||||
width: 40.w,
|
||||
height: 40.h,
|
||||
borderradius: 100,
|
||||
customWidget: Center(
|
||||
child: Icon(
|
||||
Icons.arrow_back,
|
||||
color: Colors.white,
|
||||
size: 20.sp,
|
||||
? Padding(
|
||||
padding: EdgeInsets.only(top: 10.h),
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
Get.back();
|
||||
},
|
||||
child: Row(
|
||||
children: [
|
||||
sizedBoxWidth(10.w),
|
||||
commonGlassContainer(
|
||||
border: 0.9,
|
||||
width: 40.w,
|
||||
height: 40.h,
|
||||
borderradius: 100,
|
||||
customWidget: Center(
|
||||
child: Image.asset(
|
||||
'assets/images/png/appbararrowbutton.png')
|
||||
// Icon(
|
||||
// Icons.arrow_back,
|
||||
// color: Colors.white,
|
||||
// size: 20.sp,
|
||||
// ),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
))
|
||||
],
|
||||
)),
|
||||
)
|
||||
: null,
|
||||
actions: [
|
||||
if (customActionWidget != null)
|
||||
|
||||
@@ -44,7 +44,7 @@ class _CustomDropDownWidgetSignupState
|
||||
width: double.infinity,
|
||||
height: 50.h,
|
||||
padding: EdgeInsets.only(
|
||||
top: 14.0, bottom: 14.0, right: 14.w, left: 12.w),
|
||||
top: 14.0, bottom: 14.0, right: 22.w, left: 12.w),
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFFFFFFFF).withOpacity(0.10),
|
||||
borderRadius: onDropTap.value
|
||||
@@ -52,6 +52,14 @@ class _CustomDropDownWidgetSignupState
|
||||
top: Radius.circular(30.r),
|
||||
)
|
||||
: BorderRadius.circular(30.r),
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
const Color(0xFFffffff).withOpacity(0.50),
|
||||
const Color(0xFFFFFFFF).withOpacity(0.50),
|
||||
],
|
||||
),
|
||||
border: Border.all(color: const Color(0xFF434A53)),
|
||||
),
|
||||
child: Row(
|
||||
@@ -72,6 +80,7 @@ class _CustomDropDownWidgetSignupState
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 16.sp,
|
||||
fontFamily: 'Helvetica',
|
||||
fontWeight: FontWeight.w400),
|
||||
),
|
||||
],
|
||||
@@ -92,6 +101,14 @@ class _CustomDropDownWidgetSignupState
|
||||
bottom: Radius.circular(30.r),
|
||||
),
|
||||
border: Border.all(color: const Color(0xFF434A53)),
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
const Color(0xFFffffff).withOpacity(0.50),
|
||||
const Color(0xFFFFFFFF).withOpacity(0.50),
|
||||
],
|
||||
),
|
||||
),
|
||||
child: ListView.builder(
|
||||
shrinkWrap: true,
|
||||
|
||||
@@ -1,27 +1,29 @@
|
||||
// ignore_for_file: must_be_immutable
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
|
||||
import 'package:glassmorphism/glassmorphism.dart';
|
||||
import 'package:regroup/Utils/Common/sized_box.dart';
|
||||
import 'package:remove_emoji_input_formatter/remove_emoji_input_formatter.dart';
|
||||
|
||||
class CustomTextFormField extends StatefulWidget {
|
||||
const CustomTextFormField({
|
||||
CustomTextFormField({
|
||||
Key? key,
|
||||
this.validator,
|
||||
this.validationMessage,
|
||||
this.textEditingController,
|
||||
this.hintText,
|
||||
this.leadingIcon,
|
||||
this.prefixIconColor = const Color(0xFF737373),
|
||||
this.isInputPassword = false,
|
||||
this.validatorText,
|
||||
this.value,
|
||||
this.readonly = false,
|
||||
this.enabled = true,
|
||||
// this.textCapital = false,
|
||||
|
||||
this.outlineColor = Colors.black,
|
||||
// this.bgColor = const Color(0xFFFFF3E4),
|
||||
// this.prefixIconColor = Colors.white,
|
||||
|
||||
this.maxlines = 1,
|
||||
this.texttype,
|
||||
@@ -31,26 +33,23 @@ class CustomTextFormField extends StatefulWidget {
|
||||
this.suffixIcon,
|
||||
}) : super(key: key);
|
||||
|
||||
final dynamic validator;
|
||||
final String? Function(String?)? validator;
|
||||
final TextEditingController? textEditingController;
|
||||
final String? hintText;
|
||||
final Widget? leadingIcon;
|
||||
final Color prefixIconColor;
|
||||
final bool isInputPassword;
|
||||
final String? validatorText;
|
||||
final String? value;
|
||||
final bool readonly;
|
||||
final bool enabled;
|
||||
final int maxlines;
|
||||
final TextInputType? texttype;
|
||||
final dynamic inputFormatters;
|
||||
|
||||
final List<TextInputFormatter>? inputFormatters;
|
||||
final Color outlineColor;
|
||||
// final Color bgColor;
|
||||
|
||||
final Function(String)? onInput;
|
||||
final VoidCallback? onTap;
|
||||
final Widget? suffixIcon;
|
||||
String? validationMessage;
|
||||
|
||||
@override
|
||||
State<CustomTextFormField> createState() => _CustomTextFormFieldState();
|
||||
@@ -65,112 +64,128 @@ class _CustomTextFormFieldState extends State<CustomTextFormField> {
|
||||
obscureText = widget.isInputPassword;
|
||||
}
|
||||
|
||||
void validateField(String value) {
|
||||
setState(() {
|
||||
widget.validationMessage = widget.validator?.call(value) ??
|
||||
(value.isEmpty ? "Empty value" : null);
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GlassmorphicContainer(
|
||||
width: double.infinity,
|
||||
height: 50,
|
||||
borderRadius: 30,
|
||||
blur: 10,
|
||||
alignment: Alignment.bottomCenter,
|
||||
border: 0.8,
|
||||
linearGradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
const Color(0xFFffffff).withOpacity(0.04),
|
||||
const Color(0xFFFFFFFF).withOpacity(0.05),
|
||||
],
|
||||
stops: [
|
||||
0.1,
|
||||
1,
|
||||
]),
|
||||
borderGradient: const LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
Color(0xff434A53),
|
||||
Color(0xFF434A53),
|
||||
],
|
||||
),
|
||||
child: TextFormField(
|
||||
cursorColor: Colors.red,
|
||||
initialValue: widget.value,
|
||||
readOnly: widget.readonly,
|
||||
onTap: widget.onTap,
|
||||
enabled: widget.enabled,
|
||||
enableInteractiveSelection: false,
|
||||
maxLines: widget.maxlines,
|
||||
autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||
obscureText: obscureText,
|
||||
controller: widget.textEditingController,
|
||||
decoration: InputDecoration(
|
||||
hintText: widget.hintText,
|
||||
prefixIconColor: widget.prefixIconColor,
|
||||
|
||||
hintStyle: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w400,
|
||||
fontFamily: 'hiragino'),
|
||||
|
||||
// ignore: prefer_null_aware_operators
|
||||
prefixIcon: widget.leadingIcon == null ? null : widget.leadingIcon!,
|
||||
suffixIcon: widget.isInputPassword
|
||||
? GestureDetector(
|
||||
onTap: () => setState(() => obscureText = !obscureText),
|
||||
child: obscureText
|
||||
? const Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(right: 20.0),
|
||||
child: Icon(Icons.remove_red_eye),
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
GlassmorphicContainer(
|
||||
width: double.infinity,
|
||||
height: 50,
|
||||
borderRadius: 30,
|
||||
blur: 10,
|
||||
alignment: Alignment.bottomCenter,
|
||||
border: 0.8,
|
||||
linearGradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
const Color(0xFFffffff).withOpacity(0.04),
|
||||
const Color(0xFFFFFFFF).withOpacity(0.05),
|
||||
],
|
||||
stops: [
|
||||
0.1,
|
||||
1,
|
||||
]),
|
||||
borderGradient: const LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
Color(0xff434A53),
|
||||
Color(0xFF434A53),
|
||||
],
|
||||
),
|
||||
child: TextFormField(
|
||||
style: TextStyle(
|
||||
fontSize: 16.sp, color: Colors.white, fontFamily: 'Helvetica'),
|
||||
cursorColor: Colors.red,
|
||||
initialValue: widget.value,
|
||||
readOnly: widget.readonly,
|
||||
onTap: widget.onTap,
|
||||
enabled: widget.enabled,
|
||||
enableInteractiveSelection: false,
|
||||
maxLines: widget.maxlines,
|
||||
obscureText: obscureText,
|
||||
controller: widget.textEditingController,
|
||||
decoration: InputDecoration(
|
||||
hintText: widget.hintText,
|
||||
prefixIconColor: widget.prefixIconColor,
|
||||
constraints: BoxConstraints(minHeight: 50),
|
||||
hintStyle: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w400,
|
||||
fontFamily: 'Helvetica'),
|
||||
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",
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(right: 20.0),
|
||||
child: SvgPicture.asset(
|
||||
'assets/images/svg/loginpasswordopen.svg',
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
)
|
||||
: const Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(right: 20.0),
|
||||
child: Icon(
|
||||
Icons.remove_red_eye_outlined,
|
||||
color: Color(0xFF959595),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
: widget.suffixIcon == null
|
||||
? null
|
||||
: widget.suffixIcon!,
|
||||
border: InputBorder.none,
|
||||
contentPadding:
|
||||
const EdgeInsets.symmetric(horizontal: 25, vertical: 10),
|
||||
),
|
||||
style: const TextStyle(color: Colors.white),
|
||||
keyboardType: widget.texttype,
|
||||
validator: widget.validator ??
|
||||
(value) {
|
||||
if (value == null || value.isEmpty) {
|
||||
return "Empty value";
|
||||
}
|
||||
return null;
|
||||
)
|
||||
: widget.suffixIcon == null
|
||||
? null
|
||||
: widget.suffixIcon!,
|
||||
border: InputBorder.none,
|
||||
contentPadding:
|
||||
const EdgeInsets.symmetric(horizontal: 10, vertical: 10),
|
||||
),
|
||||
keyboardType: widget.texttype,
|
||||
inputFormatters: widget.inputFormatters,
|
||||
onChanged: (value) {
|
||||
widget.onInput?.call(value);
|
||||
validateField(value);
|
||||
},
|
||||
inputFormatters: widget.inputFormatters,
|
||||
onChanged: (value) {
|
||||
widget.onInput?.call(value);
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
sizedBoxHeight(5.h),
|
||||
Text(
|
||||
widget.validationMessage ?? '',
|
||||
style: TextStyle(color: Colors.red, fontSize: 12.sp),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
],
|
||||
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class CustomTextFormField2 extends StatefulWidget {
|
||||
const CustomTextFormField2({
|
||||
CustomTextFormField2({
|
||||
Key? key,
|
||||
this.validator,
|
||||
this.validationMessage,
|
||||
this.textEditingController,
|
||||
this.hintText,
|
||||
this.leadingIcon,
|
||||
@@ -204,6 +219,7 @@ class CustomTextFormField2 extends StatefulWidget {
|
||||
final Function(String)? onInput;
|
||||
final VoidCallback? onTap;
|
||||
final Widget? suffixIcon;
|
||||
String? validationMessage;
|
||||
|
||||
@override
|
||||
State<CustomTextFormField2> createState() => _CustomTextFormField2State();
|
||||
@@ -218,104 +234,309 @@ class _CustomTextFormField2State extends State<CustomTextFormField2> {
|
||||
obscureText = widget.isInputPassword;
|
||||
}
|
||||
|
||||
void validateField(String value) {
|
||||
setState(() {
|
||||
widget.validationMessage = widget.validator?.call(value) ??
|
||||
(value.isEmpty ? "Empty value" : null);
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GlassmorphicContainer(
|
||||
width: double.infinity,
|
||||
height: 100.h,
|
||||
borderRadius: 10,
|
||||
blur: 10,
|
||||
alignment: Alignment.bottomCenter,
|
||||
border: 0.8,
|
||||
linearGradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
const Color(0xFFffffff).withOpacity(0.04),
|
||||
const Color(0xFFFFFFFF).withOpacity(0.05),
|
||||
],
|
||||
stops: [
|
||||
0.1,
|
||||
1,
|
||||
]),
|
||||
borderGradient: const LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
Color(0xff434A53),
|
||||
Color(0xFF434A53),
|
||||
],
|
||||
),
|
||||
child: TextFormField(
|
||||
cursorColor: Colors.red,
|
||||
initialValue: widget.value,
|
||||
readOnly: widget.readonly,
|
||||
onTap: widget.onTap,
|
||||
enabled: widget.enabled,
|
||||
enableInteractiveSelection: false,
|
||||
maxLines: widget.maxlines,
|
||||
autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||
obscureText: obscureText,
|
||||
controller: widget.textEditingController,
|
||||
decoration: InputDecoration(
|
||||
hintText: widget.hintText,
|
||||
prefixIconColor: widget.prefixIconColor,
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
GlassmorphicContainer(
|
||||
width: double.infinity,
|
||||
height: 100.h,
|
||||
borderRadius: 10,
|
||||
blur: 10,
|
||||
alignment: Alignment.bottomCenter,
|
||||
border: 0.8,
|
||||
linearGradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
const Color(0xFFffffff).withOpacity(0.04),
|
||||
const Color(0xFFFFFFFF).withOpacity(0.05),
|
||||
],
|
||||
stops: [
|
||||
0.1,
|
||||
1,
|
||||
]),
|
||||
borderGradient: const LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
Color(0xff434A53),
|
||||
Color(0xFF434A53),
|
||||
],
|
||||
),
|
||||
child: TextFormField(
|
||||
cursorColor: Colors.red,
|
||||
initialValue: widget.value,
|
||||
readOnly: widget.readonly,
|
||||
onTap: widget.onTap,
|
||||
enabled: widget.enabled,
|
||||
enableInteractiveSelection: false,
|
||||
maxLines: widget.maxlines,
|
||||
autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||
obscureText: obscureText,
|
||||
controller: widget.textEditingController,
|
||||
|
||||
hintStyle: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w400,
|
||||
fontFamily: 'hiragino'),
|
||||
decoration: InputDecoration(
|
||||
hintText: widget.hintText,
|
||||
prefixIconColor: widget.prefixIconColor,
|
||||
constraints: BoxConstraints(minHeight: 50),
|
||||
|
||||
// ignore: prefer_null_aware_operators
|
||||
prefixIcon: widget.leadingIcon == null ? null : widget.leadingIcon!,
|
||||
suffixIcon: widget.isInputPassword
|
||||
? GestureDetector(
|
||||
onTap: () => setState(() => obscureText = !obscureText),
|
||||
child: obscureText
|
||||
? const Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(right: 20.0),
|
||||
child: Icon(Icons.remove_red_eye),
|
||||
|
||||
hintStyle: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w400,
|
||||
fontFamily: 'hiragino'),
|
||||
|
||||
// ignore: prefer_null_aware_operators
|
||||
prefixIcon:
|
||||
widget.leadingIcon == null ? null : widget.leadingIcon!,
|
||||
suffixIcon: widget.isInputPassword
|
||||
? GestureDetector(
|
||||
onTap: () => setState(() => obscureText = !obscureText),
|
||||
child: obscureText
|
||||
? const Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(right: 20.0),
|
||||
child: Icon(Icons.remove_red_eye),
|
||||
),
|
||||
],
|
||||
)
|
||||
: const Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(right: 20.0),
|
||||
child: Icon(
|
||||
Icons.remove_red_eye_outlined,
|
||||
color: Color(0xFF959595),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
)
|
||||
: const Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(right: 20.0),
|
||||
child: Icon(
|
||||
Icons.remove_red_eye_outlined,
|
||||
color: Color(0xFF959595),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
: widget.suffixIcon == null
|
||||
? null
|
||||
: widget.suffixIcon!,
|
||||
border: InputBorder.none,
|
||||
contentPadding:
|
||||
const EdgeInsets.symmetric(horizontal: 10, vertical: 10),
|
||||
),
|
||||
style: const TextStyle(color: Colors.white),
|
||||
keyboardType: widget.texttype,
|
||||
validator: widget.validator ??
|
||||
(value) {
|
||||
if (value == null || value.isEmpty) {
|
||||
return "Empty value";
|
||||
}
|
||||
return null;
|
||||
)
|
||||
: widget.suffixIcon == null
|
||||
? null
|
||||
: widget.suffixIcon!,
|
||||
border: InputBorder.none,
|
||||
contentPadding:
|
||||
const EdgeInsets.symmetric(horizontal: 10, vertical: 10),
|
||||
),
|
||||
style: const TextStyle(color: Colors.white),
|
||||
keyboardType: widget.texttype,
|
||||
// validator: widget.validator ??
|
||||
// (value) {
|
||||
// if (value == null || value.isEmpty) {
|
||||
// return "Empty value";
|
||||
// }
|
||||
// return null;
|
||||
// },
|
||||
inputFormatters: widget.inputFormatters,
|
||||
onChanged: (value) {
|
||||
widget.onInput?.call(value);
|
||||
},
|
||||
inputFormatters: widget.inputFormatters,
|
||||
onChanged: (value) {
|
||||
widget.onInput?.call(value);
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(5.h),
|
||||
Text(
|
||||
widget.validationMessage ?? '',
|
||||
style: TextStyle(color: Colors.red, fontSize: 12.sp),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class CustomTextFormFieldPassword extends StatefulWidget {
|
||||
CustomTextFormFieldPassword({
|
||||
Key? key,
|
||||
this.validator,
|
||||
this.validationMessage,
|
||||
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.prefixIconColor = Colors.white,
|
||||
this.texttype,
|
||||
this.onInput,
|
||||
this.onTap,
|
||||
this.maxlines = 1,
|
||||
}) : super(key: key);
|
||||
|
||||
final String? Function(String?)? 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 List<TextInputFormatter>? inputFormatters;
|
||||
final Color outlineColor;
|
||||
final Color prefixIconColor;
|
||||
final TextInputType? texttype;
|
||||
final Function(String)? onInput;
|
||||
final VoidCallback? onTap;
|
||||
final int maxlines;
|
||||
String? validationMessage;
|
||||
|
||||
@override
|
||||
State<CustomTextFormFieldPassword> createState() =>
|
||||
_CustomtextFormFieldPasswordState();
|
||||
}
|
||||
|
||||
class _CustomtextFormFieldPasswordState
|
||||
extends State<CustomTextFormFieldPassword> {
|
||||
late bool obscureText;
|
||||
var emojiFormatter = RemoveEmojiInputFormatter();
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
obscureText = widget.isInputPassword;
|
||||
}
|
||||
|
||||
void validateField(String value) {
|
||||
setState(() {
|
||||
widget.validationMessage = widget.validator?.call(value) ??
|
||||
(value.isEmpty ? "Empty value" : null);
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
List<TextInputFormatter> allFormatters = [emojiFormatter];
|
||||
if (widget.inputFormatters != null) {
|
||||
allFormatters.addAll(widget.inputFormatters!);
|
||||
}
|
||||
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
GlassmorphicContainer(
|
||||
width: double.infinity,
|
||||
height: 50,
|
||||
borderRadius: 30,
|
||||
blur: 10,
|
||||
alignment: Alignment.bottomCenter,
|
||||
border: 0.8,
|
||||
linearGradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
const Color(0xFFffffff).withOpacity(0.04),
|
||||
const Color(0xFFFFFFFF).withOpacity(0.05),
|
||||
],
|
||||
stops: [0.1, 1],
|
||||
),
|
||||
borderGradient: const LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
Color(0xff434A53),
|
||||
Color(0xFF434A53),
|
||||
],
|
||||
),
|
||||
child: TextFormField(
|
||||
textCapitalization: widget.textCapital
|
||||
? TextCapitalization.characters
|
||||
: TextCapitalization.none,
|
||||
onTap: widget.onTap,
|
||||
style: TextStyle(
|
||||
fontSize: 16.sp, color: Colors.white, fontFamily: 'Helvetica'),
|
||||
initialValue: widget.value,
|
||||
readOnly: widget.readonly,
|
||||
enabled: widget.enabled,
|
||||
maxLines: widget.maxlines,
|
||||
cursorColor: Colors.white,
|
||||
obscureText: obscureText,
|
||||
controller: widget.textEditingController,
|
||||
decoration: InputDecoration(
|
||||
hintStyle: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w400,
|
||||
fontFamily: 'Helvetica'),
|
||||
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:
|
||||
Colors.transparent, // Make sure fillColor is transparent
|
||||
border: InputBorder.none,
|
||||
hintText: widget.hintText,
|
||||
prefixIconColor: widget.prefixIconColor,
|
||||
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",
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(right: 20.0),
|
||||
child: SvgPicture.asset(
|
||||
'assets/images/svg/loginpasswordopen.svg',
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
: null,
|
||||
),
|
||||
keyboardType: widget.texttype,
|
||||
inputFormatters: allFormatters,
|
||||
onChanged: (value) {
|
||||
widget.onInput?.call(value);
|
||||
validateField(value);
|
||||
},
|
||||
validator: widget.validator,
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(5.h),
|
||||
Text(
|
||||
widget.validationMessage ?? '',
|
||||
style: TextStyle(color: Colors.red, fontSize: 12.sp),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
],
|
||||
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -206,7 +206,7 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
|
||||
fontFamily: 'Cambria',
|
||||
),
|
||||
debugShowCheckedModeBanner: false,
|
||||
initialRoute: RouteName.mainscreen,
|
||||
initialRoute: RouteName.splashScreen,
|
||||
|
||||
//initialRoute: RouteName.mainScreen,
|
||||
getPages: AppRoutes.appRoutes(),
|
||||
|
||||
@@ -124,7 +124,7 @@ class _TellusaboutBusinessState extends State<TellusaboutBusiness> {
|
||||
height: 17.h,
|
||||
'assets/images/png/user.png',
|
||||
),
|
||||
validatorText: "Enter your business owner name",
|
||||
// validatorText: "Enter your business owner name",
|
||||
validator: (value) {
|
||||
if (value!.isEmpty) {
|
||||
return 'Enter your business owner name ';
|
||||
@@ -138,7 +138,7 @@ class _TellusaboutBusinessState extends State<TellusaboutBusiness> {
|
||||
RegExp('[a-zA-Z ]'))
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
sizedBoxHeight(10.h),
|
||||
text16400white('Business name'),
|
||||
sizedBoxHeight(10.h),
|
||||
CustomTextFormField(
|
||||
@@ -152,7 +152,7 @@ class _TellusaboutBusinessState extends State<TellusaboutBusiness> {
|
||||
height: 17.h,
|
||||
'assets/images/png/briefcase.png',
|
||||
),
|
||||
validatorText: "Enter your business name",
|
||||
// validatorText: "Enter your business name",
|
||||
validator: (value) {
|
||||
if (value!.isEmpty) {
|
||||
return 'Enter your business name ';
|
||||
@@ -166,7 +166,7 @@ class _TellusaboutBusinessState extends State<TellusaboutBusiness> {
|
||||
RegExp('[a-zA-Z ]'))
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
sizedBoxHeight(10.h),
|
||||
text16400white('Business location'),
|
||||
sizedBoxHeight(10.h),
|
||||
CustomTextFormField(
|
||||
@@ -180,7 +180,7 @@ class _TellusaboutBusinessState extends State<TellusaboutBusiness> {
|
||||
height: 17.h,
|
||||
'assets/images/png/location.png',
|
||||
),
|
||||
validatorText: "Enter your business location",
|
||||
// validatorText: "Enter your business location",
|
||||
validator: (value) {
|
||||
if (value!.isEmpty) {
|
||||
return 'Enter your business location ';
|
||||
@@ -194,7 +194,7 @@ class _TellusaboutBusinessState extends State<TellusaboutBusiness> {
|
||||
RegExp('[a-zA-Z ]'))
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
sizedBoxHeight(10.h),
|
||||
text16400white('Type of business'),
|
||||
sizedBoxHeight(10.h),
|
||||
CustomDropDownWidgetSignup(
|
||||
|
||||
@@ -289,7 +289,7 @@ class _TellusaboutIndividualState extends State<TellusaboutIndividual> {
|
||||
height: 17.h,
|
||||
'assets/images/png/user.png',
|
||||
),
|
||||
validatorText: "Enter your full name",
|
||||
// validatorText: "Enter your full name",
|
||||
validator: (value) {
|
||||
if (value!.isEmpty) {
|
||||
return 'Enter your full name ';
|
||||
@@ -303,7 +303,7 @@ class _TellusaboutIndividualState extends State<TellusaboutIndividual> {
|
||||
RegExp('[a-zA-Z ]'))
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
sizedBoxHeight(0.h),
|
||||
text16400white('User name'),
|
||||
sizedBoxHeight(10.h),
|
||||
CustomTextFormField(
|
||||
@@ -317,7 +317,7 @@ class _TellusaboutIndividualState extends State<TellusaboutIndividual> {
|
||||
height: 17.h,
|
||||
'assets/images/png/user.png',
|
||||
),
|
||||
validatorText: "Enter your user name",
|
||||
// validatorText: "Enter your user name",
|
||||
validator: (value) {
|
||||
if (value!.isEmpty) {
|
||||
return 'Enter your user name ';
|
||||
@@ -331,7 +331,7 @@ class _TellusaboutIndividualState extends State<TellusaboutIndividual> {
|
||||
RegExp('[a-zA-Z ]'))
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
sizedBoxHeight(0.h),
|
||||
text16400white('Date of birth'),
|
||||
sizedBoxHeight(10.h),
|
||||
CustomTextFormField(
|
||||
@@ -349,7 +349,7 @@ class _TellusaboutIndividualState extends State<TellusaboutIndividual> {
|
||||
height: 17.h,
|
||||
'assets/images/png/dateimage.png',
|
||||
),
|
||||
validatorText: "Enter date of birth",
|
||||
// validatorText: "Enter date of birth",
|
||||
validator: (value) {
|
||||
if (value!.isEmpty) {
|
||||
return 'Enter your date of birth';
|
||||
@@ -357,7 +357,7 @@ class _TellusaboutIndividualState extends State<TellusaboutIndividual> {
|
||||
return null;
|
||||
},
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
sizedBoxHeight(0.h),
|
||||
text16400white('Gender'),
|
||||
sizedBoxHeight(10.h),
|
||||
CustomDropDownWidgetSignup(
|
||||
@@ -388,7 +388,7 @@ class _TellusaboutIndividualState extends State<TellusaboutIndividual> {
|
||||
height: 17.h,
|
||||
'assets/images/png/location.png',
|
||||
),
|
||||
validatorText: "Enter your location",
|
||||
// validatorText: "Enter your location",
|
||||
validator: (value) {
|
||||
if (value!.isEmpty) {
|
||||
return 'Enter your location ';
|
||||
@@ -402,7 +402,7 @@ class _TellusaboutIndividualState extends State<TellusaboutIndividual> {
|
||||
RegExp('[a-zA-Z ]'))
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(30.h),
|
||||
sizedBoxHeight(20.h),
|
||||
CustomButton(
|
||||
text: "Continue",
|
||||
onPressed: () {
|
||||
|
||||
@@ -44,18 +44,9 @@ class _SignupScreenState extends State<SignupScreen> {
|
||||
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()),
|
||||
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:
|
||||
@@ -135,7 +126,7 @@ class _SignupScreenState extends State<SignupScreen> {
|
||||
height: 17.h,
|
||||
),
|
||||
),
|
||||
validatorText: "Email Id",
|
||||
// validatorText: "Email Id",
|
||||
validator: (value) {
|
||||
if (value!.isEmpty) {
|
||||
return 'Enter your e-mail address';
|
||||
@@ -152,7 +143,7 @@ class _SignupScreenState extends State<SignupScreen> {
|
||||
RemoveEmojiInputFormatter()
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
sizedBoxHeight(10.h),
|
||||
text16400white('Password'),
|
||||
sizedBoxHeight(10.h),
|
||||
CustomTextFormField(
|
||||
@@ -165,7 +156,7 @@ class _SignupScreenState extends State<SignupScreen> {
|
||||
height: 17.h,
|
||||
),
|
||||
// const Icon(Icons.lock_outline),
|
||||
validatorText: "Enter your password",
|
||||
validationMessage: "Enter your password",
|
||||
validator: (val) {
|
||||
if (val == null || val.isEmpty) {
|
||||
return 'Please enter your password';
|
||||
@@ -177,7 +168,7 @@ class _SignupScreenState extends State<SignupScreen> {
|
||||
RemoveEmojiInputFormatter()
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
sizedBoxHeight(10.h),
|
||||
text16400white('Confirm password'),
|
||||
sizedBoxHeight(10.h),
|
||||
CustomTextFormField(
|
||||
@@ -190,7 +181,7 @@ class _SignupScreenState extends State<SignupScreen> {
|
||||
height: 17.h,
|
||||
),
|
||||
// const Icon(Icons.lock_outline),
|
||||
validatorText: "Enter your password",
|
||||
// validatorText: "Enter your password",
|
||||
validator: (val) {
|
||||
if (val == null || val.isEmpty) {
|
||||
return 'Please enter your password';
|
||||
@@ -205,7 +196,7 @@ class _SignupScreenState extends State<SignupScreen> {
|
||||
RemoveEmojiInputFormatter()
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
sizedBoxHeight(10.h),
|
||||
Row(
|
||||
children: [
|
||||
text16400white('Account type'),
|
||||
@@ -220,10 +211,9 @@ class _SignupScreenState extends State<SignupScreen> {
|
||||
title: '',
|
||||
listData: _dropdownProductItems,
|
||||
onItemSelected: _onItemSelected,
|
||||
leadingImage:
|
||||
Image.asset(
|
||||
'assets/images/png/user.png',
|
||||
),
|
||||
leadingImage: Image.asset(
|
||||
'assets/images/png/user.png',
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(30.h),
|
||||
Row(
|
||||
@@ -295,14 +285,12 @@ class _SignupScreenState extends State<SignupScreen> {
|
||||
// Get.to(() => IndividualPage());
|
||||
print('individual selected');
|
||||
Get.toNamed(RouteName.verifyusercreen,
|
||||
arguments: _selectedAccountType
|
||||
);
|
||||
arguments: _selectedAccountType);
|
||||
} else if (_selectedAccountType ==
|
||||
'Business') {
|
||||
print('business selected');
|
||||
Get.toNamed(RouteName.verifyusercreen,
|
||||
arguments: _selectedAccountType
|
||||
);
|
||||
Get.toNamed(RouteName.verifyusercreen,
|
||||
arguments: _selectedAccountType);
|
||||
|
||||
// Get.to(() => BusinessPage());
|
||||
} else {
|
||||
|
||||
@@ -27,9 +27,9 @@ class _VerifyuserScreenStateState extends State<VerifyuserScreenState> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: Color.fromARGB(255, 18, 32, 47),
|
||||
// appBar: CommonAppbar(
|
||||
// titleTxt: '',
|
||||
// ),
|
||||
appBar: CommonAppbar(
|
||||
titleTxt: '',
|
||||
),
|
||||
body: Stack(
|
||||
children: [
|
||||
// CommonBlurLeftSecond(),
|
||||
@@ -76,6 +76,7 @@ class _VerifyuserScreenStateState extends State<VerifyuserScreenState> {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
sizedBoxHeight(20.h),
|
||||
text22400white('Check your email'),
|
||||
sizedBoxHeight(10.h),
|
||||
text14400white(
|
||||
|
||||
Reference in New Issue
Block a user