EN_raw_diagnostics_no_raw_types

  •                   Toolschevron_right
    
  •                   Diagnosticschevron_right
    
  •                   no_raw_types
    
                no_raw_types
    

Details about the 'no_raw_types' diagnostic produced by the Dart analyzer.

                more_vert
  •                       copyCopy link
    
  •                       bug_reportReport issue
    
                  toggle_on
                  Lint rule
    

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:

                dart
class C<T> {}
​
C c = C<int>();
                content_copy

              Common fixes

              #

Provide explicit type arguments:

                dart
class C<T> {}
​
C<int> c = C<int>();
                content_copy

Was this page's content helpful?

                    thumb_up
                    thumb_down

                Unless stated otherwise, the documentation on this site reflects Dart 3.13.3. Report an issue.