avdPictureStringDecoder method
Future<PictureInfo>
avdPictureStringDecoder(
- String raw,
- bool allowDrawingOutsideOfViewBox,
- ColorFilter? colorFilter,
- String key,
Decodes an Android Vector Drawable from a String to a PictureInfo object.
Implementation
Future<PictureInfo> avdPictureStringDecoder(
String raw,
bool allowDrawingOutsideOfViewBox,
ColorFilter? colorFilter,
String key,
) async {
final DrawableRoot avd = fromAvdString(raw, key);
return PictureInfo(
picture: avd.toPicture(
clipToViewBox: allowDrawingOutsideOfViewBox == true ? false : true,
colorFilter: colorFilter),
viewport: avd.viewport.viewBoxRect,
size: avd.viewport.size,
);
}