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
- Anatomy of pubspec.yaml
- Adding Dependencies With dart pub
- Imports, Exports, and Libraries
- Version Constraints and the Lockfile