toAlphaOnly method

String toAlphaOnly({
  1. bool allowSpace = false,
})

Removes all characters that are not letters (A-Z, a-z).

Implementation

// Replace all non-matching characters.
String toAlphaOnly({bool allowSpace = false}) =>
    replaceAll(allowSpace ? _alphaOnlyWithSpaceRegex : _alphaOnlyRegex, '');