memorySvg function
Widget
memorySvg(
- Uint8List bytes, {
- double? width,
- double? height,
- required BoxFit fit,
- required WidgetBuilder error,
An SVG image from bytes — a data: URL's, or a download's.
Implementation
Widget memorySvg(
Uint8List bytes, {
double? width,
double? height,
required BoxFit fit,
required WidgetBuilder error,
}) => !looksLikeSvg(bytes)
? Builder(builder: error)
: SvgPicture.memory(
normalizeSvgText(bytes),
width: width,
height: height,
fit: fit,
errorBuilder: (context, _, _) => error(context),
);