no_ raw_ types
Details about the 'no_raw_types' diagnostic produced by the Dart analyzer.
The generic type '{0}' should have explicit type arguments but doesn't.
Description
#The analyzer produces this diagnostic when a generic type is used without explicit type arguments, meaning it is a raw type.
Example
#
The following code produces this diagnostic because the generic class C
is used without a type argument:
class C<T> {}
C c = C<int>();
Common fixes
#Provide explicit type arguments:
class C<T> {}
C<int> c = C<int>();
Unless stated otherwise, the documentation on this site reflects Dart 3.12.2. Report an issue.