built_in_identifier_in_declaration
The built-in identifier '{0}' can't be used as a prefix name.
The built-in identifier '{0}' can't be used as a type name.
The built-in identifier '{0}' can't be used as a type parameter name.
The built-in identifier '{0}' can't be used as a typedef name.
The built-in identifier '{0}' can't be used as an extension name.
The built-in identifier '{0}' can't be used as an extension type name.
Description
#The analyzer produces this diagnostic when the name used in the declaration of a class, extension, mixin, typedef, type parameter, or import prefix is a built-in identifier. Built-in identifiers can't be used to name any of these kinds of declarations.
Example
#The following code produces this diagnostic because mixin
is a built-in identifier:
extension mixin on int {}
Common fixes
#Choose a different name for the declaration.
Unless stated otherwise, the documentation on this site reflects Dart 3.8.1. Page last updated on 2025-05-08. View source or report an issue.