ImageWidget constructor
const
ImageWidget({
- Key? key,
- required String path,
- ImageSourceType sourceType = ImageSourceType.network,
- double width = double.infinity,
- double height = 200,
- BoxFit fit = BoxFit.cover,
- double borderRadius = 14,
- Color? backgroundColor,
- Widget? errorWidget,
- bool isShimmer = false,
- SpinKitAnimationType spinKitType = SpinKitAnimationType.doubleBounce,
- Color? placeholderColor,
- double placeholderSize = 40,
- VoidCallback? onSuccess,
- void onError(
- Object error,
- 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,
});