feat(mobile): optimized thumbnail widget (#21073)
* thumbnail widget * use animation ticker, improvements * use static thumbnail resolution for now * fix android sample size * free memory sooner * formatting * tweaks * wait for disposal * remove debug prints * take two on animation * fix * remote constructor * missed one * unused imports * unnecessary import * formatting
This commit is contained in:
@@ -119,7 +119,7 @@ class _DriftCreateAlbumPageState extends ConsumerState<DriftCreateAlbumPage> {
|
||||
final asset = selectedAssets.elementAt(index);
|
||||
return GestureDetector(
|
||||
onTap: onBackgroundTapped,
|
||||
child: Thumbnail(asset: asset),
|
||||
child: Thumbnail.fromAsset(asset: asset),
|
||||
);
|
||||
}, childCount: selectedAssets.length),
|
||||
),
|
||||
|
||||
@@ -163,7 +163,11 @@ class _PlaceTile extends StatelessWidget {
|
||||
title: Text(place.$1, style: context.textTheme.titleMedium?.copyWith(fontWeight: FontWeight.w500)),
|
||||
leading: ClipRRect(
|
||||
borderRadius: const BorderRadius.all(Radius.circular(20)),
|
||||
child: Thumbnail(size: const Size(80, 80), fit: BoxFit.cover, remoteId: place.$2),
|
||||
child: SizedBox(
|
||||
width: 80,
|
||||
height: 80,
|
||||
child: Thumbnail.remote(remoteId: place.$2, fit: BoxFit.cover),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user