📦 Packages
Deal with name conflicts when importing packages
Namespace packages
The easiest way to deal with name conflicts is to use a namespace package.
packages.dart
import 'somewhere.dart' as External;
Exclude code from a package
Exclude code from a package with the hide
keyword.
packages.dart
import 'somewhere.dart' hide Circle;
Isolate code from a package
Import individual classes from a package with the show
keyword.
packages.dart
import 'somewhere.dart' show Rectangle;