mirror of
https://github.com/immich-app/immich.git
synced 2025-08-11 09:16:31 -04:00
* chore: bump dart sdk to 3.8 * chore: make build * make pigeon * chore: format files --------- Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
18 lines
707 B
Dart
18 lines
707 B
Dart
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
|
import 'package:immich_mobile/domain/models/asset/base_asset.model.dart';
|
|
import 'package:immich_mobile/providers/infrastructure/asset.provider.dart';
|
|
|
|
class StackChildrenNotifier extends AutoDisposeFamilyAsyncNotifier<List<RemoteAsset>, BaseAsset?> {
|
|
@override
|
|
Future<List<RemoteAsset>> build(BaseAsset? asset) async {
|
|
if (asset == null || asset is! RemoteAsset || asset.stackId == null) {
|
|
return const [];
|
|
}
|
|
|
|
return ref.watch(assetServiceProvider).getStack(asset);
|
|
}
|
|
}
|
|
|
|
final stackChildrenNotifier = AsyncNotifierProvider.autoDispose
|
|
.family<StackChildrenNotifier, List<RemoteAsset>, BaseAsset?>(StackChildrenNotifier.new);
|