capitalize property

VText get capitalize

Capitalizes the first letter.

Implementation

VText get capitalize {
  if (data == null || data!.isEmpty) return this;
  final str = data!;
  final cap = str[0].toUpperCase() + str.substring(1);
  return VText(
    cap,
    style: _style,
    align: _align,
    maxLines: _maxLines,
    overflow: _overflow,
    textScaler: _textScaler,
  );
}