Text Field
Single-line text input with validation support.
Installation
bash
flutter_studio add textfieldbash
flutter pub add flutter_studioUsage
Basic Text Field
dart
CustomTextField(
label: 'Email',
placeholder: 'Enter your email',
onChanged: (value) {
print(value);
},
)With Validation
dart
CustomTextField(
label: 'Email',
validator: (value) {
if (value?.isEmpty ?? true) {
return 'Email is required';
}
return null;
},
)API Reference
Properties
| Property | Type | Default | Description |
|---|---|---|---|
label | String? | null | Field label |
placeholder | String? | null | Placeholder text |
onChanged | ValueChanged? | null | Callback when value changes |
