changhe editable to readonly

This commit is contained in:
2025-06-04 11:56:04 +02:00
parent 46e41d9c8b
commit 9bd56de170

View File

@@ -12,7 +12,7 @@ class MihTextFormField extends StatefulWidget {
final String hintText; final String hintText;
final double? borderRadius; final double? borderRadius;
final bool? multiLineInput; final bool? multiLineInput;
final bool? editable; final bool? readOnly;
final bool? passwordMode; final bool? passwordMode;
final bool? numberMode; final bool? numberMode;
final bool requiredText; final bool requiredText;
@@ -32,7 +32,7 @@ class MihTextFormField extends StatefulWidget {
required this.requiredText, required this.requiredText,
this.borderRadius, this.borderRadius,
this.multiLineInput, this.multiLineInput,
this.editable, this.readOnly,
this.passwordMode, this.passwordMode,
this.numberMode, this.numberMode,
this.validator, this.validator,
@@ -152,7 +152,7 @@ class _MihTextFormFieldState extends State<MihTextFormField> {
? false ? false
: (widget.multiLineInput ?? false), : (widget.multiLineInput ?? false),
maxLines: widget.passwordMode == true ? 1 : null, maxLines: widget.passwordMode == true ? 1 : null,
readOnly: widget.editable ?? false, readOnly: widget.readOnly ?? false,
keyboardType: widget.numberMode == true keyboardType: widget.numberMode == true
? TextInputType.number ? TextInputType.number
: null, : null,