ImageWidget constructor

const ImageWidget({
  1. Key? key,
  2. required String path,
  3. ImageSourceType sourceType = ImageSourceType.network,
  4. double width = double.infinity,
  5. double height = 200,
  6. BoxFit fit = BoxFit.cover,
  7. double borderRadius = 14,
  8. Color? backgroundColor,
  9. Widget? errorWidget,
  10. bool isShimmer = false,
  11. SpinKitAnimationType spinKitType = SpinKitAnimationType.doubleBounce,
  12. Color? placeholderColor,
  13. double placeholderSize = 40,
  14. VoidCallback? onSuccess,
  15. void onError(
    1. Object error,
    2. StackTrace? stackTrace
    )?,
})

Implementation

const ImageWidget({
  super.key,
  required this.path,
  this.sourceType = ImageSourceType.network,
  this.width = double.infinity,
  this.height = 200,
  this.fit = BoxFit.cover,
  this.borderRadius = 14,
  this.backgroundColor,
  this.errorWidget,
  this.isShimmer = false,
  this.spinKitType = SpinKitAnimationType.doubleBounce,
  this.placeholderColor,
  this.placeholderSize = 40,
  this.onSuccess,
  this.onError,
});