passo_mobile_app/lib/bloc/profile/eligibility/eligibility_state.dart

94 lines
2.5 KiB
Dart
Raw Normal View History

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 bool success;
2023-04-11 01:27:53 +00:00
const DeletedState({required this.success});
@override
2023-04-11 01:27:53 +00:00
List<Object> get props => [success];
}
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 Map<dynamic,dynamic> response;
2023-04-11 01:27:53 +00:00
const EligibilityEditedState({required this.response});
@override
2023-04-11 01:27:53 +00:00
List<Object> get props =>[ response];
}
class EligibilityAddedState extends EligibilityState{
final Map<dynamic,dynamic> response;
2023-04-11 01:27:53 +00:00
const EligibilityAddedState({ required this.response});
@override
2023-04-11 01:27:53 +00:00
List<Object> get props =>[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];
}