Skip to content

avoid_late_keyword - ignored_types not working as expected. #157

@arthurbcd

Description

@arthurbcd

I'm currently using:

    - avoid_late_keyword:
      allow_initialized: true
      ignored_types:
        - AnimationController
        - StreamSubscription
        - Timer

Timer is working fine and AnimationController too, but StreamSubscription is not working and here is why:

checkedTypes: {StreamSubscription<dynamic>, Object}

The code is trying to compare StreamSubscription with StreamSubscription<dynamic> strings, so It will always fail.

I suggest creating a pattern to ignore the subtype of the node type, effectively removing the <dynamic> part. Note that in some cases, the node type may have more than one subtype, but I believe a pattern for removing everything after < should be enough.

This is a really good package, by the way. Great job.

Metadata

Metadata

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