mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-11-27 10:14:55 +00:00
Fetch devices based on selection
This commit is contained in:
@ -2,6 +2,7 @@ import 'package:equatable/equatable.dart';
|
||||
import 'package:syncrow_web/pages/spaces_management/all_spaces/model/community_model.dart';
|
||||
|
||||
class SpaceTreeState extends Equatable {
|
||||
final Map<String, List<String>> selectedCommunityAndSpaces;
|
||||
final List<CommunityModel> communityList;
|
||||
final List<CommunityModel> filteredCommunity;
|
||||
final List<String> expandedCommunities;
|
||||
@ -19,7 +20,8 @@ class SpaceTreeState extends Equatable {
|
||||
this.selectedCommunities = const [],
|
||||
this.selectedSpaces = const [],
|
||||
this.soldCheck = const [],
|
||||
this.isSearching = false});
|
||||
this.isSearching = false,
|
||||
this.selectedCommunityAndSpaces = const {}});
|
||||
|
||||
SpaceTreeState copyWith(
|
||||
{List<CommunityModel>? communitiesList,
|
||||
@ -29,7 +31,8 @@ class SpaceTreeState extends Equatable {
|
||||
List<String>? selectedCommunities,
|
||||
List<String>? selectedSpaces,
|
||||
List<String>? soldCheck,
|
||||
bool? isSearching}) {
|
||||
bool? isSearching,
|
||||
Map<String, List<String>>? selectedCommunityAndSpaces}) {
|
||||
return SpaceTreeState(
|
||||
communityList: communitiesList ?? this.communityList,
|
||||
filteredCommunity: filteredCommunity ?? this.filteredCommunity,
|
||||
@ -38,7 +41,8 @@ class SpaceTreeState extends Equatable {
|
||||
selectedCommunities: selectedCommunities ?? this.selectedCommunities,
|
||||
selectedSpaces: selectedSpaces ?? this.selectedSpaces,
|
||||
soldCheck: soldCheck ?? this.soldCheck,
|
||||
isSearching: isSearching ?? this.isSearching);
|
||||
isSearching: isSearching ?? this.isSearching,
|
||||
selectedCommunityAndSpaces: selectedCommunityAndSpaces ?? this.selectedCommunityAndSpaces);
|
||||
}
|
||||
|
||||
@override
|
||||
@ -50,7 +54,8 @@ class SpaceTreeState extends Equatable {
|
||||
selectedCommunities,
|
||||
selectedSpaces,
|
||||
soldCheck,
|
||||
isSearching
|
||||
isSearching,
|
||||
selectedCommunityAndSpaces
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user