fileIcon method
Assuming the string is a file name, this function returns the corresponding icon for the filetype.
Here the icon for an image will be returned
Icon(
'example.jpg'.fileIcon(),
color: ZdsColors.green,
size: 24.0,
semanticLabel: 'Text to announce in accessibility modes',
)
If the string does not contain a file type, or contains an unrecognized filetype, ZdsIcons.file_o will be returned.
Implementation
IconData fileIcon() {
return _resolveFileIcon(this);
}