8000 [CP: 3.32] [Widget Inspector] Update on-device inspector button to ge… · flutter/flutter@673806f · GitHub
[go: up one dir, main page]

Skip to content

Commit 673806f

Browse files
authored
[CP: 3.32] [Widget Inspector] Update on-device inspector button to generic unicode icon (#169092)
### Issue Link: What is the link to the issue this cherry-pick is addressing? #168846 ### Changelog Description: Explain this cherry pick in one line that is accessible to most Flutter developers. See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples This cherry pick fixes an issue where some users would see a question mark instead of the appropriate icon in the widget inspector button which toggles select-mode on/off. ### Impact Description: Users who don't have `cupertino_icons` as a dependency in their pubspec will see a question mark in one of the widget inspector buttons. <img width="169" alt="Screenshot 2025-05-19 at 12 50 15 PM" src="https://github.com/user-attachments/assets/40cd01c9-f8a6-407d-9d1b-303bc1516d62" /> ### Workaround: Is there a workaround for this issue? Yes, add `cupertino_icons` package to user's pubspec. ### Risk: What is the risk level of this cherry-pick? Low ### Test Coverage: Are you confident that your fix is well-tested by automated tests? This was tested manually, there are no screenshot tests for this. However, this is only a UI change and not a behavior change. ### Validation Steps: What are the steps to validate that this fix works? 1. Run an app that doesn't have `cupertino_icons` in its pubspec 2. Open Flutter DevTools > Inspector 3. Enable select widget mode 4. Should not see a ? on any of the buttons
1 parent be698c4 commit 673806f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

packages/flutter/lib/src/cupertino/app.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -568,9 +568,9 @@ class _CupertinoAppState extends State<CupertinoApp> {
568568
return _CupertinoInspectorButton.toggle(
569569
onPressed: onPressed,
570570
semanticLabel: semanticLabel,
571-
// This icon is also used for the Material-styled button and for DevTools.
572-
// It should be updated in all 3 places if changed.
573-
icon: CupertinoIcons.cursor_rays,
571+
// This unicode icon is also used for the Material-styled button and for
572+
// DevTools. It should be updated in all 3 places if changed.
573+
icon: const IconData(0x1F74A),
574574
toggledOn: selectionOnTapEnabled,
575575
);
576576
}

packages/flutter/lib/src/material/app.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -971,9 +971,9 @@ class _MaterialAppState extends State<MaterialApp> {
971971
return _MaterialInspectorButton.toggle(
972972
onPressed: onPressed,
973973
semanticLabel: semanticLabel,
974-
// This icon is also used for the Cupertino-styled button and for DevTools.
975-
// It should be updated in all 3 places if changed.
976-
icon: CupertinoIcons.cursor_rays,
974+
// This unicode icon is also used for the Cupertino-styled button and for
975+
// DevTools. It should be updated in all 3 places if changed.
976+
icon: const IconData(0x1F74A),
977977
isDarkTheme: _isDarkTheme(context),
978978
toggledOn: selectionOnTapEnabled,
979979
);

0 commit comments

Comments
 (0)
0