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