fix textfield width
This commit is contained in:
@@ -84,7 +84,10 @@ class _MihTextFormFieldState extends State<MihTextFormField> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Theme(
|
||||
return SizedBox(
|
||||
width: widget.width,
|
||||
height: widget.height,
|
||||
child: Theme(
|
||||
data: Theme.of(context).copyWith(
|
||||
textSelectionTheme: TextSelectionThemeData(
|
||||
selectionColor: widget.inputColor.withValues(alpha: 0.3),
|
||||
@@ -136,8 +139,8 @@ class _MihTextFormFieldState extends State<MihTextFormField> {
|
||||
borderRadius:
|
||||
BorderRadius.circular(widget.borderRadius ?? 8.0),
|
||||
child: SizedBox(
|
||||
width: widget.width,
|
||||
height: widget.height,
|
||||
height:
|
||||
widget.height != null ? widget.height! - 25 : null,
|
||||
child: TextFormField(
|
||||
controller: widget.controller,
|
||||
cursorColor: widget.inputColor,
|
||||
@@ -146,8 +149,9 @@ class _MihTextFormFieldState extends State<MihTextFormField> {
|
||||
textAlignVertical: widget.multiLineInput == true
|
||||
? TextAlignVertical.top
|
||||
: TextAlignVertical.center,
|
||||
obscureText:
|
||||
widget.passwordMode == true ? _obscureText : false,
|
||||
obscureText: widget.passwordMode == true
|
||||
? _obscureText
|
||||
: false,
|
||||
expands: widget.passwordMode == true
|
||||
? false
|
||||
: (widget.multiLineInput ?? false),
|
||||
@@ -265,6 +269,7 @@ class _MihTextFormFieldState extends State<MihTextFormField> {
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user