mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
![]() This PR introduces two new widgets: - `DisableWidgetInspectorScope`, which hides its children from the widget inspector - `EnableWidgetInspectorScope`, which makes its children available to the widget inspector These widgets are used to inform the `WidgetInspectorService`'s `InspectorSerializationDelegate` when it should be omitting `DiagnosticableNodes` from the response when building the root widget tree for the inspector. This functionality is meant to be used by developer tooling and packages that want to prevent unnecessary implementation details from polluting the inspector and possibly confusing end users. This change also includes some minor updates to the Widget Preview scaffolding template to hide the scaffold's implementation details and only show details for the previews defined by the user. Part of https://github.com/flutter/flutter/issues/166423 **Widget Previewer Demo** <img width="1606" alt="image" src="https://github.com/user-attachments/assets/eb23160e-01c5-413f-b1d2-97985ced9ef9" /> |
||
---|---|---|
.. | ||
lib | ||
pubspec.yaml.tmpl | ||
README.md.tmpl |
# Widget Preview Scaffold This project is generated by `flutter widget-preview` and is used to host Widgets to be previewed in the widget previewer.