refactor(mobile): image thumbnails (#19821)

* image thumbnail refactor

* minor const-ification in new thumbnail tile

* underscore helper classes

---------

Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
Mert 2025-07-09 22:16:09 +03:00 committed by GitHub
parent a918481c0b
commit fd48a33686
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 317 additions and 228 deletions

View file

@ -43,6 +43,14 @@ sealed class BaseAsset {
bool get isImage => type == AssetType.image;
bool get isVideo => type == AssetType.video;
Duration get duration {
final durationInSeconds = this.durationInSeconds;
if (durationInSeconds != null) {
return Duration(seconds: durationInSeconds);
}
return const Duration();
}
bool get hasRemote =>
storage == AssetState.remote || storage == AssetState.merged;
bool get hasLocal =>