export_of_non_library
The exported library '{0}' can't have a part-of directive.
Description
#The analyzer produces this diagnostic when an export directive references a part rather than a library.
Example
#Given a file part.dart
containing
part of lib;
The following code produces this diagnostic because the file part.dart
is a part, and only libraries can be exported:
library lib;
export 'part.dart';
Common fixes
#Either remove the export directive, or change the URI to be the URI of the library containing the part.
Unless stated otherwise, the documentation on this site reflects Dart 3.7.3. Page last updated on 2025-05-08. View source or report an issue.