Update textfield_outlined.dart

This commit is contained in:
Ashita Prasad
2024-12-09 04:21:40 +05:30
parent f7b2ebc0b4
commit 8339c58e7e

View File

@ -5,6 +5,7 @@ class ADOutlinedTextField extends StatelessWidget {
const ADOutlinedTextField({ const ADOutlinedTextField({
super.key, super.key,
this.keyId, this.keyId,
this.controller,
this.readOnly = false, this.readOnly = false,
this.enabled, this.enabled,
this.maxLines = 1, this.maxLines = 1,
@ -25,6 +26,7 @@ class ADOutlinedTextField extends StatelessWidget {
}); });
final String? keyId; final String? keyId;
final TextEditingController? controller;
final bool readOnly; final bool readOnly;
final bool? enabled; final bool? enabled;
final int? maxLines; final int? maxLines;
@ -48,6 +50,7 @@ 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,
controller: controller,
readOnly: readOnly, readOnly: readOnly,
enabled: enabled, enabled: enabled,
maxLines: maxLines, maxLines: maxLines,