build method
- dynamic context,
- dynamic ref
Implementation
@override
Widget build(BuildContext context, WidgetRef ref) {
final mediaState = ref.watch(attachmentMediaStateProvider(attachment));
if (mediaState.mediaLoadingState.isLoading || mediaState.isDownloading) {
return loadingIndication(context);
} else if (mediaState.mediaFile == null) {
return imagePlaceholder(context, attachment, mediaState, ref);
} else {
return imageUI(context, mediaState);
}
}