0PricingLogin
Dart Academy · Lesson

Imports, Exports, and Libraries

Organize and re-export your code.

What an Import Does

An import pulls another file or package into your code so you can use its classes and functions. Every Dart file starts with them. 📥

import 'dart:math';

Importing the Core SDK

Built-in libraries use the dart: prefix. For example, dart:math gives you sqrt and Random without installing anything.

import 'dart:convert';

All lessons in this course

  1. Anatomy of pubspec.yaml
  2. Adding Dependencies With dart pub
  3. Imports, Exports, and Libraries
  4. Version Constraints and the Lockfile
← Back to Dart Academy