Skip to content

Update flutter-add-widget-preview skill to match Flutter 3.47 Widget Previewer docs - #246

Open
jesskuras wants to merge 2 commits into
mainfrom
sync/flutter-add-widget-preview
Open

jesskuras wants to merge 2 commits into
mainfrom
sync/flutter-add-widget-preview

Conversation

@jesskuras

@jesskuras jesskuras commented Oct 5, 2026 •

Copy link
Copy Markdown

Updates skills/flutter-add-widget-preview/SKILL.md to align with recent updates to the Flutter Widget Previewer documentation (flutter/website#13704 and flutter/website#13861):

  • Updates the IDE version requirement to Flutter 3.47+ (reflecting Widget Previewer stability in Flutter 3.47).
  • Updates the custom PreviewThemeData example to extend PreviewThemeData (@override Widget apply(BuildContext context, Widget child)) and call builder.build() instead of the removed PreviewThemeData(materialLight: ..., materialDark: ...) constructor.
  • Expands the @Preview parameter reference (name, group, size, textScaleFactor, wrapper, theme, brightness, localizations).
  • Adds guidance on preview search and filtering criteria (preview name, group name, containing script, and containing package), preview card controls, and .widget_preview/ build caching.

Note: This is AI-generated (I'm testing an automation to try to update skills based on doc updates). I looked at the suggestions and it seemed like a good update to make, but feel free to be harsh on it so I can improve it. Thanks!!

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the Flutter Widget Previewer documentation to include a new section on preview parameters, details on build caching, updated IDE support requirements, and instructions for searching, filtering, and controls. It also revises the code examples to demonstrate custom previews with PreviewThemeData and runtime transformations. Feedback on these changes suggests improving text readability by removing repetitive phrasing, handling potential null values for preview names to avoid displaying 'null' in the UI, and defensively using MediaQuery.maybePlatformBrightnessOf to prevent runtime exceptions when a MediaQuery ancestor is missing.

Comment thread skills/flutter-add-widget-preview/SKILL.md Outdated
Comment thread skills/flutter-add-widget-preview/SKILL.md
Comment thread skills/flutter-add-widget-preview/SKILL.md
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