mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
refactor(mobile): Use switch expression when possible (#15852)
refactor: Use `switch` expression when possible Co-authored-by: Alex <alex.tran1502@gmail.com>
This commit is contained in:
parent
4efacfbb91
commit
96a6cc20b7
17 changed files with 219 additions and 374 deletions
|
|
@ -519,18 +519,12 @@ class BackupService {
|
|||
return responseBody.containsKey('id') ? responseBody['id'] : null;
|
||||
}
|
||||
|
||||
String _getAssetType(AssetType assetType) {
|
||||
switch (assetType) {
|
||||
case AssetType.audio:
|
||||
return "AUDIO";
|
||||
case AssetType.image:
|
||||
return "IMAGE";
|
||||
case AssetType.video:
|
||||
return "VIDEO";
|
||||
case AssetType.other:
|
||||
return "OTHER";
|
||||
}
|
||||
}
|
||||
String _getAssetType(AssetType assetType) => switch (assetType) {
|
||||
AssetType.audio => "AUDIO",
|
||||
AssetType.image => "IMAGE",
|
||||
AssetType.video => "VIDEO",
|
||||
AssetType.other => "OTHER",
|
||||
};
|
||||
}
|
||||
|
||||
class MultipartRequest extends http.MultipartRequest {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue