svgFromBytes function

Widget svgFromBytes(
  1. Uint8List bytes, {
  2. Alignment alignment = Alignment.center,
  3. bool excludeFromSemantics = false,
  4. BoxFit fit = BoxFit.cover,
  5. double? height,
  6. Key? key,
  7. String? package,
  8. WidgetBuilder? placeholderBuilder,
  9. String? semanticsLabel,
  10. double? width,
})

Instantiates a widget rendering an SVG picture from an Uint8List.

Either the width and height arguments should be specified, or the widget should be placed in a context setting layout constraints tightly. Otherwise, the image dimensions will change as the image is loaded, which will result in ugly layout changes.

Implementation

Widget svgFromBytes(
  Uint8List bytes, {
  Alignment alignment = Alignment.center,
  bool excludeFromSemantics = false,
  BoxFit fit = BoxFit.cover,
  double? height,
  Key? key,
  String? package,
  WidgetBuilder? placeholderBuilder,
  String? semanticsLabel,
  double? width,
}) => throw UnimplementedError();