Update ADOutlinedTextField

This commit is contained in:
Ashita Prasad
2024-12-09 03:49:09 +05:30
parent 66f81a9a34
commit f7b2ebc0b4

View File

@ -5,6 +5,10 @@ class ADOutlinedTextField extends StatelessWidget {
const ADOutlinedTextField({ const ADOutlinedTextField({
super.key, super.key,
this.keyId, this.keyId,
this.readOnly = false,
this.enabled,
this.maxLines = 1,
this.expands = false,
this.initialValue, this.initialValue,
this.textStyle, this.textStyle,
this.textColor, this.textColor,
@ -21,6 +25,11 @@ class ADOutlinedTextField extends StatelessWidget {
}); });
final String? keyId; final String? keyId;
final bool readOnly;
final bool? enabled;
final int? maxLines;
final bool expands;
final bool? isDense;
final String? initialValue; final String? initialValue;
final TextStyle? textStyle; final TextStyle? textStyle;
final Color? textColor; final Color? textColor;
@ -31,7 +40,6 @@ class ADOutlinedTextField extends StatelessWidget {
final Color? fillColor; final Color? fillColor;
final Color? focussedBorderColor; final Color? focussedBorderColor;
final Color? enabledBorderColor; final Color? enabledBorderColor;
final bool? isDense;
final void Function(String)? onChanged; final void Function(String)? onChanged;
final ColorScheme? colorScheme; final ColorScheme? colorScheme;
@ -40,6 +48,10 @@ class ADOutlinedTextField extends StatelessWidget {
var clrScheme = colorScheme ?? Theme.of(context).colorScheme; var clrScheme = colorScheme ?? Theme.of(context).colorScheme;
return TextFormField( return TextFormField(
key: keyId != null ? Key(keyId!) : null, key: keyId != null ? Key(keyId!) : null,
readOnly: readOnly,
enabled: enabled,
maxLines: maxLines,
expands: expands,
initialValue: initialValue, initialValue: initialValue,
style: textStyle ?? style: textStyle ??
kCodeStyle.copyWith( kCodeStyle.copyWith(