mirror of
				https://github.com/KevinMidboe/immich.git
				synced 2025-10-29 17:40:28 +00:00 
			
		
		
		
	Optimize mobile - Avoid creating unnecessary widgets (#268)
* Avoid creating unnecessary widgets * more flexible null handling and runtime errors prevention
This commit is contained in:
		| @@ -56,7 +56,7 @@ class AlbumInfoCard extends HookConsumerWidget { | ||||
|         ); | ||||
|       } | ||||
|  | ||||
|       return Container(); | ||||
|       return const SizedBox(); | ||||
|     } | ||||
|  | ||||
|     _buildImageFilter() { | ||||
| @@ -151,7 +151,11 @@ class AlbumInfoCard extends HookConsumerWidget { | ||||
|                   ), | ||||
|                   child: null, | ||||
|                 ), | ||||
|                 Positioned(bottom: 10, left: 25, child: _buildSelectedTextBox()) | ||||
|                 Positioned( | ||||
|                   bottom: 10, | ||||
|                   left: 25, | ||||
|                   child: _buildSelectedTextBox(), | ||||
|                 ) | ||||
|               ], | ||||
|             ), | ||||
|             Padding( | ||||
| @@ -176,8 +180,7 @@ class AlbumInfoCard extends HookConsumerWidget { | ||||
|                           Padding( | ||||
|                             padding: const EdgeInsets.only(top: 2.0), | ||||
|                             child: Text( | ||||
|                               albumInfo.assetCount.toString() + | ||||
|                                   (albumInfo.isAll ? " (ALL)" : ""), | ||||
|                               '${albumInfo.assetCount} ${(albumInfo.isAll ? " (ALL)" : "")}', | ||||
|                               style: TextStyle( | ||||
|                                   fontSize: 12, color: Colors.grey[600]), | ||||
|                             ), | ||||
|   | ||||
		Reference in New Issue
	
	Block a user