VectorGraphic constructor

const VectorGraphic({
  1. Key? key,
  2. required BytesLoader loader,
  3. double? width,
  4. double? height,
  5. BoxFit fit = BoxFit.contain,
  6. AlignmentGeometry alignment = Alignment.center,
  7. String? semanticsLabel,
  8. bool excludeFromSemantics = false,
  9. Clip clipBehavior = Clip.hardEdge,
  10. WidgetBuilder? placeholderBuilder,
  11. VectorGraphicsErrorWidget? errorBuilder,
  12. ColorFilter? colorFilter,
  13. Animation<double>? opacity,
  14. bool clipViewbox = true,
  15. bool matchTextDirection = false,
})

A widget that displays a vector graphics created via a VectorGraphicsCodec.

If matchTextDirection is set to true, the picture will be flipped horizontally in TextDirection.rtl contexts.

The semanticsLabel can be used to identify the purpose of this picture for screen reading software.

If excludeFromSemantics is true, then semanticLabel will be ignored.

See VectorGraphic.

Implementation

const VectorGraphic({
  super.key,
  required this.loader,
  this.width,
  this.height,
  this.fit = BoxFit.contain,
  this.alignment = Alignment.center,
  this.semanticsLabel,
  this.excludeFromSemantics = false,
  this.clipBehavior = Clip.hardEdge,
  this.placeholderBuilder,
  this.errorBuilder,
  this.colorFilter,
  this.opacity,
  this.clipViewbox = true,
  this.matchTextDirection = false,
}) : strategy = RenderingStrategy.raster;