2023-03-02 05:28:33 +00:00
|
|
|
part of 'eligibility_bloc.dart';
|
|
|
|
|
|
|
|
abstract class EligibilityState extends Equatable {
|
|
|
|
const EligibilityState();
|
2023-08-01 08:20:38 +00:00
|
|
|
|
2023-03-02 05:28:33 +00:00
|
|
|
@override
|
|
|
|
List<Object> get props => [];
|
|
|
|
}
|
|
|
|
|
|
|
|
class EligibilityInitial extends EligibilityState {}
|
|
|
|
|
|
|
|
class EditEligibilityState extends EligibilityState {
|
|
|
|
final EligibityCert eligibityCert;
|
|
|
|
final List<Eligibility> eligibilities;
|
|
|
|
final List<Country> countries;
|
|
|
|
final List<Region> regions;
|
|
|
|
final List<Province>? provinces;
|
|
|
|
final List<CityMunicipality>? cities;
|
|
|
|
final bool isOverseas;
|
|
|
|
final Eligibility currentEligibility;
|
|
|
|
final Region? currentRegion;
|
|
|
|
final Province? currentProvince;
|
|
|
|
final CityMunicipality? currentCity;
|
|
|
|
final Country selectedCountry;
|
2023-08-01 08:20:38 +00:00
|
|
|
|
|
|
|
const EditEligibilityState({
|
|
|
|
required this.provinces,
|
|
|
|
required this.cities,
|
|
|
|
required this.currentProvince,
|
|
|
|
required this.currentCity,
|
|
|
|
required this.currentRegion,
|
|
|
|
required this.currentEligibility,
|
2023-03-02 05:28:33 +00:00
|
|
|
required this.isOverseas,
|
|
|
|
required this.eligibityCert,
|
|
|
|
required this.eligibilities,
|
|
|
|
required this.countries,
|
|
|
|
required this.regions,
|
|
|
|
required this.selectedCountry,
|
|
|
|
});
|
|
|
|
@override
|
|
|
|
List<Object> get props =>
|
|
|
|
[isOverseas, eligibityCert, eligibilities, regions, countries];
|
|
|
|
}
|
|
|
|
|
2023-08-07 06:33:38 +00:00
|
|
|
class EligibilityDeletedState extends EligibilityState {
|
2023-03-02 05:28:33 +00:00
|
|
|
final bool success;
|
2023-08-07 06:33:38 +00:00
|
|
|
const EligibilityDeletedState({required this.success});
|
2023-03-02 05:28:33 +00:00
|
|
|
@override
|
2023-04-11 01:27:53 +00:00
|
|
|
List<Object> get props => [success];
|
2023-03-02 05:28:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class AddEligibilityState extends EligibilityState {
|
|
|
|
final List<Eligibility> eligibilities;
|
|
|
|
final List<Country> countries;
|
|
|
|
final List<Region> regions;
|
2023-08-01 08:20:38 +00:00
|
|
|
const AddEligibilityState({
|
2023-03-02 05:28:33 +00:00
|
|
|
required this.eligibilities,
|
|
|
|
required this.countries,
|
|
|
|
required this.regions,
|
|
|
|
});
|
|
|
|
@override
|
2023-08-01 08:20:38 +00:00
|
|
|
List<Object> get props => [eligibilities, countries, regions];
|
2023-03-02 05:28:33 +00:00
|
|
|
}
|
2023-08-01 08:20:38 +00:00
|
|
|
|
|
|
|
class EligibilityEditedState extends EligibilityState {
|
|
|
|
final Map<dynamic, dynamic> response;
|
2023-04-11 01:27:53 +00:00
|
|
|
const EligibilityEditedState({required this.response});
|
2023-03-02 05:28:33 +00:00
|
|
|
@override
|
2023-08-01 08:20:38 +00:00
|
|
|
List<Object> get props => [response];
|
2023-03-02 05:28:33 +00:00
|
|
|
}
|
|
|
|
|
2023-08-01 08:20:38 +00:00
|
|
|
class EligibilityAddedState extends EligibilityState {
|
|
|
|
final Map<dynamic, dynamic> response;
|
2023-03-02 05:28:33 +00:00
|
|
|
|
2023-08-01 08:20:38 +00:00
|
|
|
const EligibilityAddedState({required this.response});
|
2023-03-02 05:28:33 +00:00
|
|
|
@override
|
2023-08-01 08:20:38 +00:00
|
|
|
List<Object> get props => [response];
|
2023-03-02 05:28:33 +00:00
|
|
|
}
|
|
|
|
|
2023-08-01 08:20:38 +00:00
|
|
|
class EligibilityLoadingState extends EligibilityState {}
|
|
|
|
|
|
|
|
class EligibilityErrorState extends EligibilityState {
|
2023-03-02 05:28:33 +00:00
|
|
|
final String message;
|
|
|
|
const EligibilityErrorState({required this.message});
|
2023-08-01 08:20:38 +00:00
|
|
|
@override
|
|
|
|
List<Object> get props => [message];
|
2023-03-02 05:28:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class EligibilityLoaded extends EligibilityState {
|
2023-08-01 08:20:38 +00:00
|
|
|
final List< AttachmentCategory> attachmentCategory;
|
2023-03-02 05:28:33 +00:00
|
|
|
final List<EligibityCert> eligibilities;
|
2023-08-01 08:20:38 +00:00
|
|
|
const EligibilityLoaded({required this.eligibilities, required this.attachmentCategory});
|
2023-03-02 05:28:33 +00:00
|
|
|
@override
|
|
|
|
List<Object> get props => [eligibilities];
|
|
|
|
}
|
2023-08-07 06:33:38 +00:00
|
|
|
|
|
|
|
////Attachment AddedState
|
|
|
|
class EligibilityAttachmentAddedState extends EligibilityState {
|
|
|
|
final Map<dynamic, dynamic> response;
|
|
|
|
const EligibilityAttachmentAddedState({required this.response});
|
|
|
|
}
|
|
|
|
|
|
|
|
////Attachment Deleted State State
|
|
|
|
class EligibilitytAttachmentDeletedState extends EligibilityState {
|
|
|
|
final bool success;
|
|
|
|
const EligibilitytAttachmentDeletedState({required this.success});
|
|
|
|
@override
|
|
|
|
List<Object> get props => [success];
|
|
|
|
}
|