Skip to content

Dart 3: InitDependency should not extend Type #324

Closed
@sunderee

Description

@sunderee

Going through the source code of get_it, I saw the following:

class InitDependency extends Type {}

If you were to bump the Dart SDK version constraint to the latest stable version of Dart, which is 3.0, the linter should warn you of the following: The class 'Type' can't be extended outside of its library because it's an interface class., which is true because Type is defined as an abstract interface class.

Of course, you can just ignore the invalid_use_of_type_outside_library rule itself, but I think it might be a good idea to migrate sometime in the future. I'm really not sure if this would work, but what about implementing Type instead? I don't have a deep insider knowledge of the library itself, so I could be completely wrong about that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions