简体   繁体   English

不能将 DiceBears 与 Flutter NetworkImage 一起使用

[英]Can't use DiceBears with Flutter NetworkImage

══╡ EXCEPTION CAUGHT BY IMAGE RESOURCE SERVICE ╞════════════════════════════════════════════════════
The following HandshakeException was thrown resolving an image codec:
Handshake error in client (OS Error:
        CERTIFICATE_VERIFY_FAILED: certificate has expired(handshake.cc:393))

When the exception was thrown, this was the stack:
#0      _SecureFilterImpl._handshake (dart:io-patch/secure_socket_patch.dart:99:46)
#1      _SecureFilterImpl.handshake (dart:io-patch/secure_socket_patch.dart:142:25)
#2      _RawSecureSocket._secureHandshake (dart:io/secure_socket.dart:911:54)
#3      _RawSecureSocket._tryFilter (dart:io/secure_socket.dart:1040:19)
<asynchronous suspension>

Image provider: NetworkImage("https://avatars.dicebear.com/api/micah/your-custom-seed.jpg", scale:
  1.0)
Image key: NetworkImage("https://avatars.dicebear.com/api/micah/your-custom-seed.jpg", scale: 1.0)
════════════════════════════════════════════════════════════════════════════════════════════════════

I was trying to integrate profile pictures into my Flutter app.我试图将个人资料图片集成到我的 Flutter 应用程序中。

    CircleAvatar(
          // TODO username, color integration with api
          backgroundImage: NetworkImage(
              'https://avatars.dicebear.com/api/micah/your-custom-seed.jpg'),
          radius: 17.0,
          // backgroundColor: Colors.transparent,
        ),

How can I solve this problem?我怎么解决这个问题?

On closer inspection, I totally forgot to just google HandshakeException which leads me to this StackOverflow reply that has the solution that worked for me.仔细检查后,我完全忘记了谷歌 HandshakeException,这让我找到了这个 StackOverflow 回复,它有适合我的解决方案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM