text property

String get text

current input content

Implementation

String get text {
  if (!_onceLock) {
    throw StateError(
        'Cannot get text before TextEditingController has been initialized');
  }

  // remove all non-digit characters for phone input
  if (inputType == BadPhoneInput) {
    return _textEditingController.text.replaceAll(RegExp(r'\D'), '');
  }

  return _textEditingController.text;
}