图像错误构建者无法在颤动中工作
我正在尝试列出网络图像列表。它一直在工作,直到我重新安装颤音为止。 这是代码,我尝试了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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论