migrating...

This commit is contained in:
Joshua Burman
2025-04-15 15:29:55 -04:00
parent bdc4fee8c2
commit de22d62432
22 changed files with 17610 additions and 1873 deletions

View File

@ -6,7 +6,23 @@ ImageProvider findMediaByType(List<MediaItem> media, MediaType type) {
Image image;
if (found.isNotEmpty) {
image = Image.network(found.first.reference);
image = Image.network('https://test.com/image.jpg', loadingBuilder:
(BuildContext context, Widget child, ImageChunkEvent? loadingProgress) {
print('loading');
print(loadingProgress);
if (loadingProgress == null) return child;
return Center(
child: CircularProgressIndicator(
value: loadingProgress.expectedTotalBytes != null
? loadingProgress.cumulativeBytesLoaded /
loadingProgress.expectedTotalBytes!
: null,
),
);
}, errorBuilder: (context, error, stackTrace) {
print('error');
return Image.asset('assets/images/placeholder.jpg');
});
} else {
// Element is not found
image = Image.asset('assets/images/placeholder.jpg');