elCaribe app - customization and branding

This commit is contained in:
2025-12-12 19:09:42 -04:00
parent 9e5d0d8ebf
commit ba7deac9f3
402 changed files with 31833 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
import 'package:flutter/material.dart';
import 'package:news/utils/uiUtils.dart';
class CustomNetworkImage extends StatelessWidget {
final String networkImageUrl;
final double? width, height;
final BoxFit? fit;
final bool? isVideo;
final Widget? errorBuilder;
const CustomNetworkImage({super.key, required this.networkImageUrl, this.width, this.height, this.fit, this.isVideo, this.errorBuilder});
@override
Widget build(BuildContext context) {
return FadeInImage.assetNetwork(
fadeInDuration: const Duration(milliseconds: 150),
fadeOutCurve: Curves.bounceOut,
image: networkImageUrl,
width: width ?? 100,
height: height ?? 100,
fit: fit ?? BoxFit.cover,
imageErrorBuilder: (context, error, stackTrace) {
return Image.asset(UiUtils.getPlaceholderPngPath(), width: width ?? 100, height: height ?? 100);
},
placeholderErrorBuilder: (context, error, stackTrace) {
return Image.asset(UiUtils.getPlaceholderPngPath(), width: width ?? 100, height: height ?? 100);
},
placeholderFit: fit ?? BoxFit.cover,
placeholder: UiUtils.getPlaceholderPngPath());
}
}