Skip to content

Commit

Permalink
Merge pull request #651 from Npepperlinux/fix/network_image_error_ico…
Browse files Browse the repository at this point in the history
…n_size

エラー画像をアバターデコレーションでは表示しないように
  • Loading branch information
shiosyakeyakini-info authored Nov 10, 2024
2 parents 2773561 + 1f1e0ca commit efffa8c
Showing 1 changed file with 18 additions and 15 deletions.
33 changes: 18 additions & 15 deletions lib/view/common/misskey_notes/network_image.dart
Original file line number Diff line number Diff line change
Expand Up @@ -61,22 +61,25 @@ class NetworkImageView extends ConsumerWidget {
fit: fit,
errorWidget: (context, url, error) =>
errorBuilder?.call(context, error, StackTrace.current) ??
Stack(
Container(
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,
),
],
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,
Expand Down

0 comments on commit efffa8c

Please sign in to comment.