Skip to content

Commit

Permalink
fix: adding image loader to content image
Browse files Browse the repository at this point in the history
  • Loading branch information
pavanpodila committed Sep 24, 2024
1 parent 7d09f73 commit 43c6e00
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions packages/system/vyuh_feature_system/lib/ui/content_image.dart
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,18 @@ class ContentImage extends StatelessWidget {
} else {
return Image(
image: provider,
errorBuilder: (final context, final __, final ___) =>
vyuh.widgetBuilder.imagePlaceholder(
loadingBuilder:
(final context, final child, final loadingProgress) {
return loadingProgress == null
? child
: vyuh.widgetBuilder.imagePlaceholder(context);
},
errorBuilder: (final context, final error, final stackTrace) =>
vyuh.widgetBuilder.errorView(
context,
width: imageWidth,
height: imageHeight,
title: 'Image loading error',
error: error,
stackTrace: stackTrace,
),
width: imageWidth,
height: imageHeight,
Expand Down

0 comments on commit 43c6e00

Please sign in to comment.