Reviewed-on: #12 Co-authored-by: Mark M2 Macbook <marco@catelli.it> Co-committed-by: Mark M2 Macbook <marco@catelli.it>
27 lines
658 B
Dart
27 lines
658 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, company];
|
|
}
|