🍱 Update media offline placeholder

🐛 Fix image picker
This commit is contained in:
2025-09-06 13:23:09 +08:00
parent f7dad5e419
commit 573b76d3ff
5 changed files with 6 additions and 8 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 461 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 307 KiB

View File

@@ -1261,7 +1261,7 @@ class ChatRoomScreen extends HookConsumerWidget {
attachments.value = [
...attachments.value,
...result.files.map(
(e) => UniversalFile(data: e, type: UniversalFileType.image),
(e) => UniversalFile(data: e.xFile, type: UniversalFileType.image),
),
];
}
@@ -1276,7 +1276,7 @@ class ChatRoomScreen extends HookConsumerWidget {
attachments.value = [
...attachments.value,
...result.files.map(
(e) => UniversalFile(data: e, type: UniversalFileType.video),
(e) => UniversalFile(data: e.xFile, type: UniversalFileType.video),
),
];
}

View File

@@ -52,12 +52,10 @@ class UniversalImage extends StatelessWidget {
},
errorWidget: (context, url, error) {
return Image.asset(
'assets/images/media-offline.png',
'assets/images/media-offline.jpg',
fit: BoxFit.cover,
key: Key('image-broke-$uri'),
);
// return const Center(
// child: Icon(Icons.broken_image, color: Colors.white, size: 16),
// );
},
),
],

View File

@@ -398,7 +398,7 @@ class ComposeLogic {
state.attachments.value = [
...state.attachments.value,
...result.files.map(
(e) => UniversalFile(data: e, type: UniversalFileType.image),
(e) => UniversalFile(data: e.xFile, type: UniversalFileType.image),
),
];
}
@@ -413,7 +413,7 @@ class ComposeLogic {
state.attachments.value = [
...state.attachments.value,
...result.files.map(
(e) => UniversalFile(data: e, type: UniversalFileType.video),
(e) => UniversalFile(data: e.xFile, type: UniversalFileType.video),
),
];
}