ziofat / material_design_icons_flutter

The Material Design Icons (https://materialdesignicons.com/) Icon pack available as set of Flutter Icons.
MIT License
167 stars 32 forks source link

Add icon in comments to be able to preview it #49

Closed lukaskurz closed 1 year ago

lukaskurz commented 2 years ago

Would be cool, if we could use the same logic that the inbuilt material icons use to display the icon in the autocomplete feature of the IDE.

/// <i class="material-icons-round md-36">timer_off</i> &#x2014; material icon named "timer off" (round).
static const IconData timer_off_rounded = IconData(0xf023b, fontFamily: 'MaterialIcons');

/// <i class="material-icons-outlined md-36">timer_off</i> &#x2014; material icon named "timer off" (outlined).
static const IconData timer_off_outlined = IconData(0xf449, fontFamily: 'MaterialIcons');

/// <i class="material-icons md-36">tips_and_updates</i> &#x2014; material icon named "tips and updates".
static const IconData tips_and_updates = IconData(0xf058d, fontFamily: 'MaterialIcons');

Like this:

image

lublak commented 1 year ago

this would be very helpfull for users of vscode

ziofat commented 1 year ago

It is not possible, because VSCode does not accept extra css file injected to documentation.

The offical icons can be previewd is because the "Dart-Code" extension transfer the comments to images.

I can add these comments but it will only work on pub.dev