Single-line text input; accept edits through its model or callback.
TxTextBox
| Parameter | Type | Default | Meaning |
|---|---|---|---|
| controller | TextEditingController? | null | External text controller; the application disposes it. |
| initialValue | String? | null | Starting value in uncontrolled mode. |
| onChanged | ValueChanged<String>? | null | Callback for changed; see the signature for arguments and return type. |
| onValueChanged | ValueChanged<TxValueChange<String>>? | null | Reports value; update controlled state in the callback. |
| label | String? | null | Label or accessible name. |
| placeholder | String? | null | Hint for an empty input. |
| disabled | bool | false | Disables interaction. |
| readOnly | bool | false | Prevents value changes. |
| required | bool | false | Marks a required input. |
| isValid | bool | true | Controls error presentation; does not perform validation. |
| validationMessage | String | 'Bitte Eingabe prüfen.' | Error message when isValid is false. |
| obscureText | bool | false | Obscures text input. |
| keyboardType | TextInputType? | null | Requested on-screen keyboard type. |
| focusNode | FocusNode? | null | External focus controller. |
import 'package:flutter/material.dart';
import 'package:tecexpress/tecexpress.dart';
Widget example() {
var text = '';
return StatefulBuilder(
builder: (context, setState) => TxTextBox(label: 'Name', initialValue: 'Alex', onChanged: (v) => setState(() => text = v)),
);
}