|
|
|
@ -57,7 +57,9 @@ class _AppTextFieldCustomState extends State<AppTextFieldCustom> {
|
|
|
|
return Column(
|
|
|
|
return Column(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
height: widget.height != 0 && widget.maxLines == 1 ? widget.height + 8 : null,
|
|
|
|
height: widget.height != 0 && widget.maxLines == 1
|
|
|
|
|
|
|
|
? widget.height + 8
|
|
|
|
|
|
|
|
: null,
|
|
|
|
decoration: widget.hasBorder
|
|
|
|
decoration: widget.hasBorder
|
|
|
|
? TextFieldsUtils.containerBorderDecoration(
|
|
|
|
? TextFieldsUtils.containerBorderDecoration(
|
|
|
|
Color(0Xffffffff),
|
|
|
|
Color(0Xffffffff),
|
|
|
|
@ -92,13 +94,16 @@ class _AppTextFieldCustomState extends State<AppTextFieldCustom> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
widget.dropDownText == null
|
|
|
|
widget.dropDownText == null
|
|
|
|
? Container(
|
|
|
|
? Container(
|
|
|
|
height: widget.height != 0 && widget.maxLines == 1 ? widget.height - 22 : null,
|
|
|
|
height:
|
|
|
|
child: TextField(
|
|
|
|
widget.height != 0 && widget.maxLines == 1
|
|
|
|
|
|
|
|
? widget.height - 22
|
|
|
|
|
|
|
|
: null,
|
|
|
|
|
|
|
|
child: TextField(
|
|
|
|
textAlign: projectViewModel.isArabic
|
|
|
|
textAlign: projectViewModel.isArabic
|
|
|
|
? TextAlign.right
|
|
|
|
? TextAlign.right
|
|
|
|
: TextAlign.left,
|
|
|
|
: TextAlign.left,
|
|
|
|
decoration:
|
|
|
|
decoration: TextFieldsUtils
|
|
|
|
TextFieldsUtils.textFieldSelectorDecoration(
|
|
|
|
.textFieldSelectorDecoration(
|
|
|
|
widget.hintText, null, true),
|
|
|
|
widget.hintText, null, true),
|
|
|
|
style: TextStyle(
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: SizeConfig.textMultiplier * 1.7,
|
|
|
|
fontSize: SizeConfig.textMultiplier * 1.7,
|
|
|
|
@ -106,13 +111,17 @@ class _AppTextFieldCustomState extends State<AppTextFieldCustom> {
|
|
|
|
color: Color(0xFF575757),
|
|
|
|
color: Color(0xFF575757),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
controller: widget.controller,
|
|
|
|
controller: widget.controller,
|
|
|
|
keyboardType: widget.inputType?? (widget.maxLines == 1 ? TextInputType.text : TextInputType.multiline),
|
|
|
|
keyboardType: widget.inputType ??
|
|
|
|
|
|
|
|
(widget.maxLines == 1
|
|
|
|
|
|
|
|
? TextInputType.text
|
|
|
|
|
|
|
|
: TextInputType.multiline),
|
|
|
|
enabled: widget.enabled,
|
|
|
|
enabled: widget.enabled,
|
|
|
|
minLines: widget.minLines,
|
|
|
|
minLines: widget.minLines,
|
|
|
|
maxLines: widget.maxLines,
|
|
|
|
maxLines: widget.maxLines,
|
|
|
|
inputFormatters: widget.inputFormatters != null
|
|
|
|
inputFormatters:
|
|
|
|
? widget.inputFormatters
|
|
|
|
widget.inputFormatters != null
|
|
|
|
: [],
|
|
|
|
? widget.inputFormatters
|
|
|
|
|
|
|
|
: [],
|
|
|
|
onChanged: (value) {
|
|
|
|
onChanged: (value) {
|
|
|
|
setState(() {});
|
|
|
|
setState(() {});
|
|
|
|
if (widget.onChanged != null) {
|
|
|
|
if (widget.onChanged != null) {
|
|
|
|
@ -120,7 +129,7 @@ class _AppTextFieldCustomState extends State<AppTextFieldCustom> {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
: AppText(
|
|
|
|
: AppText(
|
|
|
|
widget.dropDownText,
|
|
|
|
widget.dropDownText,
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|