Dart Keywords
Keywords are the reserved words of a programming language, and they have a special meaning that comes defined by the language. These cannot be used as an identifier, and all these keywords are case-sensitive.
Whenever we use any keyword in our code, the lexical analysis phase of the compilation process returns a token associated with the keyword to a parser, which is then checked for validation.
There are 61 keywords in the Dart language. Here is the list of keywords offered by Dart:
abstract2 | else | import2 | super |
as2 | enum | in | switch |
assert | export2 | interface2 | sync1 |
async1 | extends | is | this |
await3 | extension2 | library2 | throw |
break | external2 | mixin2 | true |
case | factory | new | try |
catch | false | null | typedef2 |
class | final | on1 | var |
const | finally | operator2 | void |
continue | for | part2 | while |
covarient2 | Function2 | rethrow | with |
default | get2 | return | yield3 |
deffered2 | hide1 | set2 | |
do | if | show1 | |
dynamic2 | implements2 | static2 |
1. Keywords with subscript 1 are conceptual keywords that have special meaning only in specific places. They are valid identifiers everywhere.
2. Keywords with subscript 2 are built-in identifiers. These keywords are valid identifiers almost everywhere, except they can’t be used as a class or type name, or as import prefixes.
3. Keywords with subscript 3 are limited reserved words related to asynchrony support.