createCompatVectorGraphic function

VectorGraphic createCompatVectorGraphic({
  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. RenderingStrategy strategy = RenderingStrategy.picture,
  15. bool clipViewbox = true,
  16. bool matchTextDirection = false,
})

A vector graphic/flutter_svg compatibility shim.

Implementation

VectorGraphic createCompatVectorGraphic({
  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,
  RenderingStrategy strategy = RenderingStrategy.picture,
  bool clipViewbox = true,
  bool matchTextDirection = false,
}) {
  return VectorGraphic._(
    key: key,
    loader: loader,
    width: width,
    height: height,
    fit: fit,
    alignment: alignment,
    semanticsLabel: semanticsLabel,
    excludeFromSemantics: excludeFromSemantics,
    clipBehavior: clipBehavior,
    placeholderBuilder: placeholderBuilder,
    errorBuilder: errorBuilder,
    colorFilter: colorFilter,
    opacity: opacity,
    strategy: strategy,
    clipViewbox: clipViewbox,
    matchTextDirection: matchTextDirection,
  );
}