VectorGraphic constructor
const
VectorGraphic({
- Key? key,
- required BytesLoader loader,
- double? width,
- double? height,
- BoxFit fit = BoxFit.contain,
- AlignmentGeometry alignment = Alignment.center,
- String? semanticsLabel,
- bool excludeFromSemantics = false,
- Clip clipBehavior = Clip.hardEdge,
- WidgetBuilder? placeholderBuilder,
- VectorGraphicsErrorWidget? errorBuilder,
- ColorFilter? colorFilter,
- Animation<
double> ? opacity, - bool clipViewbox = true,
- 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;