fix textfield width
This commit is contained in:
parent
3d1976d776
commit
7d663f3b96
1 changed files with 172 additions and 167 deletions
|
|
@ -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> {
|
|||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue