import 'package:equatable/equatable.dart'; import 'package:syncrow_web/pages/spaces_management/all_spaces/model/community_model.dart'; class SpaceTreeState extends Equatable { final List communityList; final List filteredCommunity; final List expandedCommunities; final List expandedSpaces; final List selectedCommunities; final List selectedSpaces; final List soldCheck; final bool isSearching; const SpaceTreeState( {this.communityList = const [], this.filteredCommunity = const [], this.expandedCommunities = const [], this.expandedSpaces = const [], this.selectedCommunities = const [], this.selectedSpaces = const [], this.soldCheck = const [], this.isSearching = false}); SpaceTreeState copyWith( {List? communitiesList, List? filteredCommunity, List? expandedSpaces, List? expandedCommunity, List? selectedCommunities, List? selectedSpaces, List? soldCheck, bool? isSearching}) { return SpaceTreeState( communityList: communitiesList ?? this.communityList, filteredCommunity: filteredCommunity ?? this.filteredCommunity, expandedSpaces: expandedSpaces ?? this.expandedSpaces, expandedCommunities: expandedCommunity ?? this.expandedCommunities, selectedCommunities: selectedCommunities ?? this.selectedCommunities, selectedSpaces: selectedSpaces ?? this.selectedSpaces, soldCheck: soldCheck ?? this.soldCheck, isSearching: isSearching ?? this.isSearching); } @override List get props => [ communityList, filteredCommunity, expandedSpaces, expandedCommunities, selectedCommunities, selectedSpaces, soldCheck, isSearching ]; } class SpaceTreeLoadingState extends SpaceTreeState {} class SpaceTreeErrorState extends SpaceTreeState { final String message; const SpaceTreeErrorState(this.message); @override List get props => [message]; }