ProKitSvg constructor
const
ProKitSvg({
- Key? key,
- required String assetName,
- double? width,
- double? height,
- Color? color,
- BoxFit? fit = BoxFit.contain,
- AlignmentGeometry alignment = Alignment.center,
- Widget? placeholder,
- 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,
});