提交 94555935 authored 作者: songchuancai's avatar songchuancai

修复图片加载失败

上级 6f0554ab
...@@ -764,10 +764,15 @@ class _HomePageState extends State<HomePage> { ...@@ -764,10 +764,15 @@ class _HomePageState extends State<HomePage> {
shape: BoxShape.circle, shape: BoxShape.circle,
image: DecorationImage( image: DecorationImage(
image: widget.customImageUrl != null image: widget.customImageUrl != null
? AssetImage(widget.customImageUrl!) ? NetworkImage(
widget.customImageUrl!)
: const AssetImage( : const AssetImage(
'assets/images/virtualAssistant.png', 'assets/images/virtualAssistant.png',
), ) as ImageProvider,
onError: (exception, stackTrace) {
print(
'Error loading image: $exception');
},
), ),
), ),
), ),
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论