Dart Keywords

Dart Keywords are the reserve words that have special meaning for the compiler. It cannot be used as the variable name, class name, or function name. Keywords are case sensitive; they must be written as they are defined.  There are 61 keywords in the Dart. Some of them are common, you may be already familiar and few are different. Below is the list of the given Dart keywords.

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

In the above list of keywords, we have a few keywords which are marked with the superscript(1,2 and 3). Following, we are defining the reason for superscript.

  • Subscript 1 - These keywords are called contextual keywords. They have special meaning and used in particular places.
  • Subscript 2 - These keywords are called built-in identifiers. These types of keywords are used to porting of JavaScript code for Dart, these keywords are treated as a valid identifier, but they cannot be used in the class name function name, or import prefixes.
  • Subscript 3 - These are newly added keyword related to the asynchrony

We will explain these keywords in detail in the upcoming tutorials.


Next TopicDart Data Types




Latest Courses