built_in_identifier_as_type
The built-in identifier '{0}' can't be used as a type.
Description
#The analyzer produces this diagnostic when a built-in identifier is used where a type name is expected.
Example
#The following code produces this diagnostic because import
can't be used
as a type because it's a built-in identifier:
dart
import<int> x;
Common fixes
#Replace the built-in identifier with the name of a valid type:
dart
List<int> x;
除非另有说明,文档之所提及适用于 Dart 3.7.3 版本,本页面最后更新时间: 2025-05-08。 查看文档源码 或者 报告页面问题。