ImageViewTemplate constructor
ImageViewTemplate({
- required BuildContext context,
- required double widthNeeded,
- required double heightNeeded,
- VoidCallback? onPressed,
- AssetImage? assetAspectRatio,
- AssetImage? assetBackground,
- String? urlAspectRation,
- String? urlBackground,
- double? radiusAll,
- double? radiusTopLeft,
- double? radiusTopRight,
- double? radiusBottomLeft,
- double? radiusBottomRight,
- Color? colorBackground,
- EdgeInsets? padding,
- EdgeInsets? margin,
- double? opacity,
- Alignment? gravityLayoutAlignment,
- bool? responsiveAuto,
- BoxFit? boxFitBackground,
Implementation
ImageViewTemplate( {
required this.context,
required double widthNeeded,
required double heightNeeded,
VoidCallback? this.onPressed,
AssetImage? this.assetAspectRatio, //src
AssetImage? this.assetBackground,
String? this.urlAspectRation, //src
String? this.urlBackground,
double? this.radiusAll ,
double? this.radiusTopLeft ,
double? this.radiusTopRight ,
double? this.radiusBottomLeft ,
double? this.radiusBottomRight ,
Color? this.colorBackground,
EdgeInsets? this.padding,
EdgeInsets? this.margin,
double? this.opacity,
Alignment? this.gravityLayoutAlignment,
bool? this.responsiveAuto,
BoxFit? this.boxFitBackground
}) {
// set value
width = widthNeeded ;
height = heightNeeded;
}