1
0
mirror of https://github.com/immich-app/immich.git synced 2024-12-30 11:28:22 +02:00
immich/mobile/lib/utils/storage_indicator.dart
Fynn Petersen-Frey e80d37bf8f
refactor(mobile): add AssetState and proper asset updating (#2270)
* refactor(mobile): add AssetState and proper asset updating

* generate files

---------

Co-authored-by: Fynn Petersen-Frey <zoodyy@users.noreply.github.com>
Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
2023-04-18 04:47:24 -05:00

15 lines
442 B
Dart

import 'package:flutter/material.dart';
import 'package:immich_mobile/shared/models/asset.dart';
/// Returns the suitable [IconData] to represent an [Asset]s storage location
IconData storageIcon(Asset asset) {
switch (asset.storage) {
case AssetState.local:
return Icons.cloud_off_outlined;
case AssetState.remote:
return Icons.cloud_outlined;
case AssetState.merged:
return Icons.cloud_done_outlined;
}
}