Skip to content

Check flutter_test for cross imports #187528

Description

@justinmc

The flutter_test package should not import Material or Cupertino. One problem that this has caused is given in flutter/packages@79aecdd. By importing flutter/material.dart and checking is Tooltip, the find.byTooltip method in flutter_test is not usable in material_ui. Its Tooltip is different from the on in flutter/flutter, so that check always returns false.

We already have an analyzer tool that checks for cross imports in our tests (check_tests_cross_imports.dart). We should expand it to also check flutter_test.

Currently it looks like there are only 3 violations in flutter_test, but having this analyzer check will also be valuable to prevent regressions in the future.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions