flutter_cache_manager icon indicating copy to clipboard operation
flutter_cache_manager copied to clipboard

Invalid argument(s): No host specified in URI. Error thrown .

Open zhanzengyu opened this issue 1 year ago • 1 comments

🐛 Bug Report

Fatal Exception: io.flutter.plugins.firebase.crashlytics.FlutterError Invalid argument(s): No host specified in URI. Error thrown . _HttpClient.openUrl (dart:_http) IOClient.send (io_client.dart:88) HttpFileService.get (file_service.dart:37) WebHelper._download (web_helper.dart:115) WebHelper._updateFile (web_helper.dart:97) WebHelper._downloadOrAddToQueue (web_helper.dart:65)

Expected behavior

You can check whether url is valid

Reproduction steps

Configuration

Version: 3.3.1

Platform:

  • [x] :iphone: iOS
  • [x] :robot: Android

zhanzengyu avatar Jul 03 '24 06:07 zhanzengyu

我同样遇到了这个问题, 但是我的 issue 产生的原因是因为使用的组件库 cached_network_image, 在使用时, 虽然 cached_network_image 提供了 placeholder 参数, 但是对于传入的 imageurl 是否为 ‘’ 并没有明确的处理, 因此会抛出错误. 我的解决方法就是: 在使用的地方提前判断 image url 是否为 ‘’ 的处理

tangogithub321 avatar Jul 31 '24 01:07 tangogithub321