Skip to content

[Flutter] [Session Replay] Widget Support - Checkbox: Add CheckboxRecorder to capture Checkbox widgets properly (cupertino checkbox included)#989

Open
JuanNaranjoDD wants to merge 7 commits intodevelopfrom
juan.naranjo/widget_support
Open

[Flutter] [Session Replay] Widget Support - Checkbox: Add CheckboxRecorder to capture Checkbox widgets properly (cupertino checkbox included)#989
JuanNaranjoDD wants to merge 7 commits intodevelopfrom
juan.naranjo/widget_support

Conversation

@JuanNaranjoDD
Copy link
Copy Markdown

@JuanNaranjoDD JuanNaranjoDD commented Apr 3, 2026

What and why?

Adds CheckboxRecorder, a new ElementRecorder implementation that captures Flutter Checkbox widgets in Session Replay. Without this recorder, checkboxes were matched by CustomPaintRecorder and rendered as a SRPlaceholderWireframe, showing a generic box with an × inside regardless of their actual state. This ensures checked, unchecked, and tristate states are faithfully represented in replays.

How?

CheckboxRecorder resolves the widget's visual properties (fill color, checkmark color, border, visual density) by walking the widget properties and theme fallback chain, matching Flutter's own rendering logic. It produces a single SRTextWireframe per checkbox: the box shape is rendered via shapeStyle/border, and the checkmark symbol (✓, —, or empty) is centered as its text. The subtree is ignored to prevent CustomPaintRecorder from double-capturing the inner CustomPaint.

Review checklist

  • This pull request has appropriate unit and / or integration tests
  • This pull request references a Github or JIRA issue — RUM-10251

@JuanNaranjoDD JuanNaranjoDD requested a review from a team as a code owner April 3, 2026 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant