Numeric input with bounds and steps. An empty input produces null.
TxNumberBox
| Parameter | Type | Default | Meaning |
|---|---|---|---|
| value | num? | null | Current input/option value. |
| initialValue | num? | null | Starting value in uncontrolled mode. |
| onChanged | ValueChanged<num?>? | null | Callback for changed; see the signature for arguments and return type. |
| onValueChanged | ValueChanged<TxValueChange<num?>>? | null | Reports value; update controlled state in the callback. |
| label | String? | null | Label or accessible name. |
| placeholder | String? | null | Hint for an empty input. |
| min | num? | null | Lower allowed bound. |
| max | num? | null | Upper allowed bound. |
| step | num | 1 | Step size; milliseconds for Vue date ranges. |
| disabled | bool | false | Disables interaction. |
| readOnly | bool | false | Prevents value changes. |
| isValid | bool | true | Controls error presentation; does not perform validation. |
| validationMessage | String | 'Bitte Eingabe prüfen.' | Error message when isValid is false. |
import 'package:flutter/material.dart';
import 'package:tecexpress/tecexpress.dart';
Widget example() {
num? amount = 10;
return StatefulBuilder(
builder: (context, setState) => TxNumberBox(value: amount, min: 0, max: 100, onChanged: (v) => setState(() => amount = v)),
);
}