Fix web networkimage

This commit is contained in:
Christian Pauly
2020-05-14 10:04:16 +02:00
parent d220e1bb8d
commit 6ec481f09f
4 changed files with 63 additions and 78 deletions

View File

@ -42,10 +42,12 @@ class Avatar extends StatelessWidget {
child: CircleAvatar(
radius: size / 2,
backgroundImage: !noPic
? AdvancedNetworkImage(
src,
useDiskCache: !kIsWeb,
)
? kIsWeb
? NetworkImage(src)
: AdvancedNetworkImage(
src,
useDiskCache: true,
)
: null,
backgroundColor: noPic
? name?.color ?? Theme.of(context).secondaryHeaderColor