Built-in types

The Dart language has special support for the following types:

  • numbers
  • strings
  • booleans
  • lists (also known as arrays)
  • sets
  • maps
  • runes (for expressing Unicode characters in a string)
  • symbols

You can initialize an object of any of these special types using aliteral. For example, 'this is a string' is a string literal,and true is a boolean literal.

Because every variable in Dart refers to an object—an instance of aclass—you can usually use constructors to initialize variables. Someof the built-in types have their own constructors. For example, you canuse the Map() constructor to create a map.