Programming Search⌘K

Dart errors and diagnostics, page 4 of 5

The error codes and warnings of Dart, with the message that each one prints and what causes it. This page has 979 cards.

The class '…' shouldn't be used as a mixin constraint because it is sealed, and any class mixing in this mixin must have '…' as a superclass. mixin_on_sealed_class

Try composing with this class, or refer to its documentation for more information.

Code
mixin_on_sealed_class
Severity
warning
Message
The class '{}' shouldn't be used as a mixin constraint because it is sealed, and any class mixing in this mixin must have '{}' as a superclass.

Source: github.com, dart.dev. JSON record. This entry is a card. Help write this page.

'…' is an unsupported type for native fields. Native fields only support pointers, arrays or numeric and compound types. native_field_invalid_type

Try changing the type in the `@Native` annotation to a numeric FFI type, a pointer, array, or a compound class.

Code
native_field_invalid_type
Severity
error
Message
'{}' is an unsupported type for native fields. Native fields only support pointers, arrays or numeric and compound types.

Source: github.com, dart.dev. JSON record. This entry is a card. Help write this page.

The class '…' can't extend '…' because '…' only has factory constructors (no generative constructors), and '…' has at least one generative constructor. no_generative_constructors_in_superclass

Try implementing the class instead, adding a generative (not factory) constructor to the superclass '…', or a factory constructor to the subclass.

Code
no_generative_constructors_in_superclass
Severity
error
Message
The class '{}' can't extend '{}' because '{}' only has factory constructors (no generative constructors), and '{}' has at least one generative constructor.

Source: github.com, dart.dev. JSON record. This entry is a card. Help write this page.

Missing concrete implementations of '…', '…', '…', '…', and … more. non_abstract_class_inherits_abstract_member

Try implementing the missing methods, or make the class abstract.

Code
non_abstract_class_inherits_abstract_member
Severity
error
Message
Missing concrete implementations of '{}', '{}', '{}', '{}', and {} more.
Message
Missing concrete implementations of '{}', '{}', '{}', and '{}'.
Message
Missing concrete implementation of '{}'.
Message
Missing concrete implementations of '{}', '{}', and '{}'.
Message
Missing concrete implementations of '{}' and '{}'.

Source: github.com, dart.dev. JSON record. This entry is a card. Help write this page.

An extension type parameter can't be used in a non-covariant position of its representation type. non_covariant_type_parameter_position_in_representation_type

Try removing the type parameters from function parameter types and type parameter bounds.

Code
non_covariant_type_parameter_position_in_representation_type
Severity
error
Message
An extension type parameter can't be used in a non-covariant position of its representation type.

Source: github.com, dart.dev. JSON record. This entry is a card. Help write this page.

The type '…' isn't exhaustively matched by the switch cases since it doesn't match the pattern '…'. non_exhaustive_switch_expression

Try adding a wildcard pattern or cases that match '…'.

Code
non_exhaustive_switch_expression
Severity
error
Message
The type '{}' isn't exhaustively matched by the switch cases since it doesn't match the pattern '{}'.
Message
The enum '{}' isn't exhaustively matched by the switch cases because some of the enum constants are private.

Source: github.com, dart.dev. JSON record. This entry is a card. Help write this page.

The type '…' isn't exhaustively matched by the switch cases since it doesn't match the pattern '…'. non_exhaustive_switch_statement

Try adding a default case or cases that match '…'.

Code
non_exhaustive_switch_statement
Severity
error
Message
The type '{}' isn't exhaustively matched by the switch cases since it doesn't match the pattern '{}'.
Message
The enum '{}' isn't exhaustively matched by the switch cases because some of the enum constants are private.

Source: github.com, dart.dev. JSON record. This entry is a card. Help write this page.

The unnamed constructor of superclass '…' (called by the default constructor of '…') must be a generative constructor, but factory found. non_generative_implicit_constructor

Try adding an explicit constructor that has a different superinitializer or changing the superclass constructor '…' to not be a factory constructor.

Code
non_generative_implicit_constructor
Severity
error
Message
The unnamed constructor of superclass '{}' (called by the default constructor of '{}') must be a generative constructor, but factory found.

Source: github.com, dart.dev. JSON record. This entry is a card. Help write this page.

Can't invoke 'asFunction' because the function signature '…' for the pointer isn't a valid C function signature. non_native_function_type_argument_to_pointer

Try changing the function argument in 'NativeFunction' to only use NativeTypes.

Code
non_native_function_type_argument_to_pointer
Severity
error
Message
Can't invoke 'asFunction' because the function signature '{}' for the pointer isn't a valid C function signature.

Source: github.com, dart.dev. JSON record. This entry is a card. Help write this page.

The `<activity>` element should be allowed to be resized to allow users to take advantage of the multi-window environment on Chrome OS. non_resizable_activity

Consider declaring the corresponding activity element with `resizableActivity="true"` attribute.

Code
non_resizable_activity
Severity
warning
Message
The `<activity>` element should be allowed to be resized to allow users to take advantage of the multi-window environment on Chrome OS

Source: github.com. JSON record. This entry is a card. Help write this page.

The type '…' isn't a valid type argument for '…'. The type argument must be a native integer, 'Float', 'Double', 'Pointer', or subtype of 'Struct', 'Union', or 'AbiSpecificInteger'. non_sized_type_argument

Try using a native integer, 'Float', 'Double', 'Pointer', or subtype of 'Struct', 'Union', or 'AbiSpecificInteger'.

Code
non_sized_type_argument
Severity
error
Message
The type '{}' isn't a valid type argument for '{}'. The type argument must be a native integer, 'Float', 'Double', 'Pointer', or subtype of 'Struct', 'Union', or 'AbiSpecificInteger'.

Source: github.com, dart.dev. JSON record. This entry is a card. Help write this page.

1 positional argument expected, but 0 found. not_enough_positional_arguments

Try adding the missing argument.

Code
not_enough_positional_arguments
Severity
error
Message
1 positional argument expected, but 0 found.
Message
{} positional arguments expected, but {} found.
Message
1 positional argument expected by '{}', but 0 found.
Message
{} positional arguments expected by '{}', but {} found.

Source: github.com, dart.dev. JSON record. This entry is a card. Help write this page.

The field doesn't override an inherited getter or setter. override_on_non_overriding_member

Try updating this class to match the superclass, or removing the override annotation.

Code
override_on_non_overriding_member
Severity
warning
Message
The field doesn't override an inherited getter or setter.
Message
The getter doesn't override an inherited getter.
Message
The method doesn't override an inherited method.
Message
The setter doesn't override an inherited setter.

Source: github.com, dart.dev. JSON record. This entry is a card. Help write this page.

Positional super parameters can't be used when the super constructor invocation has a positional argument. positional_super_formal_parameter_with_positional_argument

Try making all the positional parameters passed to the super constructor be either all super parameters or all normal parameters.

Code
positional_super_formal_parameter_with_positional_argument
Severity
error
Message
Positional super parameters can't be used when the super constructor invocation has a positional argument.

Source: github.com, dart.dev. JSON record. This entry is a card. Help write this page.