Repository navigation
Update flutter-add-widget-preview skill to match Flutter 3.47 Widget Previewer docs - #246
Conversation
There was a problem hiding this comment.
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.
…ng and null safety
|
@johnpryan - thank you for the comments! Agreed on both and that'll be helpful for the script that generated these suggestions going forward. |
Updates
skills/flutter-add-widget-preview/SKILL.mdto align with recent updates to the Flutter Widget Previewer documentation (flutter/website#13704 and flutter/website#13861):PreviewThemeDataexample to extendPreviewThemeData(@override Widget apply(BuildContext context, Widget child)) and callbuilder.build()instead of the removedPreviewThemeData(materialLight: ..., materialDark: ...)constructor.@Previewparameter reference (name,group,size,textScaleFactor,wrapper,theme,brightness,localizations) and notes.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!!