name hin text take null, ifg null then dont display hint

This commit is contained in:
2025-06-09 14:11:31 +02:00
parent 39ea6566f5
commit c286635d85

View File

@@ -9,7 +9,7 @@ class MihTextFormField extends StatefulWidget {
final Color inputColor;
final TextEditingController controller;
final bool? hasError;
final String hintText;
final String? hintText;
final double? borderRadius;
final bool? multiLineInput;
final bool? readOnly;
@@ -98,11 +98,13 @@ class _MihTextFormFieldState extends State<MihTextFormField> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
Visibility(
visible: widget.hintText != null,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
widget.hintText,
widget.hintText ?? "",
textAlign: TextAlign.left,
style: TextStyle(
color: widget.fillColor,
@@ -124,6 +126,7 @@ class _MihTextFormFieldState extends State<MihTextFormField> {
),
],
),
),
const SizedBox(height: 4),
FormField<String>(
initialValue: widget.controller.text,