feat: render particle clouds for selected tags

This commit is contained in:
2026-05-16 22:07:18 +02:00
parent b3f199b431
commit 181dcdc30e
9 changed files with 171 additions and 43 deletions
+8 -3
View File
@@ -190,7 +190,12 @@ final roomOccupancyProvider = StreamProvider<Map<int, List<String>>>((ref) {
return ref.watch(tagRepositoryProvider).watchRoomOccupancy();
});
final particleCloudProvider = StreamProvider<List<Particle>>((ref) {
final repo = ref.watch(tagRepositoryProvider);
return repo.watchParticleCloud();
/// The tag whose particle cloud is being visualised on the floor plan.
/// Null when no tag is tracked.
final trackedTagProvider = StateProvider<Tag?>((ref) => null);
/// Live particle snapshots for a specific tag (keyed by tag_id string).
final particleSnapshotProvider =
StreamProvider.autoDispose.family<ParticleSnapshot, String>((ref, tagId) {
return ref.watch(tagRepositoryProvider).watchParticleCloud(tagId);
});