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 {
125125 yield decoded;
126126 }
127127 }
128- } on Object catch (e) {
128+ } on Object {
129129 // Depending on where the exception was thrown, the image cache may not
130130 // have had a chance to track the key in the cache at all.
131131 // 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+
14## [ 1.1.1] - 2023-12-31
25* Removed errorListener from ImageLoader interface
36
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ library cached_network_image_web;
44import 'dart:async' ;
55import 'dart:typed_data' ;
66import 'dart:ui' as ui;
7+ import 'dart:ui_web' ;
78
89import 'package:cached_network_image_platform_interface'
910 '/cached_network_image_platform_interface.dart' as platform
@@ -137,7 +138,7 @@ class ImageLoader implements platform.ImageLoader {
137138 yield decoded;
138139 }
139140 }
140- } on Object catch (e) {
141+ } on Object {
141142 // Depending on where the exception was thrown, the image cache may not
142143 // have had a chance to track the key in the cache at all.
143144 // Schedule a microtask to give the cache a chance to add the key.
@@ -155,7 +156,7 @@ class ImageLoader implements platform.ImageLoader {
155156 ) {
156157 final resolved = Uri .base .resolve (url);
157158 // ignore: undefined_function
158- return ui. webOnlyInstantiateImageCodecFromUrl (
159+ return createImageCodecFromUrl (
159160 resolved,
160161 chunkCallback: (int bytes, int total) {
161162 chunkEvents.add (
@@ -165,7 +166,7 @@ class ImageLoader implements platform.ImageLoader {
165166 ),
166167 );
167168 },
168- ) as Future <ui. Codec > ;
169+ );
169170 }
170171}
171172
Original file line number Diff line number Diff line change 11name : cached_network_image_web
22description : Web implementation of CachedNetworkImage
3- version : 1.1.1
3+ version : 1.2.0
44homepage : https://github.com/Baseflow/flutter_cached_network_image
55
66environment :
You can’t perform that action at this time.
0 commit comments