utils/identifer library

Constants

asynchronyKeywords → const Set<String>
builtinKeywords → const Set<String>
contextualKeywords → const Set<String>
invalidIdentifiers → const Set<String>
List of keywords that can't be used as identifiers.
reservedKeywords → const Set<String>

Functions

convertToIdentifier(String identifer, {String prefix = 'a'}) String
Converts a string to a valid dart identifier. For example, by replacing invalid characters, and ensuring the string is prefixed with a letter or underscore.
isValidIdentifier(String identifer) bool
Returns true if this identifier is valid.
isValidVariableIdentifier(String identifer) bool
Returns true this is a valid variable name, that is, a dart identifier which is not a reserved keyword.