storage_indicator.dart 442 B

1234567891011121314
  1. import 'package:flutter/material.dart';
  2. import 'package:immich_mobile/shared/models/asset.dart';
  3. /// Returns the suitable [IconData] to represent an [Asset]s storage location
  4. IconData storageIcon(Asset asset) {
  5. switch (asset.storage) {
  6. case AssetState.local:
  7. return Icons.cloud_off_outlined;
  8. case AssetState.remote:
  9. return Icons.cloud_outlined;
  10. case AssetState.merged:
  11. return Icons.cloud_done_outlined;
  12. }
  13. }