Skip to content

Commit

Permalink
エラー画像をアバターデコレーションでは表示しないように
Browse files Browse the repository at this point in the history
  • Loading branch information
Npepperlinux committed Nov 6, 2024
1 parent 47cefb3 commit b43826c
Showing 1 changed file with 22 additions and 17 deletions.
39 changes: 22 additions & 17 deletions lib/view/common/misskey_notes/network_image.dart
Original file line number Diff line number Diff line change
Expand Up @@ -61,23 +61,28 @@ class NetworkImageView extends ConsumerWidget {
fit: fit,
errorWidget: (context, url, error) =>
errorBuilder?.call(context, error, StackTrace.current) ??
Stack(
alignment: Alignment.center,
children: [
Container(
color: const Color.fromARGB(255, 224, 224, 224),
),
SvgPicture.asset(
"assets/images/miria_error.svg",
colorFilter: const ColorFilter.mode(
Color.fromARGB(255, 117, 117, 117),
BlendMode.srcIn,
),
width: 48,
height: 48,
),
],
),
Container(
alignment: Alignment.center,
decoration: type == ImageType.avatarDecoration
? null
: BoxDecoration(
borderRadius: BorderRadius.circular(5),
color: const Color.fromARGB(255, 224, 224, 224),
)
,
child: type == ImageType.avatarDecoration
? null
: SvgPicture.asset(
"assets/images/miria_error.svg",
colorFilter: const ColorFilter.mode(
Color.fromARGB(255, 117, 117, 117),
BlendMode.srcIn,
),
width: 48,
height: 48,
)
,
),
cacheManager: ref.read(cacheManagerProvider),
width: width,
height: height,
Expand Down

0 comments on commit b43826c

Please sign in to comment.