tCapitalization property

TextCapitalization get tCapitalization

tCapitalization

The TextCapitalization setting for a FormifyTextField widget.

If the keyboardType of the widget is set to TextInputType.name, this property returns TextCapitalization.words to capitalize the first letter of each word. Otherwise, it returns the value of the textCapitalization property.

This property simplifies the management of the textCapitalization property based on the keyboardType.

Implementation

TextCapitalization get tCapitalization {
  if (keyboardType == TextInputType.name) {
    return TextCapitalization.words;
  }
  return textCapitalization;
}