refactor: actions provider (#19651)

* refactor: actions provider

* chore: rename error and stack

* remove empty checks

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
shenlong 2025-07-01 08:10:25 +05:30 committed by GitHub
parent 5011636d95
commit 21f500191a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 159 additions and 140 deletions

View file

@ -30,8 +30,11 @@ class ThumbnailTile extends ConsumerWidget {
? context.primaryColor.darken(amount: 0.6)
: context.primaryColor.lighten(amount: 0.8);
final multiselect = ref.watch(multiSelectProvider);
final isSelected = multiselect.selectedAssets.contains(asset);
final isSelected = ref.watch(
multiSelectProvider.select(
(multiselect) => multiselect.selectedAssets.contains(asset),
),
);
return Stack(
children: [