init method
void
init()
Initializes the TextPainter for rendering the icon.
Implementation
void init() {
try {
textPainter = TextPainter(
text: TextSpan(
text: String.fromCharCode(renderinstruction.codePoint),
style: TextStyle(
fontSize: renderinstruction.getBitmapHeight().toDouble(),
fontFamily: renderinstruction.fontFamily,
color: Color(renderinstruction.getBitmapColor()),
shadows: null,
),
),
textDirection: TextDirection.ltr,
);
textPainter!.layout();
} catch (error) {
_log.warning("Error loading iconData ${renderinstruction.bitmapSrc}", error);
}
}