IconData constructor
Creates icon data.
Rarely used directly. Instead, consider using one of the predefined icons like the Icons collection.
The fontFamily
argument is normally required when using custom icons.
e.g. When using a codePoint
from a CustomIcons
font
fonts:
- family: CustomIcons
fonts:
- asset: assets/fonts/CustomIcons.ttf
IconData
usages should specify fontFamily: 'CustomIcons'
.
The fontPackage
argument must be non-null when using a font family that
is included in a package. This is used when selecting the font.
Instantiating non-const instances of this class in your app will mean the app cannot be built in release mode with icon tree-shaking (it need to be explicitly opted out at build time). See staticIconProvider for more context.
Implementation
const IconData(
this.codePoint, {
this.fontFamily,
this.fontPackage,
this.matchTextDirection = false,
this.fontFamilyFallback,
});