removeNonAlphaNumeric method

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

Removes all characters that are not letters or numbers.

Implementation

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