Skip to content

Change MockPlatformInterfaceMixin to be a mixin #123241

@gabrielgarciagava

Description

@gabrielgarciagava

Use case

When writing Plugin tests, MockPlatformInterfaceMixin is provided to be able to mock PlatformInterface.
However, MockPlatformInterfaceMixin is defined as a class, which conflicts with linter rule prefer_mixin (https://dart-lang.github.io/linter/lints/prefer_mixin.html)

Proposal

Change MockPlatformInterfaceMixin from class to mixin

mixin MockPlatformInterfaceMixin implements PlatformInterface {}

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: tests"flutter test", flutter_test, or one of our testsc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterp: plugin_platform_interfacePlugin platform infrastructurepackageflutter/packages repository. See also p: labels.r: fixedIssue is closed as already fixed in a newer versionteam-ecosystemOwned by Ecosystem teamtriaged-ecosystemTriaged by Ecosystem team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions