图像错误构建者无法在颤动中工作

发布于 2025-01-21 11:25:56 字数 1648 浏览 0 评论 0原文

我正在尝试列出网络图像列表。它一直在工作,直到我重新安装颤音为止。 这是代码,我尝试了cachednetworkimage,并且都有相同的错误。

ListTile(
  title: Text(MyNetowrk.currentChannels[index].name),
    leading: ClipRRect(
      borderRadius: BorderRadius.circular(25.0),
      child: FadeInImage.assetNetwork(
        fit: BoxFit.fill,
        placeholder:'assets/images/page.png', //kTransparentImage,
        image: MyNetowrk.channels[index].icon,
        imageErrorBuilder: (context, url, error) =>
          SizedBox(width: 200, child: new Icon(Icons.error)),
     ),
   ),
),

这是我遇到的错误:

/D:/APPS/flutter/.pub-cache/hosted/pub.dartlang.org/cached_network_image-3.2.0/lib/src/image_provider/multi_image_stream_completer.dart:152:22: Warning: Operand of null-aware operation '?.' has type 'SchedulerBinding' which excludes null.
- 'SchedulerBinding' is from 'package:flutter/src/scheduler/binding.dart' ('/D:/APPS/flutter/packages/flutter/lib/src/scheduler/binding.dart').
package:flutter/…/scheduler/binding.dart:1
    SchedulerBinding.instance?.scheduleFrameCallback(_handleAppFrame);
                     ^
/D:/APPS/flutter/.pub-cache/hosted/pub.dartlang.org/cached_network_image-3.2.0/lib/src/image_provider/cached_network_image_provider.dart:109:29: Warning: Operand of null-aware operation '?.' has type 'PaintingBinding' which excludes null.

- 'PaintingBinding' is from 'package:flutter/src/painting/binding.dart' ('/D:/APPS/flutter/packages/flutter/lib/src/painting/binding.dart').
package:flutter/…/painting/binding.dart:1
      () => PaintingBinding.instance?.imageCache?.evict(key),

它打开_network_image_io.dart文件并显示第120行。

I am trying to make a list of network images. It was working until I reinstall flutter.
This is code and I tried cachedNetworkImage, and all have the same error.

ListTile(
  title: Text(MyNetowrk.currentChannels[index].name),
    leading: ClipRRect(
      borderRadius: BorderRadius.circular(25.0),
      child: FadeInImage.assetNetwork(
        fit: BoxFit.fill,
        placeholder:'assets/images/page.png', //kTransparentImage,
        image: MyNetowrk.channels[index].icon,
        imageErrorBuilder: (context, url, error) =>
          SizedBox(width: 200, child: new Icon(Icons.error)),
     ),
   ),
),

This is error I got:

/D:/APPS/flutter/.pub-cache/hosted/pub.dartlang.org/cached_network_image-3.2.0/lib/src/image_provider/multi_image_stream_completer.dart:152:22: Warning: Operand of null-aware operation '?.' has type 'SchedulerBinding' which excludes null.
- 'SchedulerBinding' is from 'package:flutter/src/scheduler/binding.dart' ('/D:/APPS/flutter/packages/flutter/lib/src/scheduler/binding.dart').
package:flutter/…/scheduler/binding.dart:1
    SchedulerBinding.instance?.scheduleFrameCallback(_handleAppFrame);
                     ^
/D:/APPS/flutter/.pub-cache/hosted/pub.dartlang.org/cached_network_image-3.2.0/lib/src/image_provider/cached_network_image_provider.dart:109:29: Warning: Operand of null-aware operation '?.' has type 'PaintingBinding' which excludes null.

- 'PaintingBinding' is from 'package:flutter/src/painting/binding.dart' ('/D:/APPS/flutter/packages/flutter/lib/src/painting/binding.dart').
package:flutter/…/painting/binding.dart:1
      () => PaintingBinding.instance?.imageCache?.evict(key),

and it opens _network_image_io.dart file and shows line 120.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文