Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
mvanbeusekom committed Apr 29, 2024
2 parents f7e9672 + c7ffe16 commit 11f4f6f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class ImageLoader implements platform.ImageLoader {
yield decoded;
}
}
} on Object catch (e) {
} on Object {
// Depending on where the exception was thrown, the image cache may not
// have had a chance to track the key in the cache at all.
// Schedule a microtask to give the cache a chance to add the key.
Expand Down
3 changes: 3 additions & 0 deletions cached_network_image_web/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## [1.2.0] - 2024-04-29
* Replace deprecated `webOnlyInstantiateImageCodecFromUrl` to `createImageCodecFromUrl` from `dart:ui_web`

## [1.1.1] - 2023-12-31
* Removed errorListener from ImageLoader interface

Expand Down
7 changes: 4 additions & 3 deletions cached_network_image_web/lib/cached_network_image_web.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ library cached_network_image_web;
import 'dart:async';
import 'dart:typed_data';
import 'dart:ui' as ui;
import 'dart:ui_web';

import 'package:cached_network_image_platform_interface'
'/cached_network_image_platform_interface.dart' as platform
Expand Down Expand Up @@ -137,7 +138,7 @@ class ImageLoader implements platform.ImageLoader {
yield decoded;
}
}
} on Object catch (e) {
} on Object {
// Depending on where the exception was thrown, the image cache may not
// have had a chance to track the key in the cache at all.
// Schedule a microtask to give the cache a chance to add the key.
Expand All @@ -155,7 +156,7 @@ class ImageLoader implements platform.ImageLoader {
) {
final resolved = Uri.base.resolve(url);
// ignore: undefined_function
return ui.webOnlyInstantiateImageCodecFromUrl(
return createImageCodecFromUrl(
resolved,
chunkCallback: (int bytes, int total) {
chunkEvents.add(
Expand All @@ -165,7 +166,7 @@ class ImageLoader implements platform.ImageLoader {
),
);
},
) as Future<ui.Codec>;
);
}
}

Expand Down
2 changes: 1 addition & 1 deletion cached_network_image_web/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: cached_network_image_web
description: Web implementation of CachedNetworkImage
version: 1.1.1
version: 1.2.0
homepage: https://github.com/Baseflow/flutter_cached_network_image

environment:
Expand Down

0 comments on commit 11f4f6f

Please sign in to comment.