Search⌘ K
AI Features

Data Types

Explore the fundamentals of data types in Dart programming. Understand the difference between value and reference types, learn about default values and literals, and how Dart treats all data types as objects. This lesson prepares you to use variables and data effectively for Flutter development.

What are data types?

The data type of an item or variable is an attribute that tells us what kind of data that variable can have.

Data types can be found all around us; numbers, alphabets, or characters which are classified based on the similar properties they share.

Dart’s built-in data types

The Dart language has special support for the following types:

  • Numbers
  • Strings
  • Booleans
  • Lists
  • Sets
  • Maps
  • Runes
  • Symbols
svg viewer

The focus of this chapter will be numbers, strings, and booleans. Lists, sets, and maps are topics for another chapter. Runes and symbols are beyond the scope of ...