package_prefixed_library_names

Group: style

Maturity: stable

Linter v0.1.1

Since info is static, may be stale
corerecommendedflutter

View all Lint Rules

Using the Linter

DO prefix library names with the package name and a dot-separated path.

This guideline helps avoid the warnings you get when two libraries have the same name. Here are the rules we recommend:

For example, say the package name is my_package. Here are the library names for various files in the package:

GOOD:

// In lib/my_package.dart
library my_package;

// In lib/other.dart
library my_package.other;

// In lib/foo/bar.dart
library my_package.foo.bar;

// In example/foo/bar.dart
library my_package.example.foo.bar;

// In lib/src/private.dart
library my_package.src.private;