dart:core library

Built-in types, collections,
and other core functionality for every Dart program.

This library is automatically imported.

Some classes in this library,
such as String and num,
support Dart's built-in data types.
Other classes, such as List and Map, provide data structures
for managing collections of objects.
And still other classes represent commonly used types of data
such as URIs, dates and times, and errors.

Numbers and booleans

int and double provide support for Dart's built-in numerical data types:
integers and double-precision floating point numbers, respectively.
An object of type bool is either true or false.
Variables of these types can be constructed from literals:

A Map is an unordered collection of key-value pairs.
Maps are sometimes called associative arrays because
maps associate a key to some value for easy retrieval.
Keys are unique.
Use a Map when you need to access objects
by a unique identifier.

In addition to these classes,
dart:core contains Iterable,
an interface that defines functionality
common in collections of objects.
Examples include the ability
to run a function on each element in the collection,
to apply a test to each element,
to retrieve an object, and to determine length.

Iterable is implemented by List and Set,
and used by Map for its keys and values.

For other kinds of collections, check out the
dart:collection library.

Date and time

Use DateTime to represent a point in time
and Duration to represent a span of time.

You can create DateTime objects with constructors
or by parsing a correctly formatted string.