loading

Dart Keywords

Reserve words with specific meaning for the compiler are called dart keywords. It is not permitted to be used as the name of a class, function, or variable. It is necessary to write keywords exactly as described because they are case sensitive. The Dart contains 61 keywords. A few of them are unique, while the most are probably well-known to you already. The list of the provided Dart keywords is shown below.

abstract2elseimport2super
as2enuminswitch
assertexport2interface2sync1
async1extendsisthis
await3extension2library2throw
breakexternal2mixin2true
casefactorynewtry
catchfalsenulltypedef2
classfinalon1var
constfinallyoperator2void
continueforpart2while
covarient2Function2rethrowwith
defaultget2returnyield3
deffered2hide1set2 
doifshow1 
dynamic2implements2static2 

A few keywords (1, 2, and 3) in the list of keywords above are indicated by the superscript. We are going to define the superscript’s purpose in the following.

  • Subscript 1: Contextual keywords are what these terms refer to. They are utilized in specific locations and have unique meanings.
  • Subscript 2: We refer to these terms as built-in identifiers. These keywords can be used as legitimate identifiers when migrating JavaScript code for Dart, however they cannot be used as import prefixes or in class names, functions, or names of functions.
  • Subscript 3: New keywords associated with the asynchrony

In the future tutorials, we will go into further detail about these keywords.

Share this Doc

Dart Keywords

Or copy link

Explore Topic