t×tecexpressby TeKOcloud
DEv0.7.1
Editors & selection / FLUTTER

TxTextBox.

Interactive preview

Single-line text input; accept edits through its model or callback.

TxTextBox

ParameterTypeDefaultMeaning
controllerTextEditingController?nullExternal text controller; the application disposes it.
initialValueString?nullStarting value in uncontrolled mode.
onChangedValueChanged<String>?nullCallback for changed; see the signature for arguments and return type.
onValueChangedValueChanged<TxValueChange<String>>?nullReports value; update controlled state in the callback.
labelString?nullLabel or accessible name.
placeholderString?nullHint for an empty input.
disabledboolfalseDisables interaction.
readOnlyboolfalsePrevents value changes.
requiredboolfalseMarks a required input.
isValidbooltrueControls error presentation; does not perform validation.
validationMessageString'Bitte Eingabe prüfen.'Error message when isValid is false.
obscureTextboolfalseObscures text input.
keyboardTypeTextInputType?nullRequested on-screen keyboard type.
focusNodeFocusNode?nullExternal focus controller.
dart
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)),
  );
}