🍱 Update media offline placeholder
🐛 Fix image picker
			
			
This commit is contained in:
		
							
								
								
									
										
											BIN
										
									
								
								assets/images/media-offline.jpg
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								assets/images/media-offline.jpg
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 461 KiB | 
										
											Binary file not shown.
										
									
								
							| Before Width: | Height: | Size: 307 KiB | 
| @@ -1261,7 +1261,7 @@ class ChatRoomScreen extends HookConsumerWidget { | |||||||
|       attachments.value = [ |       attachments.value = [ | ||||||
|         ...attachments.value, |         ...attachments.value, | ||||||
|         ...result.files.map( |         ...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 = [ | ||||||
|         ...attachments.value, |         ...attachments.value, | ||||||
|         ...result.files.map( |         ...result.files.map( | ||||||
|           (e) => UniversalFile(data: e, type: UniversalFileType.video), |           (e) => UniversalFile(data: e.xFile, type: UniversalFileType.video), | ||||||
|         ), |         ), | ||||||
|       ]; |       ]; | ||||||
|     } |     } | ||||||
|   | |||||||
| @@ -52,12 +52,10 @@ class UniversalImage extends StatelessWidget { | |||||||
|             }, |             }, | ||||||
|             errorWidget: (context, url, error) { |             errorWidget: (context, url, error) { | ||||||
|               return Image.asset( |               return Image.asset( | ||||||
|                 'assets/images/media-offline.png', |                 'assets/images/media-offline.jpg', | ||||||
|                 fit: BoxFit.cover, |                 fit: BoxFit.cover, | ||||||
|  |                 key: Key('image-broke-$uri'), | ||||||
|               ); |               ); | ||||||
|               // return const Center( |  | ||||||
|               //   child: Icon(Icons.broken_image, color: Colors.white, size: 16), |  | ||||||
|               // ); |  | ||||||
|             }, |             }, | ||||||
|           ), |           ), | ||||||
|         ], |         ], | ||||||
|   | |||||||
| @@ -398,7 +398,7 @@ class ComposeLogic { | |||||||
|     state.attachments.value = [ |     state.attachments.value = [ | ||||||
|       ...state.attachments.value, |       ...state.attachments.value, | ||||||
|       ...result.files.map( |       ...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 = [ | ||||||
|       ...state.attachments.value, |       ...state.attachments.value, | ||||||
|       ...result.files.map( |       ...result.files.map( | ||||||
|         (e) => UniversalFile(data: e, type: UniversalFileType.video), |         (e) => UniversalFile(data: e.xFile, type: UniversalFileType.video), | ||||||
|       ), |       ), | ||||||
|     ]; |     ]; | ||||||
|   } |   } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user