ImageViewTemplate constructor

ImageViewTemplate({
  1. required BuildContext context,
  2. required double widthNeeded,
  3. required double heightNeeded,
  4. VoidCallback? onPressed,
  5. AssetImage? assetAspectRatio,
  6. AssetImage? assetBackground,
  7. String? urlAspectRation,
  8. String? urlBackground,
  9. double? radiusAll,
  10. double? radiusTopLeft,
  11. double? radiusTopRight,
  12. double? radiusBottomLeft,
  13. double? radiusBottomRight,
  14. Color? colorBackground,
  15. EdgeInsets? padding,
  16. EdgeInsets? margin,
  17. double? opacity,
  18. Alignment? gravityLayoutAlignment,
  19. bool? responsiveAuto,
  20. 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;

}