Running newest library (1.1.1) and newest Flutter, it produces error:
Error: The method 'CachedNetworkImageProvider.load' has fewer positional arguments than those of overridden method 'ImageProvider.load'
It seems to be related to changes from PR https://github.com/flutter/flutter/pull/41415
I also have this problem.
Got the same error, but running flutter version 1.10.14 is a temporary fix for that problem.
I am also facing this issue on production and development app
../../.pub-cache/hosted/pub.dartlang.org/cached_network_image-1.1.1/lib/src/cached_network_image_provider.dart:42:24: Error: The method 'CachedNetworkImageProvider.load' has fewer positional arguments than those of overridden method 'ImageProvider.load'.
[ ] ImageStreamCompleter load(CachedNetworkImageProvider key) {
[ ] ^
[ ] ../../Library/flutter/packages/flutter/lib/src/painting/image_provider.dart:403:24: Context: This is the overridden method ('load').
[ ] ImageStreamCompleter load(T key, DecoderCallback decode);
[ ] ^
[+8201 ms] Exception: Errors during snapshot creation: null
[ ] #0 KernelSnapshot.build (package:flutter_tools/src/build_system/targets/dart.dart:225:7)
[ ]
[ ] #1 _BuildInstance._invokeInternal (package:flutter_tools/src/build_system/build_system.dart:526:25)
[ ]
[ ] #2 _BuildInstance.invokeTarget.
[ ] #3 new Future.sync (dart:async/future.dart:224:31)
[ ] #4 AsyncMemoizer.runOnce (package:async/src/async_memoizer.dart:43:45)
[ ] #5 _BuildInstance.invokeTarget (package:flutter_tools/src/build_system/build_system.dart:481:21)
[ ]
[ ]
[ ] #6 BuildSystem.build (package:flutter_tools/src/build_system/build_system.dart:419:36)
[ ] #7 _AsyncAwaitCompleter.start (dart:async-patch/async_patch.dart:43:6)
[ ] #8 BuildSystem.build (package:flutter_tools/src/build_system/build_system.dart:400:28)
[ ] #9 buildWithAssemble (package:flutter_tools/src/bundle.dart:172:48)
[ ] #10 _AsyncAwaitCompleter.start (dart:async-patch/async_patch.dart:43:6)
[ ] #11 buildWithAssemble (package:flutter_tools/src/bundle.dart:148:31)
[ ] #12 BundleBuilder.build (package:flutter_tools/src/bundle.dart:85:13)
[ ] #13 _AsyncAwaitCompleter.start (dart:async-patch/async_patch.dart:43:6)
[ ] #14 BundleBuilder.build (package:flutter_tools/src/bundle.dart:58:21)
[ ] #15 BuildBundleCommand.runCommand (package:flutter_tools/src/commands/build_bundle.dart:126:25)
[ ] #16 _AsyncAwaitCompleter.start (dart:async-patch/async_patch.dart:43:6)
[ ] #17 BuildBundleCommand.runCommand (package:flutter_tools/src/commands/build_bundle.dart:97:42)
[ ] #18 FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:557:18)
[ ] #19 _asyncThenWrapperHelper.
[ ] #20 _rootRunUnary (dart:async/zone.dart:1132:38)
[ ] #21 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
[ ] #22 _FutureListener.handleValue (dart:async/future_impl.dart:137:18)
[ ] #23 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:678:45)
[ ] #24 Future._propagateToListeners (dart:async/future_impl.dart:707:32)
[ ] #25 Future._completeWithValue (dart:async/future_impl.dart:522:5)
[ ] #26 Future._asyncComplete.
[ ] #27 _rootRun (dart:async/zone.dart:1124:13)
[ ] #28 _CustomZone.run (dart:async/zone.dart:1021:19)
[ ] #29 _CustomZone.runGuarded (dart:async/zone.dart:923:7)
[ ] #30 _CustomZone.bindCallbackGuarded.
[ ] #31 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
[ ] #32 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
[ ] #33 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:116:13)
[ ] #34 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:173:5)
[ ] Failed to build bundle.
Same issue
The problematic commit got reverted and the new PR which relands the changes doesn't change the API so this can be closed I think.
Relanding seems to change the API:
https://github.com/flutter/flutter/commit/3bbf54d79fceab8e20d4e43954ed00f52a3591fb
same
Flutter (Channel master, v1.10.15-pre.148, on Mac OS X 10.14.6 18G103, locale zh-Hans-CN) same
I published a quick fix for this as 2.0.0-rc. Wil remove the -rc tag when this flutter version reaches stable. I added a minimum SDK version of 1.10.15-pre.148 as @virskor mentioned that version and I have .151. I couldn't really find the version where this change was introduced.
Thanks for the quick fix @renefloor ! Do you have a buymeacoffee page? Would be happy to send you some coffee your way :-)
@lifenautjoe I just see your message now, but you are free to buy me a coffee through https://www.paypal.me/renefloor
I'll have a look at more user friendly donate pages :)
I published a quick fix for this as 2.0.0-rc. Wil remove the -rc tag when this flutter version reaches stable. I added a minimum SDK version of 1.10.15-pre.148 as @virskor mentioned that version and I have .151. I couldn't really find the version where this change was introduced.
@renefloor I am not getting what needs to do here? I just switched dev channel to master channel got The method 'CachedNetworkImageProvider.load' has fewer positional arguments than those of overridden method 'ImageProvider.load' this error. Thanks
I get "flutter_map 0.7.3 depends on cached_network_image ^1.1.0". So using 2.0.0-rc is not an option for me. In 1.1.3 the error persists.
Since cached_network_image is not the only dependency I'm using, would it be an option to release a 1.1.4-rc @renefloor ?
you can switch to stable flutter channel and it should help for now.
Most helpful comment
I published a quick fix for this as
2.0.0-rc. Wil remove the -rc tag when this flutter version reaches stable. I added a minimum SDK version of 1.10.15-pre.148 as @virskor mentioned that version and I have .151. I couldn't really find the version where this change was introduced.