错误 Json 颤振

Erro Json Flutter

从 .json 执行文件时,我在 flutter 和 dart 中遇到这个错误编程 有人知道怎么解决吗?

════════ Exception caught by image resource service ════════════════════════════
The following NoSuchMethodError was thrown resolving an image codec:
The getter 'length' was called on null.
Receiver: null
Tried calling: length

When the exception was thrown, this was the stack
#0      Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5)
#1      Uri.parse (dart:core/uri.dart:792:17)
#2      _Uri.resolve (dart:core/uri.dart:2592:27)
#3      NetworkImage._loadAsync
package:flutter/…/painting/_network_image_io.dart:93
#4      NetworkImage.load
package:flutter/…/painting/_network_image_io.dart:54
...
Image provider: NetworkImage("null", scale: 1.0)
Image key: NetworkImage("null", scale: 1.0)

NetworkImage 小部件需要一个真实图像 URL 作为参数。所以你必须这样提供:

  NetworkImage(
    "https://images.unsplash.com/photo-1547721064-da6cfb341d50",
  ),

here 阅读更多内容。