doc_ import_ cannot_ have_ combinators
Doc imports can't have show or hide combinators.
Description
#
The analyzer produces this diagnostic when a documentation import has one
or more
hide
or
show
combinators.
Using combinators isn't supported for documentation imports.
Example
#
The following code produces this diagnostic because the documentation
import has a
show
combinator:
/// @docImport 'package:meta/meta.dart' show max;
library;
Common fixes
#Remove the hide
and show
combinators:
/// @docImport 'package:meta/meta.dart';
library;
Unless stated otherwise, the documentation on this site reflects Dart 3.9.2. Page last updated on 2025-9-1. View source or report an issue.