FileIcon class

A component that renders a file or folder icon based on a given filename or icon name.

It uses the Seti icon set (packaged internally) to determine the appropriate SVG icon path.

Constructors

FileIcon(String iconName, {String? classes, Map<String, String>? attributes})
Creates a FileIcon with a specific iconName.
const
FileIcon.forFile(String filename, {String? classes, Map<String, String>? attributes})
Creates a FileIcon matching the provided filename by resolving its extension or name.
factory

Properties

attributes → Map<String, String>?
Custom HTML attributes to apply to the rendered SVG element.
final
classes → String?
CSS classes to apply to the rendered SVG element.
final
hashCode → int
The hash code for this object.
no setterinherited
iconName → String
The name of the icon (e.g., seti:dart or seti:default).
final
isDefault → bool
Whether this is the default file icon.
no setter
isFolder → bool
Whether this is the default folder icon.
no setter
key → Key?
Controls how one component replaces another component in the tree.
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
svgPath → String?
The SVG path content of this icon.
no setter

Methods

build(BuildContext context) → Component
Describes the part of the user interface represented by this component.
createElement() → Element
Creates a StatelessElement to manage this component's location in the tree.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
shouldRebuild(covariant Component newComponent) → bool
Implement this method to determine whether a rebuild can be skipped.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Constants

defaultIcon → const FileIcon
A default file icon.
folderIcon → const FileIcon
A default folder icon.