2026-04-06 10:55:56 +02:00
|
|
|
part of 'company_bloc.dart';
|
|
|
|
|
|
|
|
|
|
enum CompanyStatus { initial, loading, success, failure }
|
|
|
|
|
|
|
|
|
|
class CompanyState extends Equatable {
|
|
|
|
|
final CompanyStatus status;
|
2026-04-09 11:30:57 +02:00
|
|
|
final String? errorMessage;
|
|
|
|
|
final CompanyModel? company;
|
2026-04-06 10:55:56 +02:00
|
|
|
|
2026-04-09 11:30:57 +02:00
|
|
|
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,
|
|
|
|
|
);
|
|
|
|
|
}
|
2026-04-06 10:55:56 +02:00
|
|
|
|
|
|
|
|
@override
|
2026-04-30 10:25:52 +02:00
|
|
|
List<Object?> get props => [status, errorMessage, company];
|
2026-04-06 10:55:56 +02:00
|
|
|
}
|