Json 错误颤振

Json 错误颤振,json,image,flutter,dart,provider,Json,Image,Flutter,Dart,Provider,当从.json执行文件时,我在flatter和dart中编程时遇到了这个错误 有人知道怎么修吗 ════════ Exception caught by image resource service ════════════════════════════ The following NoSuchMethodError was thrown resolving an image codec: The getter 'length' was called on null. Receiver: nu

当从.json执行文件时,我在flatter和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",
  ),
阅读更多来自