file_icon
1.0.0, released 6 years ago by an unverified publisher
Widget that shows an icon based on a file name
WASM-ready
What it does
FileIcon renders an icon representing the file type inferred from the file name. It supports multiple platforms and is null‑safe.
AI-written summary of version 1.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need a quick visual indicator of file types in a list
- You want a lightweight, cross‑platform solution without custom icon assets
Skip it when
- You require highly custom icons or theming beyond the provided set
- You need to support dynamic icon sets that change at runtime
Strengths
- Simple API, no build_runner or code generation
- Null‑safe, works on all Flutter platforms
- Small dependency footprint
Weaknesses
- Limited to Seti UI icon set, no custom icons
- No support for color or style overrides beyond size
- Not a full icon library
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
import 'package:flutter/material.dart';
import 'package:file_icon/file_icon.dart';
class MyWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return FileIcon(
'main.dart',
size: 32,
);
}
}Alternatives
Packages that do the same job and could replace file_icon.
- syncfusion_flutter_datagrid
DataGrid widget for tabular data with editing, sorting, paging and export.
91Compare - app_badge_plus
Flutter plugin to set numeric badges on app icons for iOS, Android, and macOS
84Compare - iconsax_flutter
Flutter package providing a collection of Iconsax icons in multiple styles.
52Compare - solar_icons
A Flutter package providing 7000+ solar-themed icons in multiple styles.
72Compare