mirror of
				https://github.com/immich-app/immich.git
				synced 2025-11-04 03:27:09 -05:00 
			
		
		
		
	refactor: Use `switch` expression when possible Co-authored-by: Alex <alex.tran1502@gmail.com>
		
			
				
	
	
		
			10 lines
		
	
	
		
			402 B
		
	
	
	
		
			Dart
		
	
	
	
	
	
			
		
		
	
	
			10 lines
		
	
	
		
			402 B
		
	
	
	
		
			Dart
		
	
	
	
	
	
import 'package:flutter/material.dart';
 | 
						|
import 'package:immich_mobile/entities/asset.entity.dart';
 | 
						|
 | 
						|
/// Returns the suitable [IconData] to represent an [Asset]s storage location
 | 
						|
IconData storageIcon(Asset asset) => switch (asset.storage) {
 | 
						|
      AssetState.local => Icons.cloud_off_outlined,
 | 
						|
      AssetState.remote => Icons.cloud_outlined,
 | 
						|
      AssetState.merged => Icons.cloud_done_outlined,
 | 
						|
    };
 |