ProKitSvg constructor

const ProKitSvg({
  1. Key? key,
  2. required String assetName,
  3. double? width,
  4. double? height,
  5. Color? color,
  6. BoxFit? fit = BoxFit.contain,
  7. AlignmentGeometry alignment = Alignment.center,
  8. Widget? placeholder,
  9. VoidCallback? onPressed,
})

Creates an instance of ProKitSvg.

Parameters:

  • assetName: The path to the SVG asset.
  • width: The width of the SVG image.
  • height: The height of the SVG image.
  • color: The color to apply to the SVG image.
  • fit: How the SVG should be fitted.
  • alignment: The alignment of the SVG.
  • placeholder: The widget to display while the SVG is loading.

Implementation

const ProKitSvg({
  super.key,
  required this.assetName,
  this.width,
  this.height,
  this.color,
  this.fit = BoxFit.contain,
  this.alignment = Alignment.center,
  this.placeholder,
  this.onPressed,
});