Skip to content

Move mock_canvas to flutter_test package #59413

Closed

Description

@pingbird

Many widget tests in the flutter package use packages/flutter/test/rendering/mock_canvas.dart as a convenient method of validating painting behaviors. This library is fully documented yet can't be imported externally.

I would like to use this library for some tests, without having to copy its implementation to my project.

Proposal

The mock_canvas library should be moved to flutter_test, where it can be used from anywhere.

Activity

  1. added
    frameworkflutter/packages/flutter repository. See also f: labels.
    packageflutter/packages repository. See also p: labels.
    c: proposalA detailed proposal for a change to Flutter
    on Jun 15, 2020
  2. added
    P2Important issues not at the top of the work list
    on Jun 17, 2020
  3. jonahwilliams commented on Jun 3, 2022

    @jonahwilliams
    Contributor

    I think we could possibly break out that library, but we'd need to spend time to take a pass over the API and documentation

  4. removed their assignment
    on Oct 12, 2022
  5. added
    a: tests"flutter test", flutter_test, or one of our tests
    c: new featureNothing broken; request for a new capability
    on Jul 31, 2023
  6. self-assigned this
    on Jul 31, 2023
  7. github-actions commented on Aug 22, 2023

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  8. locked as resolved and limited conversation to collaborators on Aug 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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 Flutterframeworkflutter/packages/flutter repository. See also f: labels.packageflutter/packages repository. See also p: labels.team-ecosystemOwned by Ecosystem teamtriaged-ecosystemTriaged by Ecosystem teamwaiting for PR to land (fixed)A fix is in flight

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions