97 lines
2.8 KiB
Dart
97 lines
2.8 KiB
Dart
part of 'eligibility_bloc.dart';
|
|
|
|
abstract class EligibilityState extends Equatable {
|
|
const EligibilityState();
|
|
|
|
@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;
|
|
const EditEligibilityState({
|
|
required this.provinces,
|
|
required this.cities,
|
|
required this.currentProvince,
|
|
required this.currentCity,
|
|
required this.currentRegion,
|
|
required this.currentEligibility,
|
|
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];
|
|
}
|
|
|
|
class DeletedState extends EligibilityState {
|
|
final List<EligibityCert> eligibilities;
|
|
final bool success;
|
|
const DeletedState({required this.eligibilities, required this.success});
|
|
@override
|
|
List<Object> get props => [success, eligibilities];
|
|
}
|
|
|
|
class AddEligibilityState extends EligibilityState {
|
|
final List<Eligibility> eligibilities;
|
|
final List<Country> countries;
|
|
final List<Region> regions;
|
|
const AddEligibilityState({
|
|
required this.eligibilities,
|
|
required this.countries,
|
|
required this.regions,
|
|
});
|
|
@override
|
|
List<Object> get props => [eligibilities,countries,regions];
|
|
}
|
|
class EligibilityEditedState extends EligibilityState{
|
|
final List<EligibityCert> eligibilities;
|
|
final Map<dynamic,dynamic> response;
|
|
const EligibilityEditedState({required this.eligibilities, required this.response});
|
|
@override
|
|
List<Object> get props =>[eligibilities, response];
|
|
}
|
|
|
|
class EligibilityAddedState extends EligibilityState{
|
|
final List<EligibityCert> eligibilities;
|
|
final Map<dynamic,dynamic> response;
|
|
|
|
const EligibilityAddedState({required this.eligibilities, required this.response});
|
|
@override
|
|
List<Object> get props =>[eligibilities,response];
|
|
}
|
|
class EligibilityLoadingState extends EligibilityState{
|
|
|
|
}
|
|
class EligibilityErrorState extends EligibilityState{
|
|
final String message;
|
|
const EligibilityErrorState({required this.message});
|
|
@override
|
|
List<Object> get props =>[message];
|
|
}
|
|
|
|
class EligibilityLoaded extends EligibilityState {
|
|
final List<EligibityCert> eligibilities;
|
|
const EligibilityLoaded({required this.eligibilities});
|
|
@override
|
|
List<Object> get props => [eligibilities];
|
|
}
|