27 lines
649 B
Dart
27 lines
649 B
Dart
part of 'company_bloc.dart';
|
|
|
|
enum CompanyStatus { initial, loading, success, failure }
|
|
|
|
class CompanyState extends Equatable {
|
|
final CompanyStatus status;
|
|
final String? errorMessage;
|
|
final CompanyModel? company;
|
|
|
|
const CompanyState({required this.status, this.errorMessage, this.company});
|
|
|
|
CompanyState copyWith({
|
|
CompanyStatus? status,
|
|
String? errorMessage,
|
|
CompanyModel? company,
|
|
}) {
|
|
return CompanyState(
|
|
status: status ?? this.status,
|
|
errorMessage: errorMessage ?? this.errorMessage,
|
|
company: company ?? this.company,
|
|
);
|
|
}
|
|
|
|
@override
|
|
List<Object?> get props => [status, errorMessage];
|
|
}
|