fromSI static method
Get a ScalableImage by reading a pre-compiled .si
file.
These files can be produced with
dart run jovial_svg:svg_to_si
or dart run jovial_svg:avd_to_si
.
Pre-compiled files load about an order of magnitude faster.
currentColor
, if set, will set the currentColor value of the
ScalableImage instance returned. Note, however, that if the same
image is used with more than one currentColor
value, it's best to
not set it here, and instead set it in the widget, e.g. with the
currentColor
parameter of ScalableImageWidget.fromSISource.
See also ScalableImage.currentColor.
Implementation
static ScalableImageSource fromSI(AssetBundle bundle, String key,
{Color? currentColor}) =>
_SIBundleSource(bundle, key, currentColor);