File tree Expand file tree Collapse file tree 4 files changed +9
-5
lines changed
cached_network_image/lib/src/image_provider Expand file tree Collapse file tree 4 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ class ImageLoader implements platform.ImageLoader {
125
125
yield decoded;
126
126
}
127
127
}
128
- } on Object catch (e) {
128
+ } on Object {
129
129
// Depending on where the exception was thrown, the image cache may not
130
130
// have had a chance to track the key in the cache at all.
131
131
// Schedule a microtask to give the cache a chance to add the key.
Original file line number Diff line number Diff line change
1
+ ## [ 1.2.0] - 2024-04-29
2
+ * Replace deprecated ` webOnlyInstantiateImageCodecFromUrl ` to ` createImageCodecFromUrl ` from ` dart:ui_web `
3
+
1
4
## [ 1.1.1] - 2023-12-31
2
5
* Removed errorListener from ImageLoader interface
3
6
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ library cached_network_image_web;
4
4
import 'dart:async' ;
5
5
import 'dart:typed_data' ;
6
6
import 'dart:ui' as ui;
7
+ import 'dart:ui_web' ;
7
8
8
9
import 'package:cached_network_image_platform_interface'
9
10
'/cached_network_image_platform_interface.dart' as platform
@@ -137,7 +138,7 @@ class ImageLoader implements platform.ImageLoader {
137
138
yield decoded;
138
139
}
139
140
}
140
- } on Object catch (e) {
141
+ } on Object {
141
142
// Depending on where the exception was thrown, the image cache may not
142
143
// have had a chance to track the key in the cache at all.
143
144
// Schedule a microtask to give the cache a chance to add the key.
@@ -155,7 +156,7 @@ class ImageLoader implements platform.ImageLoader {
155
156
) {
156
157
final resolved = Uri .base .resolve (url);
157
158
// ignore: undefined_function
158
- return ui. webOnlyInstantiateImageCodecFromUrl (
159
+ return createImageCodecFromUrl (
159
160
resolved,
160
161
chunkCallback: (int bytes, int total) {
161
162
chunkEvents.add (
@@ -165,7 +166,7 @@ class ImageLoader implements platform.ImageLoader {
165
166
),
166
167
);
167
168
},
168
- ) as Future <ui. Codec > ;
169
+ );
169
170
}
170
171
}
171
172
Original file line number Diff line number Diff line change 1
1
name : cached_network_image_web
2
2
description : Web implementation of CachedNetworkImage
3
- version : 1.1.1
3
+ version : 1.2.0
4
4
homepage : https://github.com/Baseflow/flutter_cached_network_image
5
5
6
6
environment :
You can’t perform that action at this time.
0 commit comments