add dropdown
This commit is contained in:
31
lib/features/users/presentation/providers/users_state.dart
Normal file
31
lib/features/users/presentation/providers/users_state.dart
Normal file
@@ -0,0 +1,31 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
|
||||
import '../../domain/entities/user_entity.dart';
|
||||
|
||||
/// State for users feature
|
||||
class UsersState extends Equatable {
|
||||
final List<UserEntity> users;
|
||||
final bool isLoading;
|
||||
final String? error;
|
||||
|
||||
const UsersState({
|
||||
this.users = const [],
|
||||
this.isLoading = false,
|
||||
this.error,
|
||||
});
|
||||
|
||||
UsersState copyWith({
|
||||
List<UserEntity>? users,
|
||||
bool? isLoading,
|
||||
String? error,
|
||||
}) {
|
||||
return UsersState(
|
||||
users: users ?? this.users,
|
||||
isLoading: isLoading ?? this.isLoading,
|
||||
error: error,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
List<Object?> get props => [users, isLoading, error];
|
||||
}
|
||||
Reference in New Issue
Block a user