HybridImage.asset constructor
HybridImage.asset(})
Factory for HybridImage that returns a widget with an asset image for both svg and other image types.
assetPath
is the local path of the image and is required.
Implementation
factory HybridImage.asset(
String assetPath, {
Key? key,
double? width,
double? height,
BoxFit fit = BoxFit.contain,
AlignmentGeometry alignment = Alignment.center,
}) =>
HybridImage._(
key: key,
type: HybridImageType.asset,
assetPath: assetPath,
width: width,
height: height,
fit: fit,
alignment: alignment,
);