Skip to content

Add a getter for PictureRecorder instance created by PaintingContext #169990

@MohiuddinM

Description

@MohiuddinM

Use case

I'm developing a Flutter debugging package that provides advanced rendering insights and helps identify issues and bottlenecks, but I've encountered a limitation: the PictureRecorder instance used by PaintingContext is private with no public getter to access it.

I propose to add a getter so any 3rd party packages can access this instance.

Proposal

The code change can be simple as:

PictureRecorder get recorder {
    if (_recorder == null) {
      _startRecording();
    }
    assert(_currentLayer != null);
    return _recorder!;
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectc: proposalA detailed proposal for a change to Flutterframeworkflutter/packages/flutter repository. See also f: labels.r: fixedIssue is closed as already fixed in a newer versionteam-frameworkOwned by Framework teamtriaged-frameworkTriaged by Framework team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions