此代码不起作用:
// Uint8List imageBinary
final imageWidget = FadeInImagePlaceholder(
image: imageBinary == null ? AssetImage('blank.png') : MemoryImage(imageBinary),
// ...
引发此错误:
The argument type 'Object' can't be assigned to the parameter type 'ImageProvider<Object>'.
但是此代码有效:
// Uint8List imageBinary
final imageWidget = FadeInImagePlaceholder(
image: MemoryImage(imageBinary),
// ...
此代码也适用:
// Uint8List imageBinary
final imageWidget = FadeInImagePlaceholder(
image: AssetImage('blank.png'),
// ...
为什么?