mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 15:17:31 +00:00
43 lines
1.2 KiB
Dart
43 lines
1.2 KiB
Dart
import 'package:equatable/equatable.dart';
|
|
import 'package:syncrow_web/pages/spaces_management/model/community_model.dart';
|
|
import 'package:syncrow_web/pages/spaces_management/model/product_model.dart';
|
|
import 'package:syncrow_web/pages/spaces_management/model/space_model.dart';
|
|
|
|
abstract class SpaceManagementState extends Equatable {
|
|
const SpaceManagementState();
|
|
|
|
@override
|
|
List<Object> get props => [];
|
|
}
|
|
|
|
class SpaceManagementInitial extends SpaceManagementState {}
|
|
|
|
class SpaceManagementLoading extends SpaceManagementState {}
|
|
|
|
class SpaceManagementLoaded extends SpaceManagementState {
|
|
final List<CommunityModel> communities;
|
|
final List<ProductModel> products;
|
|
CommunityModel? selectedCommunity; // Include products in the state
|
|
|
|
SpaceManagementLoaded(
|
|
{required this.communities, required this.products, this.selectedCommunity});
|
|
}
|
|
|
|
class SpaceCreationSuccess extends SpaceManagementState {
|
|
final List<SpaceModel> spaces;
|
|
|
|
const SpaceCreationSuccess({required this.spaces});
|
|
|
|
@override
|
|
List<Object> get props => [spaces];
|
|
}
|
|
|
|
class SpaceManagementError extends SpaceManagementState {
|
|
final String errorMessage;
|
|
|
|
const SpaceManagementError(this.errorMessage);
|
|
|
|
@override
|
|
List<Object> get props => [errorMessage];
|
|
}
|