getIcon static method
Implementation
static IconData getIcon(String extension) {
switch (extension) {
case 'mp3':
case 'wav':
{
return Icons.audio_file;
}
case 'pdf':
{
return Icons.picture_as_pdf;
}
case 'apk':
{
return Icons.android_rounded;
}
case 'jpg':
case 'jpeg':
case 'png':
{
return Icons.photo_rounded;
}
case 'mp4':
case 'webm':
case 'avi':
case 'mkv':
{
return Icons.video_file;
}
default:
{
return Icons.insert_drive_file_rounded;
}
}
}