diff --git a/lib/widgets/author_avatar_icon.dart b/lib/widgets/author_avatar_icon.dart index 0818a86..1dcea8d 100644 --- a/lib/widgets/author_avatar_icon.dart +++ b/lib/widgets/author_avatar_icon.dart @@ -1,5 +1,6 @@ import 'dart:io'; +import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; @@ -47,8 +48,8 @@ class AuthorAvatarIcon extends StatelessWidget { if (avatar!.cached) { image = Image.file(File(avatar!.url!), height: height, width: width); } else { - image = Image.network( - avatar!.url!, + image = CachedNetworkImage( + imageUrl: avatar!.url!, height: height, width: width, ); diff --git a/pubspec.yaml b/pubspec.yaml index 3aecbdd..c0a46e0 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -33,6 +33,7 @@ dependencies: crypto: ">=2.1.5" provider: ^6.0.0 itertools: ">=0.1.0" + cached_network_image: ^3.2.0 dependency_overrides: platform: ^3.1.0