contact ui, create ticket
This commit is contained in:
@@ -198,6 +198,160 @@ class _CustomTextFormField1State extends State<CustomTextFormField1> {
|
||||
obscureText = widget.isInputPassword;
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GlassmorphicContainer(
|
||||
width: double.infinity,
|
||||
height: 50,
|
||||
borderRadius: 8,
|
||||
blur: 10,
|
||||
alignment: Alignment.bottomCenter,
|
||||
border: 0.8,
|
||||
linearGradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
const Color(0xFFffffff).withOpacity(0.1),
|
||||
const Color(0xFFFFFFFF).withOpacity(0.05),
|
||||
],
|
||||
stops: [
|
||||
0.1,
|
||||
1,
|
||||
]),
|
||||
borderGradient: const LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
Color(0xff3A3A3A),
|
||||
Color(0xFF3A3A3A),
|
||||
],
|
||||
),
|
||||
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: 'manrope'),
|
||||
|
||||
// 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),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
: 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);
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class CustomTextFormField3 extends StatefulWidget {
|
||||
const CustomTextFormField3({
|
||||
Key? key,
|
||||
this.validator,
|
||||
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.maxlines = 1,
|
||||
this.texttype,
|
||||
this.inputFormatters,
|
||||
this.onInput,
|
||||
this.onTap,
|
||||
this.suffixIcon,
|
||||
}) : super(key: key);
|
||||
|
||||
final dynamic 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 Function(String)? onInput;
|
||||
final VoidCallback? onTap;
|
||||
final Widget? suffixIcon;
|
||||
|
||||
@override
|
||||
State<CustomTextFormField3> createState() => _CustomTextFormField3State();
|
||||
}
|
||||
|
||||
class _CustomTextFormField3State extends State<CustomTextFormField3> {
|
||||
late bool obscureText;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
obscureText = widget.isInputPassword;
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return TextFormField(
|
||||
@@ -211,23 +365,21 @@ class _CustomTextFormField1State extends State<CustomTextFormField1> {
|
||||
autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||
obscureText: obscureText,
|
||||
controller: widget.textEditingController,
|
||||
|
||||
decoration: InputDecoration(
|
||||
contentPadding: const EdgeInsets.symmetric(
|
||||
vertical: 15,
|
||||
horizontal: 14,
|
||||
),
|
||||
hintText: widget.hintText,
|
||||
prefixIconColor: widget.prefixIconColor,
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(8.r),
|
||||
borderSide: const BorderSide(color: Color(0XFF3A3A3A), width: 1),
|
||||
borderSide: BorderSide(color: const Color(0xFF3A3A3A), width: 1),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(8.r),
|
||||
borderSide: const BorderSide(color: Color(0XFF3A3A3A), width: 1),
|
||||
borderSide: BorderSide(color: const Color(0xFF3A3A3A), width: 1),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(8.r),
|
||||
borderSide: const BorderSide(color: Color(0XFF3A3A3A), width: 1),
|
||||
borderSide: BorderSide(color: const Color(0xFF3A3A3A), width: 1),
|
||||
),
|
||||
errorBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
@@ -237,9 +389,13 @@ class _CustomTextFormField1State extends State<CustomTextFormField1> {
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
borderSide: const BorderSide(color: Colors.red, width: 1),
|
||||
),
|
||||
|
||||
hintStyle: TextStyle(
|
||||
fontSize: 16.sp, fontFamily: "manrope", color: Colors.white),
|
||||
prefixIconColor: widget.prefixIconColor,
|
||||
fontSize: 16.sp,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w400,
|
||||
fontFamily: 'manrope'),
|
||||
|
||||
// ignore: prefer_null_aware_operators
|
||||
prefixIcon: widget.leadingIcon == null ? null : widget.leadingIcon!,
|
||||
suffixIcon: widget.isInputPassword
|
||||
@@ -271,16 +427,18 @@ class _CustomTextFormField1State extends State<CustomTextFormField1> {
|
||||
: widget.suffixIcon == null
|
||||
? null
|
||||
: widget.suffixIcon!,
|
||||
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;
|
||||
},
|
||||
// validator: widget.validator ??
|
||||
// (value) {
|
||||
// if (value == null || value.isEmpty) {
|
||||
// return "Empty value";
|
||||
// }
|
||||
// return null;
|
||||
// },
|
||||
inputFormatters: widget.inputFormatters,
|
||||
onChanged: (value) {
|
||||
widget.onInput?.call(value);
|
||||
|
||||
Reference in New Issue
Block a user