Add previews for CupertinoIcons#71853
Add previews for CupertinoIcons#71853fluttergithubbot merged 9 commits intoflutter:masterfrom guidezpl:icons-updates
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat. Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
| @@ -21,11 +21,11 @@ import 'package:flutter/widgets.dart'; | |||
| /// cupertino_icons: ^1.0.0 | |||
There was a problem hiding this comment.
To reviewer(s), everything after line 1077 is automatically generated and does not require review
| /// This is the same icon as [battery_100], [battery_charging] and [battery_75_percent] in cupertino_icons 1.0.0+. | ||
| static const IconData battery_full = IconData(0xf113, fontFamily: iconFont, fontPackage: iconFontPackage); | ||
|
|
||
| /// A 75% charged battery. | ||
| /// <i class='cupertino-icons md-36'>battery_100</i> — cupertino icon for a 75% charged battery. |
There was a problem hiding this comment.
There is no battery_75 in the new icon font
There was a problem hiding this comment.
I'll double check for all your comments, but same thing. The new icon font seems to have collapsed certain icons, so we use the new name for the icon
dev/docs/assets/cupertino-icons.css
Outdated
| font-family: 'Cupertino Icons'; | ||
| font-style: normal; | ||
| font-weight: 400; | ||
| src: url("https://flutter.github.io/cupertino_icons/assets/CupertinoIcons.ttf") format("truetype"); |
There was a problem hiding this comment.
should this be a local file?
i.e. when we push cupertino_icons: 2.0.0 and the user's pubspec has ^1.0.0, wouldn't this show the wrong preview?
There was a problem hiding this comment.
It looks like the relative link in https://flutter.github.io/cupertino_icons/css/icons.css works. Removed
| @@ -47,15 +47,15 @@ class CupertinoIcons { | |||
| // We need to leave them as-is with the same codepoints for backward | |||
| // compatibility with cupertino_icons <0.1.3. | |||
|
|
|||
| /// A thin left chevron. | |||
| /// <i class='cupertino-icons md-36'>chevron_left</i> — Cupertino icon for a thin left chevron. | |||
There was a problem hiding this comment.
Picked up some regex skills to avoid doing this too manually!
|
That's awesome! Great work |
Description
Add icon previews for CupertinoIcons in the API docs like material Icons have. Do so by introducing a new .css asset.
Before: https://api.flutter.dev/flutter/cupertino/CupertinoIcons-class.html

After:
Also
Related Issues
Closes #45097
Tests
No tests, documentation only.
Checklist
Before you create this PR, confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.///).flutter analyze --flutter-repo) does not report any problems on my PR.Breaking Change
Did any tests fail when you ran them? Please read Handling breaking changes.