feat: add input validation to search, update agent card layout, and extend ProfileFormField with input constraints
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:real_estate_mobile/core/constants/app_colors.dart';
|
||||
|
||||
class ProfileFormField extends StatelessWidget {
|
||||
@@ -10,6 +11,8 @@ class ProfileFormField extends StatelessWidget {
|
||||
final TextCapitalization textCapitalization;
|
||||
final bool obscureText;
|
||||
final Widget? suffixIcon;
|
||||
final List<TextInputFormatter>? inputFormatters;
|
||||
final int? maxLength;
|
||||
|
||||
const ProfileFormField({
|
||||
super.key,
|
||||
@@ -21,6 +24,8 @@ class ProfileFormField extends StatelessWidget {
|
||||
this.textCapitalization = TextCapitalization.words,
|
||||
this.obscureText = false,
|
||||
this.suffixIcon,
|
||||
this.inputFormatters,
|
||||
this.maxLength,
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -53,6 +58,8 @@ class ProfileFormField extends StatelessWidget {
|
||||
keyboardType: keyboardType,
|
||||
textCapitalization: textCapitalization,
|
||||
obscureText: obscureText,
|
||||
inputFormatters: inputFormatters,
|
||||
maxLength: maxLength,
|
||||
textAlignVertical: TextAlignVertical.center,
|
||||
style: const TextStyle(
|
||||
fontFamily: 'SourceSerif4',
|
||||
@@ -62,6 +69,7 @@ class ProfileFormField extends StatelessWidget {
|
||||
),
|
||||
decoration: InputDecoration(
|
||||
isDense: true,
|
||||
counterText: '',
|
||||
contentPadding:
|
||||
const EdgeInsets.symmetric(horizontal: 12, vertical: 10),
|
||||
border: border,
|
||||
|
||||
Reference in New Issue
Block a user