add and edit eligibility with individual pds info API
parent
66adcf924f
commit
5dcc1c1efb
|
@ -23,15 +23,20 @@ class ProfileBloc extends Bloc<ProfileEvent, ProfileState> {
|
||||||
List<EligibityCert>? eligibilities;
|
List<EligibityCert>? eligibilities;
|
||||||
////=========================================================================
|
////=========================================================================
|
||||||
on<LoadProfile>((event, emit) async {
|
on<LoadProfile>((event, emit) async {
|
||||||
// try {
|
try {
|
||||||
emit(ProfileLoading());
|
emit(ProfileLoading());
|
||||||
ProfileInformation? profileInformation =
|
ProfileInformation? profileInformation =
|
||||||
await ProfileService.instance.getProfile(event.token, event.userID);
|
await ProfileService.instance.getProfile(event.token, event.userID);
|
||||||
globalProfileInformation = profileInformation;
|
globalProfileInformation = profileInformation;
|
||||||
emit(ProfileLoaded(profileInformation: globalProfileInformation!));
|
emit(ProfileLoaded(profileInformation: globalProfileInformation!));
|
||||||
// } catch (e) {
|
} catch (e) {
|
||||||
// emit(ProfileErrorState(mesage: e.toString()));
|
emit(ProfileErrorState(mesage: e.toString()));
|
||||||
// }
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
on<CallErrorState>((event, emit) {
|
||||||
|
emit(const ProfileErrorState(
|
||||||
|
mesage: "Something went wrong. Please try again"));
|
||||||
});
|
});
|
||||||
////=====================================================================
|
////=====================================================================
|
||||||
on<LoadEligibility>((event, emit) {
|
on<LoadEligibility>((event, emit) {
|
||||||
|
@ -40,8 +45,25 @@ class ProfileBloc extends Bloc<ProfileEvent, ProfileState> {
|
||||||
emit(EligibilityLoaded(eligibilities: event.eligibilities));
|
emit(EligibilityLoaded(eligibilities: event.eligibilities));
|
||||||
});
|
});
|
||||||
////====================================================================
|
////====================================================================
|
||||||
on<EditEligibility>((event, emit) async {
|
on<GetEligibilities>((event,emit)async{
|
||||||
// try{
|
|
||||||
|
print(eligibilities?.length);
|
||||||
|
try{
|
||||||
|
if(eligibilities != null){
|
||||||
|
emit(EligibilityLoaded(eligibilities: eligibilities!));
|
||||||
|
}else{
|
||||||
|
emit(ProfileLoading());
|
||||||
|
eligibilities = await EligibilityService.instance.getEligibilities(event.profileId, event.token);
|
||||||
|
emit(EligibilityLoaded(eligibilities: eligibilities!));
|
||||||
|
}
|
||||||
|
|
||||||
|
}catch(e){
|
||||||
|
emit(ProfileErrorState(mesage: e.toString()));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
////====================================================================
|
||||||
|
on<ShowEditEligibilityForm>((event, emit) async {
|
||||||
|
try {
|
||||||
emit(ProfileLoading());
|
emit(ProfileLoading());
|
||||||
if (globalCountries == null) {
|
if (globalCountries == null) {
|
||||||
List<Country> countries = await LocationUtils.instance.getCountries();
|
List<Country> countries = await LocationUtils.instance.getCountries();
|
||||||
|
@ -56,20 +78,88 @@ class ProfileBloc extends Bloc<ProfileEvent, ProfileState> {
|
||||||
await ProfileUtilities.instance.getEligibilities();
|
await ProfileUtilities.instance.getEligibilities();
|
||||||
globalEligibilities = eligibilities;
|
globalEligibilities = eligibilities;
|
||||||
}
|
}
|
||||||
|
Eligibility currentEligibility = globalEligibilities!.firstWhere(
|
||||||
|
(Eligibility eligibility) =>
|
||||||
|
event.eligibityCert.eligibility!.id == eligibility.id);
|
||||||
bool? isOverseas = event.eligibityCert.overseas;
|
bool? isOverseas = event.eligibityCert.overseas;
|
||||||
|
Country currentCountry = globalCountries!.firstWhere(
|
||||||
|
(Country country) =>
|
||||||
|
event.eligibityCert.examAddress!.country!.code == country.code);
|
||||||
|
if (event.eligibityCert.examAddress?.cityMunicipality?.province
|
||||||
|
?.region !=
|
||||||
|
null) {
|
||||||
|
Region currrentRegion = globalRegions!.firstWhere((Region region) =>
|
||||||
|
event.eligibityCert.examAddress!.cityMunicipality!.province!
|
||||||
|
.region!.code ==
|
||||||
|
region.code);
|
||||||
|
List<Province> provinces = await LocationUtils.instance
|
||||||
|
.getProvinces(regionCode: currrentRegion.code.toString());
|
||||||
|
Province currentProvince = provinces.firstWhere((Province province) =>
|
||||||
|
event.eligibityCert.examAddress!.cityMunicipality!.province!
|
||||||
|
.code ==
|
||||||
|
province.code);
|
||||||
|
List<CityMunicipality> cities = await LocationUtils.instance
|
||||||
|
.getCities(code: currentProvince.code.toString());
|
||||||
|
CityMunicipality currentCity = cities.firstWhere(
|
||||||
|
(CityMunicipality cityMunicipality) =>
|
||||||
|
event.eligibityCert.examAddress!.cityMunicipality!.code ==
|
||||||
|
cityMunicipality.code);
|
||||||
|
|
||||||
emit(EditEligibilityState(
|
emit(EditEligibilityState(
|
||||||
|
currentCity: currentCity,
|
||||||
|
selectedCountry: currentCountry,
|
||||||
|
currentProvince: currentProvince,
|
||||||
|
currentRegion: currrentRegion,
|
||||||
|
currentEligibility: currentEligibility,
|
||||||
|
provinces: provinces,
|
||||||
|
cities: cities,
|
||||||
isOverseas: isOverseas!,
|
isOverseas: isOverseas!,
|
||||||
eligibityCert: event.eligibityCert,
|
eligibityCert: event.eligibityCert,
|
||||||
countries: globalCountries!,
|
countries: globalCountries!,
|
||||||
regions: globalRegions!,
|
regions: globalRegions!,
|
||||||
eligibilities: globalEligibilities!));
|
eligibilities: globalEligibilities!));
|
||||||
|
} else {
|
||||||
// }catch(e){
|
emit(EditEligibilityState(
|
||||||
// emit(ProfileErrorState(mesage: e.toString()));
|
selectedCountry: currentCountry,
|
||||||
// }
|
currentCity: null,
|
||||||
|
currentProvince: null,
|
||||||
|
currentRegion: null,
|
||||||
|
provinces: null,
|
||||||
|
cities: null,
|
||||||
|
currentEligibility: currentEligibility,
|
||||||
|
isOverseas: isOverseas!,
|
||||||
|
eligibityCert: event.eligibityCert,
|
||||||
|
countries: globalCountries!,
|
||||||
|
regions: globalRegions!,
|
||||||
|
eligibilities: globalEligibilities!));
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
emit(ProfileErrorState(mesage: e.toString()));
|
||||||
|
}
|
||||||
|
});
|
||||||
////====================================================================
|
////====================================================================
|
||||||
|
on<UpdateEligibility>((event, emit) async {
|
||||||
|
try {
|
||||||
|
emit(ProfileLoading());
|
||||||
|
Map<dynamic, dynamic> status = await EligibilityService.instance.update(
|
||||||
|
eligibityCert: event.eligibityCert,
|
||||||
|
token: event.token,
|
||||||
|
profileId: int.parse(event.profileId),
|
||||||
|
oldEligibility: event.oldEligibility);
|
||||||
|
if (status['success']) {
|
||||||
|
EligibityCert newEligibility = EligibityCert.fromJson(status['data']);
|
||||||
|
eligibilities!.removeWhere(
|
||||||
|
(EligibityCert element) => element.id == event.eligibityCert.id);
|
||||||
|
eligibilities!.add(newEligibility);
|
||||||
|
emit(EligibilityEditedState(
|
||||||
|
eligibilities: eligibilities!, response: status));
|
||||||
|
} else {
|
||||||
|
emit(EligibilityEditedState(
|
||||||
|
eligibilities: eligibilities!, response: status));
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
emit(ProfileErrorState(mesage: e.toString()));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
on<ShowAddEligibilityForm>((event, emit) async {
|
on<ShowAddEligibilityForm>((event, emit) async {
|
||||||
emit(ProfileLoading());
|
emit(ProfileLoading());
|
||||||
|
@ -113,6 +203,7 @@ class ProfileBloc extends Bloc<ProfileEvent, ProfileState> {
|
||||||
emit(ProfileErrorState(mesage: e.toString()));
|
emit(ProfileErrorState(mesage: e.toString()));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
////====================================================================
|
||||||
on<AddEligibility>(
|
on<AddEligibility>(
|
||||||
(event, emit) async {
|
(event, emit) async {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -27,9 +27,9 @@ class LoadEligibility extends ProfileEvent {
|
||||||
List<Object> get props => [];
|
List<Object> get props => [];
|
||||||
}
|
}
|
||||||
|
|
||||||
class EditEligibility extends ProfileEvent {
|
class ShowEditEligibilityForm extends ProfileEvent {
|
||||||
final EligibityCert eligibityCert;
|
final EligibityCert eligibityCert;
|
||||||
const EditEligibility({required this.eligibityCert});
|
const ShowEditEligibilityForm({required this.eligibityCert});
|
||||||
@override
|
@override
|
||||||
List<Object> get props => [];
|
List<Object> get props => [];
|
||||||
}
|
}
|
||||||
|
@ -51,6 +51,15 @@ class DeleteEligibility extends ProfileEvent {
|
||||||
class ShowAddEligibilityForm extends ProfileEvent {
|
class ShowAddEligibilityForm extends ProfileEvent {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class GetEligibilities extends ProfileEvent{
|
||||||
|
final int profileId;
|
||||||
|
final String token;
|
||||||
|
const GetEligibilities({required this.profileId, required this.token});
|
||||||
|
@override
|
||||||
|
List<Object> get props => [profileId,token];
|
||||||
|
}
|
||||||
|
|
||||||
class AddEligibility extends ProfileEvent{
|
class AddEligibility extends ProfileEvent{
|
||||||
final EligibityCert eligibityCert;
|
final EligibityCert eligibityCert;
|
||||||
final String profileId;
|
final String profileId;
|
||||||
|
@ -59,3 +68,17 @@ class AddEligibility extends ProfileEvent{
|
||||||
@override
|
@override
|
||||||
List<Object> get props => [eligibityCert, profileId, token];
|
List<Object> get props => [eligibityCert, profileId, token];
|
||||||
}
|
}
|
||||||
|
class UpdateEligibility extends ProfileEvent{
|
||||||
|
final EligibityCert eligibityCert;
|
||||||
|
final String profileId;
|
||||||
|
final String token;
|
||||||
|
final int oldEligibility;
|
||||||
|
const UpdateEligibility({required this.eligibityCert, required this.oldEligibility,required this.profileId, required this.token});
|
||||||
|
|
||||||
|
@override
|
||||||
|
List<Object> get props =>[eligibityCert,profileId,token,oldEligibility];
|
||||||
|
}
|
||||||
|
|
||||||
|
class CallErrorState extends ProfileEvent{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -36,13 +36,27 @@ class EditEligibilityState extends ProfileState {
|
||||||
final List<Eligibility> eligibilities;
|
final List<Eligibility> eligibilities;
|
||||||
final List<Country> countries;
|
final List<Country> countries;
|
||||||
final List<Region> regions;
|
final List<Region> regions;
|
||||||
|
final List<Province>? provinces;
|
||||||
|
final List<CityMunicipality>? cities;
|
||||||
final bool isOverseas;
|
final bool isOverseas;
|
||||||
|
final Eligibility currentEligibility;
|
||||||
|
final Region? currentRegion;
|
||||||
|
final Province? currentProvince;
|
||||||
|
final CityMunicipality? currentCity;
|
||||||
|
final Country selectedCountry;
|
||||||
const EditEligibilityState({
|
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.isOverseas,
|
||||||
required this.eligibityCert,
|
required this.eligibityCert,
|
||||||
required this.eligibilities,
|
required this.eligibilities,
|
||||||
required this.countries,
|
required this.countries,
|
||||||
required this.regions,
|
required this.regions,
|
||||||
|
required this.selectedCountry,
|
||||||
});
|
});
|
||||||
@override
|
@override
|
||||||
List<Object> get props =>
|
List<Object> get props =>
|
||||||
|
@ -69,6 +83,13 @@ class AddEligibilityState extends ProfileState {
|
||||||
@override
|
@override
|
||||||
List<Object> get props => [eligibilities,countries,regions];
|
List<Object> get props => [eligibilities,countries,regions];
|
||||||
}
|
}
|
||||||
|
class EligibilityEditedState extends ProfileState{
|
||||||
|
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 ProfileState{
|
class EligibilityAddedState extends ProfileState{
|
||||||
final List<EligibityCert> eligibilities;
|
final List<EligibityCert> eligibilities;
|
||||||
|
|
|
@ -52,7 +52,9 @@ class EligibityCert {
|
||||||
examAddress: json['exam_address'] == null
|
examAddress: json['exam_address'] == null
|
||||||
? null
|
? null
|
||||||
: ExamAddress.fromJson(json["exam_address"]),
|
: ExamAddress.fromJson(json["exam_address"]),
|
||||||
validityDate: json["validity_date"],
|
validityDate: json['validity_date'] == null
|
||||||
|
? null
|
||||||
|
: DateTime.parse(json["validity_date"]),
|
||||||
licenseNumber: json["license_number"],
|
licenseNumber: json["license_number"],
|
||||||
overseas: null,
|
overseas: null,
|
||||||
);
|
);
|
||||||
|
@ -65,7 +67,7 @@ class EligibityCert {
|
||||||
"attachments": attachments,
|
"attachments": attachments,
|
||||||
"eligibility": eligibility!.toJson(),
|
"eligibility": eligibility!.toJson(),
|
||||||
"exam_address": examAddress!.toJson(),
|
"exam_address": examAddress!.toJson(),
|
||||||
"validity_date": validityDate,
|
"validity_date": "${validityDate!.year.toString().padLeft(4, '0')}-${validityDate!.month.toString().padLeft(2, '0')}-${validityDate!.day.toString().padLeft(2, '0')}",
|
||||||
"license_number": licenseNumber,
|
"license_number": licenseNumber,
|
||||||
};
|
};
|
||||||
@override
|
@override
|
||||||
|
|
|
@ -10,14 +10,14 @@ import 'package:unit2/model/profile/voluntary_works.dart';
|
||||||
import 'package:unit2/model/profile/work_history.dart';
|
import 'package:unit2/model/profile/work_history.dart';
|
||||||
|
|
||||||
class ProfileInformation{
|
class ProfileInformation{
|
||||||
BasicInfo basicInfo;
|
final BasicInfo basicInfo;
|
||||||
OtherInformation otherInformation;
|
// OtherInformation otherInformation;
|
||||||
List<EligibityCert> eligibilities;
|
// List<EligibityCert> eligibilities;
|
||||||
List<PersonalReference> references;
|
// List<PersonalReference> references;
|
||||||
List<LearningDevelopement> learningsAndDevelopment;
|
// List<LearningDevelopement> learningsAndDevelopment;
|
||||||
List<EducationalBackground> educationalBackgrounds;
|
// List<EducationalBackground> educationalBackgrounds;
|
||||||
List<FamilyBackground> families;
|
// List<FamilyBackground> families;
|
||||||
List<WorkHistory>workExperiences;
|
// List<WorkHistory>workExperiences;
|
||||||
List<VoluntaryWork> voluntaryWorks;
|
// List<VoluntaryWork> voluntaryWorks;
|
||||||
ProfileInformation({required this.families, required this.otherInformation, required this.voluntaryWorks, required this.workExperiences, required this.basicInfo,required this.eligibilities,required this.references, required this.learningsAndDevelopment,required this.educationalBackgrounds});
|
ProfileInformation({required this.basicInfo});
|
||||||
}
|
}
|
|
@ -4,7 +4,7 @@ import 'package:unit2/theme-data.dart/box_shadow.dart';
|
||||||
import 'package:unit2/theme-data.dart/colors.dart';
|
import 'package:unit2/theme-data.dart/colors.dart';
|
||||||
import 'package:unit2/utils/global.dart';
|
import 'package:unit2/utils/global.dart';
|
||||||
import 'package:unit2/utils/text_container.dart';
|
import 'package:unit2/utils/text_container.dart';
|
||||||
import 'package:unit2/widgets/add_leading.dart';
|
import 'package:unit2/widgets/Leadings/add_leading.dart';
|
||||||
import 'package:unit2/widgets/empty_data.dart';
|
import 'package:unit2/widgets/empty_data.dart';
|
||||||
|
|
||||||
class AddressScreen extends StatelessWidget {
|
class AddressScreen extends StatelessWidget {
|
||||||
|
|
|
@ -3,7 +3,7 @@ import 'package:unit2/model/profile/basic_information/contact_information.dart';
|
||||||
import 'package:unit2/theme-data.dart/box_shadow.dart';
|
import 'package:unit2/theme-data.dart/box_shadow.dart';
|
||||||
import 'package:unit2/theme-data.dart/colors.dart';
|
import 'package:unit2/theme-data.dart/colors.dart';
|
||||||
import 'package:unit2/utils/text_container.dart';
|
import 'package:unit2/utils/text_container.dart';
|
||||||
import 'package:unit2/widgets/add_leading.dart';
|
import 'package:unit2/widgets/Leadings/add_leading.dart';
|
||||||
import 'package:unit2/widgets/empty_data.dart';
|
import 'package:unit2/widgets/empty_data.dart';
|
||||||
|
|
||||||
class ContactInformationScreen extends StatelessWidget {
|
class ContactInformationScreen extends StatelessWidget {
|
||||||
|
|
|
@ -4,7 +4,7 @@ import 'package:unit2/theme-data.dart/box_shadow.dart';
|
||||||
import 'package:unit2/theme-data.dart/colors.dart';
|
import 'package:unit2/theme-data.dart/colors.dart';
|
||||||
import 'package:unit2/utils/global.dart';
|
import 'package:unit2/utils/global.dart';
|
||||||
import 'package:unit2/utils/text_container.dart';
|
import 'package:unit2/utils/text_container.dart';
|
||||||
import 'package:unit2/widgets/add_leading.dart';
|
import 'package:unit2/widgets/Leadings/add_leading.dart';
|
||||||
import 'package:unit2/widgets/empty_data.dart';
|
import 'package:unit2/widgets/empty_data.dart';
|
||||||
|
|
||||||
class IdentificationsScreen extends StatelessWidget {
|
class IdentificationsScreen extends StatelessWidget {
|
||||||
|
|
|
@ -4,7 +4,7 @@ import 'package:unit2/model/profile/educational_background.dart';
|
||||||
import 'package:unit2/theme-data.dart/box_shadow.dart';
|
import 'package:unit2/theme-data.dart/box_shadow.dart';
|
||||||
import 'package:unit2/theme-data.dart/colors.dart';
|
import 'package:unit2/theme-data.dart/colors.dart';
|
||||||
import 'package:unit2/utils/text_container.dart';
|
import 'package:unit2/utils/text_container.dart';
|
||||||
import 'package:unit2/widgets/add_leading.dart';
|
import 'package:unit2/widgets/Leadings/add_leading.dart';
|
||||||
import 'package:unit2/widgets/empty_data.dart';
|
import 'package:unit2/widgets/empty_data.dart';
|
||||||
|
|
||||||
class EducationScreen extends StatelessWidget {
|
class EducationScreen extends StatelessWidget {
|
||||||
|
|
|
@ -124,6 +124,8 @@ class _AddEligibilityScreenState extends State<AddEligibilityScreen> {
|
||||||
Flexible(
|
Flexible(
|
||||||
flex: 1,
|
flex: 1,
|
||||||
child: FormBuilderTextField(
|
child: FormBuilderTextField(
|
||||||
|
keyboardType: const TextInputType
|
||||||
|
.numberWithOptions(),
|
||||||
onChanged: (value) {
|
onChanged: (value) {
|
||||||
rating = value;
|
rating = value;
|
||||||
},
|
},
|
||||||
|
@ -223,7 +225,9 @@ class _AddEligibilityScreenState extends State<AddEligibilityScreen> {
|
||||||
? FormBuilderDropdown<Country>(
|
? FormBuilderDropdown<Country>(
|
||||||
initialValue: null,
|
initialValue: null,
|
||||||
validator: (value) =>
|
validator: (value) =>
|
||||||
value == null ? 'required' : null,
|
value == null
|
||||||
|
? 'required'
|
||||||
|
: null,
|
||||||
items: state.countries.map<
|
items: state.countries.map<
|
||||||
DropdownMenuItem<
|
DropdownMenuItem<
|
||||||
Country>>(
|
Country>>(
|
||||||
|
@ -250,7 +254,9 @@ class _AddEligibilityScreenState extends State<AddEligibilityScreen> {
|
||||||
AutovalidateMode
|
AutovalidateMode
|
||||||
.onUserInteraction,
|
.onUserInteraction,
|
||||||
validator: (value) =>
|
validator: (value) =>
|
||||||
value == null ? 'required' : null,
|
value == null
|
||||||
|
? 'required'
|
||||||
|
: null,
|
||||||
onChanged:
|
onChanged:
|
||||||
(Region? region) async {
|
(Region? region) async {
|
||||||
setState(() {
|
setState(() {
|
||||||
|
@ -283,14 +289,16 @@ class _AddEligibilityScreenState extends State<AddEligibilityScreen> {
|
||||||
height: 70,
|
height: 70,
|
||||||
child: ModalProgressHUD(
|
child: ModalProgressHUD(
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
inAsyncCall: cityCall,
|
inAsyncCall: provinceCall,
|
||||||
child: DropdownButtonFormField<
|
child: DropdownButtonFormField<
|
||||||
Province?>(
|
Province?>(
|
||||||
autovalidateMode:
|
autovalidateMode:
|
||||||
AutovalidateMode
|
AutovalidateMode
|
||||||
.onUserInteraction,
|
.onUserInteraction,
|
||||||
validator: (value) =>
|
validator: (value) =>
|
||||||
value == null ? 'required' : null,
|
value == null
|
||||||
|
? 'required'
|
||||||
|
: null,
|
||||||
isExpanded: true,
|
isExpanded: true,
|
||||||
value: selectedProvince,
|
value: selectedProvince,
|
||||||
onChanged: (Province?
|
onChanged: (Province?
|
||||||
|
@ -325,16 +333,20 @@ class _AddEligibilityScreenState extends State<AddEligibilityScreen> {
|
||||||
"Province")),
|
"Province")),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(
|
|
||||||
height: 20,
|
// CityMunicipalities dropdown
|
||||||
),
|
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 70,
|
height: 70,
|
||||||
|
child: ModalProgressHUD(
|
||||||
|
color: Colors.white,
|
||||||
|
inAsyncCall: cityCall,
|
||||||
child:
|
child:
|
||||||
DropdownButtonFormField<
|
DropdownButtonFormField<
|
||||||
CityMunicipality>(
|
CityMunicipality>(
|
||||||
validator: (value) =>
|
validator: (value) =>
|
||||||
value == null ? 'required' : null,
|
value == null
|
||||||
|
? 'required'
|
||||||
|
: null,
|
||||||
isExpanded: true,
|
isExpanded: true,
|
||||||
onChanged:
|
onChanged:
|
||||||
(CityMunicipality?
|
(CityMunicipality?
|
||||||
|
@ -346,7 +358,8 @@ class _AddEligibilityScreenState extends State<AddEligibilityScreen> {
|
||||||
normalTextFieldStyle(
|
normalTextFieldStyle(
|
||||||
"Municipality*",
|
"Municipality*",
|
||||||
"Municipality"),
|
"Municipality"),
|
||||||
value: selectedMunicipality,
|
value:
|
||||||
|
selectedMunicipality,
|
||||||
items: citymuns == null
|
items: citymuns == null
|
||||||
? []
|
? []
|
||||||
: citymuns!.map<
|
: citymuns!.map<
|
||||||
|
@ -361,6 +374,7 @@ class _AddEligibilityScreenState extends State<AddEligibilityScreen> {
|
||||||
}).toList(),
|
}).toList(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
height: 20,
|
height: 20,
|
||||||
),
|
),
|
||||||
|
@ -380,9 +394,11 @@ class _AddEligibilityScreenState extends State<AddEligibilityScreen> {
|
||||||
style: mainBtnStyle(
|
style: mainBtnStyle(
|
||||||
primary, Colors.transparent, second),
|
primary, Colors.transparent, second),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
|
//rating
|
||||||
double? rate = rating == null
|
double? rate = rating == null
|
||||||
? null
|
? null
|
||||||
: double.parse(rating!);
|
: double.parse(rating!);
|
||||||
|
//lisence
|
||||||
String? licenseNumber = license;
|
String? licenseNumber = license;
|
||||||
CityMunicipality? cityMunicipality =
|
CityMunicipality? cityMunicipality =
|
||||||
selectedMunicipality;
|
selectedMunicipality;
|
||||||
|
@ -450,17 +466,23 @@ class _AddEligibilityScreenState extends State<AddEligibilityScreen> {
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> getProvinces() async {
|
Future<void> getProvinces() async {
|
||||||
|
try {
|
||||||
List<Province> newProvinces = await LocationUtils.instance
|
List<Province> newProvinces = await LocationUtils.instance
|
||||||
.getProvinces(regionCode: selectedRegion!.code.toString());
|
.getProvinces(regionCode: selectedRegion!.code.toString());
|
||||||
setState(() {
|
setState(() {
|
||||||
provinces = newProvinces;
|
provinces = newProvinces;
|
||||||
selectedProvince = provinces![0];
|
selectedProvince = provinces![0];
|
||||||
getCities();
|
|
||||||
provinceCall = false;
|
provinceCall = false;
|
||||||
|
cityCall = true;
|
||||||
|
getCities();
|
||||||
});
|
});
|
||||||
|
} catch (e) {
|
||||||
|
context.read<ProfileBloc>().add(CallErrorState());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> getCities() async {
|
Future<void> getCities() async {
|
||||||
|
try {
|
||||||
List<CityMunicipality> newCities = await LocationUtils.instance
|
List<CityMunicipality> newCities = await LocationUtils.instance
|
||||||
.getCities(code: selectedProvince!.code.toString());
|
.getCities(code: selectedProvince!.code.toString());
|
||||||
citymuns = newCities;
|
citymuns = newCities;
|
||||||
|
@ -468,5 +490,8 @@ class _AddEligibilityScreenState extends State<AddEligibilityScreen> {
|
||||||
selectedMunicipality = newCities[0];
|
selectedMunicipality = newCities[0];
|
||||||
cityCall = false;
|
cityCall = false;
|
||||||
});
|
});
|
||||||
|
} catch (e) {
|
||||||
|
context.read<ProfileBloc>().add(CallErrorState());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,13 +2,11 @@ import 'package:date_time_picker/date_time_picker.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:flutter_form_builder/flutter_form_builder.dart';
|
import 'package:flutter_form_builder/flutter_form_builder.dart';
|
||||||
import 'package:flutter_progress_hud/flutter_progress_hud.dart';
|
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
import 'package:modal_progress_hud_nsn/modal_progress_hud_nsn.dart';
|
import 'package:modal_progress_hud_nsn/modal_progress_hud_nsn.dart';
|
||||||
import 'package:unit2/bloc/profile/profile_bloc.dart';
|
import 'package:unit2/bloc/profile/profile_bloc.dart';
|
||||||
import 'package:unit2/bloc/user/user_bloc.dart';
|
import 'package:unit2/bloc/user/user_bloc.dart';
|
||||||
import 'package:unit2/model/location/city.dart';
|
import 'package:unit2/model/location/city.dart';
|
||||||
import 'package:unit2/model/login_data/employee_info/employee_info.dart';
|
|
||||||
import 'package:unit2/model/profile/eligibility.dart';
|
import 'package:unit2/model/profile/eligibility.dart';
|
||||||
import 'package:unit2/model/utils/eligibility.dart';
|
import 'package:unit2/model/utils/eligibility.dart';
|
||||||
import 'package:unit2/utils/location_utilities.dart';
|
import 'package:unit2/utils/location_utilities.dart';
|
||||||
|
@ -33,18 +31,23 @@ class _EditEligibilityScreenState extends State<EditEligibilityScreen> {
|
||||||
final formKey = GlobalKey<FormBuilderState>();
|
final formKey = GlobalKey<FormBuilderState>();
|
||||||
final provinceKey = GlobalKey<FormBuilderState>();
|
final provinceKey = GlobalKey<FormBuilderState>();
|
||||||
bool? overseas;
|
bool? overseas;
|
||||||
|
List<Province>? provinces;
|
||||||
|
List<CityMunicipality>? citymuns;
|
||||||
|
List<Region>? regions;
|
||||||
DateFormat dteFormat2 = DateFormat.yMMMMd('en_US');
|
DateFormat dteFormat2 = DateFormat.yMMMMd('en_US');
|
||||||
Region? selectedRegion;
|
Region? selectedRegion;
|
||||||
Province? selectedProvince;
|
Province? selectedProvince;
|
||||||
CityMunicipality? selectedMunicipality;
|
CityMunicipality? selectedMunicipality;
|
||||||
Country? selectedCountry;
|
Country? selectedCountry;
|
||||||
Eligibility? selectedEligibility;
|
Eligibility? selectedEligibility;
|
||||||
List<Province>? provinces;
|
|
||||||
List<CityMunicipality>? citymuns;
|
|
||||||
bool provinceCall = false;
|
bool provinceCall = false;
|
||||||
bool cityCall = false;
|
bool cityCall = false;
|
||||||
// final examDateController = TextEditingController();
|
String? token;
|
||||||
// final validityDateController = TextEditingController();
|
String? profileId;
|
||||||
|
String? rating;
|
||||||
|
String? license;
|
||||||
|
final examDateController = TextEditingController();
|
||||||
|
final validityDateController = TextEditingController();
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
//USERBLOC
|
//USERBLOC
|
||||||
|
@ -53,6 +56,8 @@ class _EditEligibilityScreenState extends State<EditEligibilityScreen> {
|
||||||
//LOGGED IN USER STATE
|
//LOGGED IN USER STATE
|
||||||
if (state is UserLoggedIn) {
|
if (state is UserLoggedIn) {
|
||||||
//PROFIILE BLOC
|
//PROFIILE BLOC
|
||||||
|
token = state.userData!.user!.login!.token;
|
||||||
|
profileId = state.userData!.user!.login!.user!.profileId.toString();
|
||||||
return BlocBuilder<ProfileBloc, ProfileState>(
|
return BlocBuilder<ProfileBloc, ProfileState>(
|
||||||
buildWhen: (previous, current) {
|
buildWhen: (previous, current) {
|
||||||
if (state is EditEligibilityState) {}
|
if (state is EditEligibilityState) {}
|
||||||
|
@ -61,8 +66,20 @@ class _EditEligibilityScreenState extends State<EditEligibilityScreen> {
|
||||||
builder: (context, state) {
|
builder: (context, state) {
|
||||||
//EDIT ELIGIBILITY STATE
|
//EDIT ELIGIBILITY STATE
|
||||||
if (state is EditEligibilityState) {
|
if (state is EditEligibilityState) {
|
||||||
return ProgressHUD(
|
examDateController.text = state.eligibityCert.examDate == null?'': state.eligibityCert.examDate.toString();
|
||||||
child: Center(
|
validityDateController.text = state.eligibityCert.validityDate == null?'': state.eligibityCert.validityDate.toString();
|
||||||
|
|
||||||
|
provinces = state.provinces;
|
||||||
|
citymuns = state.cities;
|
||||||
|
regions = state.regions;
|
||||||
|
overseas = state.isOverseas;
|
||||||
|
selectedRegion = state.currentRegion;
|
||||||
|
selectedProvince = state.currentProvince;
|
||||||
|
selectedMunicipality = state.currentCity;
|
||||||
|
selectedEligibility= state.currentEligibility;
|
||||||
|
rating = state.eligibityCert.rating?.toString();
|
||||||
|
license = state.eligibityCert.licenseNumber;
|
||||||
|
return Center(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.symmetric(
|
padding: const EdgeInsets.symmetric(
|
||||||
vertical: 25, horizontal: 18),
|
vertical: 25, horizontal: 18),
|
||||||
|
@ -73,11 +90,14 @@ class _EditEligibilityScreenState extends State<EditEligibilityScreen> {
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
//ELIGIBILITIES DROPDOWN
|
//ELIGIBILITIES DROPDOWN
|
||||||
FormBuilderDropdown<Eligibility>(
|
DropdownButtonFormField<Eligibility>(
|
||||||
|
validator: (value) =>
|
||||||
|
value == null ? 'required' : null,
|
||||||
|
isExpanded: true,
|
||||||
onChanged: (Eligibility? eligibility) {
|
onChanged: (Eligibility? eligibility) {
|
||||||
selectedEligibility = eligibility;
|
selectedEligibility = eligibility;
|
||||||
},
|
},
|
||||||
initialValue: null,
|
value: selectedEligibility,
|
||||||
items: state.eligibilities
|
items: state.eligibilities
|
||||||
.map<DropdownMenuItem<Eligibility>>(
|
.map<DropdownMenuItem<Eligibility>>(
|
||||||
(Eligibility eligibility) {
|
(Eligibility eligibility) {
|
||||||
|
@ -85,16 +105,8 @@ class _EditEligibilityScreenState extends State<EditEligibilityScreen> {
|
||||||
value: eligibility,
|
value: eligibility,
|
||||||
child: Text(eligibility.title));
|
child: Text(eligibility.title));
|
||||||
}).toList(),
|
}).toList(),
|
||||||
name: "eligibility",
|
|
||||||
decoration:
|
decoration:
|
||||||
normalTextFieldStyle("Eligibility", "")
|
normalTextFieldStyle("Eligibility", "")),
|
||||||
.copyWith(
|
|
||||||
hintStyle: const TextStyle(
|
|
||||||
color: Colors.black,
|
|
||||||
),
|
|
||||||
labelStyle: const TextStyle(
|
|
||||||
color: Colors.black)),
|
|
||||||
),
|
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
height: 20,
|
height: 20,
|
||||||
),
|
),
|
||||||
|
@ -107,9 +119,12 @@ class _EditEligibilityScreenState extends State<EditEligibilityScreen> {
|
||||||
Flexible(
|
Flexible(
|
||||||
flex: 1,
|
flex: 1,
|
||||||
child: FormBuilderTextField(
|
child: FormBuilderTextField(
|
||||||
|
onChanged: (value) {
|
||||||
|
license = value;
|
||||||
|
},
|
||||||
name: 'license_number',
|
name: 'license_number',
|
||||||
initialValue:
|
initialValue:
|
||||||
widget.eligibityCert.licenseNumber,
|
license,
|
||||||
decoration: normalTextFieldStyle(
|
decoration: normalTextFieldStyle(
|
||||||
"license number", "license number"),
|
"license number", "license number"),
|
||||||
),
|
),
|
||||||
|
@ -121,15 +136,15 @@ class _EditEligibilityScreenState extends State<EditEligibilityScreen> {
|
||||||
Flexible(
|
Flexible(
|
||||||
flex: 1,
|
flex: 1,
|
||||||
child: FormBuilderTextField(
|
child: FormBuilderTextField(
|
||||||
|
keyboardType: const TextInputType
|
||||||
|
.numberWithOptions(),
|
||||||
|
onChanged: (value) {
|
||||||
|
rating = value;
|
||||||
|
},
|
||||||
name: 'rating',
|
name: 'rating',
|
||||||
|
initialValue: rating == null
|
||||||
// ignore: prefer_null_aware_operators
|
? 'N/A'
|
||||||
initialValue:
|
: rating.toString(),
|
||||||
widget.eligibityCert.rating == null
|
|
||||||
? null
|
|
||||||
: widget.eligibityCert.rating
|
|
||||||
.toString(),
|
|
||||||
|
|
||||||
decoration: normalTextFieldStyle(
|
decoration: normalTextFieldStyle(
|
||||||
'rating', 'rating'),
|
'rating', 'rating'),
|
||||||
),
|
),
|
||||||
|
@ -148,17 +163,17 @@ class _EditEligibilityScreenState extends State<EditEligibilityScreen> {
|
||||||
Flexible(
|
Flexible(
|
||||||
flex: 1,
|
flex: 1,
|
||||||
child: DateTimePicker(
|
child: DateTimePicker(
|
||||||
// controller: examDateController,
|
use24HourFormat: false,
|
||||||
firstDate: DateTime(2000),
|
controller: examDateController,
|
||||||
|
firstDate: DateTime(1970),
|
||||||
lastDate: DateTime(2100),
|
lastDate: DateTime(2100),
|
||||||
decoration: normalTextFieldStyle(
|
decoration: normalTextFieldStyle(
|
||||||
"Exam date", "Exam date"),
|
"Exam date", "")
|
||||||
initialValue:
|
.copyWith(
|
||||||
widget.eligibityCert.examDate ==
|
prefixIcon: const Icon(
|
||||||
null
|
Icons.date_range,
|
||||||
? ''
|
color: Colors.black87,
|
||||||
: dteFormat2.format(widget
|
)),
|
||||||
.eligibityCert.examDate!),
|
|
||||||
)),
|
)),
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
width: 12,
|
width: 12,
|
||||||
|
@ -167,18 +182,17 @@ class _EditEligibilityScreenState extends State<EditEligibilityScreen> {
|
||||||
Flexible(
|
Flexible(
|
||||||
flex: 1,
|
flex: 1,
|
||||||
child: DateTimePicker(
|
child: DateTimePicker(
|
||||||
// controller: validityDateController,
|
use24HourFormat: false,
|
||||||
firstDate: DateTime(2000),
|
controller: validityDateController,
|
||||||
|
firstDate: DateTime(1970),
|
||||||
lastDate: DateTime(2100),
|
lastDate: DateTime(2100),
|
||||||
decoration: normalTextFieldStyle(
|
decoration: normalTextFieldStyle(
|
||||||
"Validity date", "Validity date"),
|
"validity date", "")
|
||||||
initialValue:
|
.copyWith(
|
||||||
widget.eligibityCert.validityDate ==
|
prefixIcon: const Icon(
|
||||||
null
|
Icons.date_range,
|
||||||
? ''
|
color: Colors.black87,
|
||||||
: dteFormat2.format(widget
|
)),
|
||||||
.eligibityCert
|
|
||||||
.validityDate!),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -198,7 +212,9 @@ class _EditEligibilityScreenState extends State<EditEligibilityScreen> {
|
||||||
height: 12,
|
height: 12,
|
||||||
),
|
),
|
||||||
//OVERSEAS ADDRESS SWITCH
|
//OVERSEAS ADDRESS SWITCH
|
||||||
Column(
|
StatefulBuilder(
|
||||||
|
builder: (context, StateSetter setState) {
|
||||||
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
FormBuilderSwitch(
|
FormBuilderSwitch(
|
||||||
initialValue: overseas,
|
initialValue: overseas,
|
||||||
|
@ -219,7 +235,12 @@ class _EditEligibilityScreenState extends State<EditEligibilityScreen> {
|
||||||
SizedBox(
|
SizedBox(
|
||||||
child: overseas == true
|
child: overseas == true
|
||||||
? FormBuilderDropdown<Country>(
|
? FormBuilderDropdown<Country>(
|
||||||
initialValue: null,
|
validator: (value) =>
|
||||||
|
value == null
|
||||||
|
? 'required'
|
||||||
|
: null,
|
||||||
|
initialValue:
|
||||||
|
state.selectedCountry,
|
||||||
items: state.countries.map<
|
items: state.countries.map<
|
||||||
DropdownMenuItem<
|
DropdownMenuItem<
|
||||||
Country>>(
|
Country>>(
|
||||||
|
@ -241,21 +262,51 @@ class _EditEligibilityScreenState extends State<EditEligibilityScreen> {
|
||||||
: Column(
|
: Column(
|
||||||
children: [
|
children: [
|
||||||
//REGION DROPDOWN
|
//REGION DROPDOWN
|
||||||
FormBuilderDropdown<Region?>(
|
DropdownButtonFormField<
|
||||||
|
Region?>(
|
||||||
|
validator: (value) =>
|
||||||
|
value == null
|
||||||
|
? 'required'
|
||||||
|
: null,
|
||||||
|
isExpanded: true,
|
||||||
onChanged:
|
onChanged:
|
||||||
(Region? region) async {
|
(Region? region) async {
|
||||||
setState(() {
|
setState(() {
|
||||||
provinceCall = true;
|
provinceCall = true;
|
||||||
});
|
});
|
||||||
selectedRegion = region;
|
selectedRegion = region;
|
||||||
getProvinces();
|
provinces = await LocationUtils
|
||||||
|
.instance
|
||||||
|
.getProvinces(
|
||||||
|
regionCode:
|
||||||
|
selectedRegion!
|
||||||
|
.code
|
||||||
|
.toString());
|
||||||
|
selectedProvince =
|
||||||
|
provinces![0];
|
||||||
|
setState(() {
|
||||||
|
provinceCall = false;
|
||||||
|
cityCall = true;
|
||||||
|
});
|
||||||
|
citymuns = await LocationUtils
|
||||||
|
.instance
|
||||||
|
.getCities(
|
||||||
|
code:
|
||||||
|
selectedProvince!
|
||||||
|
.code!);
|
||||||
|
selectedMunicipality =
|
||||||
|
citymuns![0];
|
||||||
|
setState(() {
|
||||||
|
cityCall = false;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
initialValue: selectedRegion,
|
value: selectedRegion,
|
||||||
decoration:
|
decoration:
|
||||||
normalTextFieldStyle(
|
normalTextFieldStyle(
|
||||||
"Region*", "Region"),
|
"Region*", "Region"),
|
||||||
name: 'region',
|
items: regions == null
|
||||||
items: state.regions.map<
|
? []
|
||||||
|
: regions!.map<
|
||||||
DropdownMenuItem<
|
DropdownMenuItem<
|
||||||
Region>>(
|
Region>>(
|
||||||
(Region region) {
|
(Region region) {
|
||||||
|
@ -271,20 +322,36 @@ class _EditEligibilityScreenState extends State<EditEligibilityScreen> {
|
||||||
),
|
),
|
||||||
//PROVINCE DROPDOWN
|
//PROVINCE DROPDOWN
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 50,
|
height: 70,
|
||||||
child: ModalProgressHUD(
|
child: ModalProgressHUD(
|
||||||
inAsyncCall: cityCall,
|
color: Colors.transparent,
|
||||||
|
inAsyncCall: provinceCall,
|
||||||
child: DropdownButtonFormField<
|
child: DropdownButtonFormField<
|
||||||
Province?>(
|
Province?>(
|
||||||
|
validator: (value) =>
|
||||||
|
value == null
|
||||||
|
? 'required'
|
||||||
|
: null,
|
||||||
isExpanded: true,
|
isExpanded: true,
|
||||||
value: selectedProvince,
|
value: selectedProvince,
|
||||||
onChanged: (Province?
|
onChanged: (Province?
|
||||||
province) {
|
province) async {
|
||||||
setState(() {
|
setState(() {
|
||||||
cityCall = true;
|
cityCall = true;
|
||||||
});
|
});
|
||||||
selectedProvince = province;
|
selectedProvince =
|
||||||
getCities();
|
province;
|
||||||
|
citymuns = await LocationUtils
|
||||||
|
.instance
|
||||||
|
.getCities(
|
||||||
|
code: selectedProvince!
|
||||||
|
.code
|
||||||
|
.toString());
|
||||||
|
selectedMunicipality =
|
||||||
|
citymuns![0];
|
||||||
|
setState(() {
|
||||||
|
cityCall = false;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
items: provinces == null
|
items: provinces == null
|
||||||
? []
|
? []
|
||||||
|
@ -296,7 +363,8 @@ class _EditEligibilityScreenState extends State<EditEligibilityScreen> {
|
||||||
return DropdownMenuItem(
|
return DropdownMenuItem(
|
||||||
value:
|
value:
|
||||||
province,
|
province,
|
||||||
child: FittedBox(
|
child:
|
||||||
|
FittedBox(
|
||||||
child: Text(
|
child: Text(
|
||||||
province
|
province
|
||||||
.description!),
|
.description!),
|
||||||
|
@ -308,13 +376,21 @@ class _EditEligibilityScreenState extends State<EditEligibilityScreen> {
|
||||||
"Province")),
|
"Province")),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(
|
|
||||||
height: 20,
|
// City municipality
|
||||||
),
|
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 50,
|
height: 70,
|
||||||
child: DropdownButtonFormField<
|
child: ModalProgressHUD(
|
||||||
|
color: Colors.transparent,
|
||||||
|
inAsyncCall: cityCall,
|
||||||
|
child:
|
||||||
|
DropdownButtonFormField<
|
||||||
CityMunicipality>(
|
CityMunicipality>(
|
||||||
|
validator: (value) =>
|
||||||
|
value == null
|
||||||
|
? 'required'
|
||||||
|
: null,
|
||||||
|
isExpanded: true,
|
||||||
onChanged:
|
onChanged:
|
||||||
(CityMunicipality?
|
(CityMunicipality?
|
||||||
city) {
|
city) {
|
||||||
|
@ -325,7 +401,8 @@ class _EditEligibilityScreenState extends State<EditEligibilityScreen> {
|
||||||
normalTextFieldStyle(
|
normalTextFieldStyle(
|
||||||
"Municipality*",
|
"Municipality*",
|
||||||
"Municipality"),
|
"Municipality"),
|
||||||
value: selectedMunicipality,
|
value:
|
||||||
|
selectedMunicipality,
|
||||||
items: citymuns == null
|
items: citymuns == null
|
||||||
? []
|
? []
|
||||||
: citymuns!.map<
|
: citymuns!.map<
|
||||||
|
@ -340,13 +417,15 @@ class _EditEligibilityScreenState extends State<EditEligibilityScreen> {
|
||||||
}).toList(),
|
}).toList(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
height: 20,
|
height: 20,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
),
|
);
|
||||||
|
}),
|
||||||
|
|
||||||
const Expanded(
|
const Expanded(
|
||||||
child: SizedBox(),
|
child: SizedBox(),
|
||||||
|
@ -358,7 +437,56 @@ class _EditEligibilityScreenState extends State<EditEligibilityScreen> {
|
||||||
child: ElevatedButton(
|
child: ElevatedButton(
|
||||||
style: mainBtnStyle(
|
style: mainBtnStyle(
|
||||||
primary, Colors.transparent, second),
|
primary, Colors.transparent, second),
|
||||||
onPressed: () {},
|
onPressed: () {
|
||||||
|
|
||||||
|
//rating
|
||||||
|
double? rate = rating == null
|
||||||
|
? null
|
||||||
|
: double.parse(rating!);
|
||||||
|
//license
|
||||||
|
String? newLicense = license;
|
||||||
|
//city municipality
|
||||||
|
CityMunicipality? cityMunicipality =
|
||||||
|
selectedMunicipality;
|
||||||
|
//exam date
|
||||||
|
DateTime? examDate =
|
||||||
|
examDateController.text.isEmpty
|
||||||
|
? null
|
||||||
|
: DateTime.parse(
|
||||||
|
examDateController.text);
|
||||||
|
// validity date
|
||||||
|
DateTime? validityDate =
|
||||||
|
validityDateController.text.isEmpty
|
||||||
|
? null
|
||||||
|
: DateTime.parse(
|
||||||
|
validityDateController.text);
|
||||||
|
// exam address
|
||||||
|
ExamAddress examAddress = ExamAddress(
|
||||||
|
barangay: state.eligibityCert.examAddress?.barangay,
|
||||||
|
id: state.eligibityCert.examAddress?.id,
|
||||||
|
addressCategory: state.eligibityCert.examAddress?.addressCategory,
|
||||||
|
examAddressClass: state.eligibityCert.examAddress?.examAddressClass,
|
||||||
|
country: selectedCountry ??= Country(
|
||||||
|
id: 175,
|
||||||
|
name: 'Philippines',
|
||||||
|
code: 'PH'),
|
||||||
|
cityMunicipality: cityMunicipality);
|
||||||
|
EligibityCert eligibityCert =
|
||||||
|
EligibityCert(
|
||||||
|
id: state.eligibityCert.id,
|
||||||
|
rating: rate,
|
||||||
|
examDate: examDate,
|
||||||
|
attachments: null,
|
||||||
|
eligibility: selectedEligibility,
|
||||||
|
examAddress: examAddress,
|
||||||
|
validityDate: validityDate,
|
||||||
|
licenseNumber: newLicense,
|
||||||
|
overseas: overseas);
|
||||||
|
if (formKey.currentState!
|
||||||
|
.saveAndValidate()) {
|
||||||
|
context.read<ProfileBloc>().add(UpdateEligibility(eligibityCert: eligibityCert, oldEligibility: state.eligibityCert.eligibility!.id, profileId: profileId!, token: token!));
|
||||||
|
}
|
||||||
|
},
|
||||||
child: const Text(submit)),
|
child: const Text(submit)),
|
||||||
),
|
),
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
|
@ -367,7 +495,6 @@ class _EditEligibilityScreenState extends State<EditEligibilityScreen> {
|
||||||
]),
|
]),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return Container();
|
return Container();
|
||||||
|
@ -378,23 +505,4 @@ class _EditEligibilityScreenState extends State<EditEligibilityScreen> {
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> getProvinces() async {
|
|
||||||
List<Province> _provinces = await LocationUtils.instance
|
|
||||||
.getProvinces(regionCode: selectedRegion!.code.toString());
|
|
||||||
setState(() {
|
|
||||||
provinces = _provinces;
|
|
||||||
selectedProvince = provinces![0];
|
|
||||||
getCities();
|
|
||||||
provinceCall = false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
Future<void> getCities()async{
|
|
||||||
List<CityMunicipality> _cities = await LocationUtils.instance.getCities(code: selectedProvince!.code.toString());
|
|
||||||
citymuns = _cities;
|
|
||||||
setState(() {
|
|
||||||
selectedMunicipality = _cities[0];
|
|
||||||
cityCall = false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@ import 'package:app_popup_menu/app_popup_menu.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:flutter_progress_hud/flutter_progress_hud.dart';
|
import 'package:flutter_progress_hud/flutter_progress_hud.dart';
|
||||||
|
import 'package:flutter_spinkit/flutter_spinkit.dart';
|
||||||
import 'package:fluttericon/font_awesome_icons.dart';
|
import 'package:fluttericon/font_awesome_icons.dart';
|
||||||
import 'package:unit2/bloc/profile/profile_bloc.dart';
|
import 'package:unit2/bloc/profile/profile_bloc.dart';
|
||||||
import 'package:unit2/bloc/user/user_bloc.dart';
|
import 'package:unit2/bloc/user/user_bloc.dart';
|
||||||
|
@ -12,9 +13,9 @@ import 'package:unit2/theme-data.dart/box_shadow.dart';
|
||||||
import 'package:unit2/theme-data.dart/colors.dart';
|
import 'package:unit2/theme-data.dart/colors.dart';
|
||||||
import 'package:unit2/utils/global.dart';
|
import 'package:unit2/utils/global.dart';
|
||||||
import 'package:unit2/utils/text_container.dart';
|
import 'package:unit2/utils/text_container.dart';
|
||||||
import 'package:unit2/widgets/add_leading.dart';
|
import 'package:unit2/widgets/Leadings/add_leading.dart';
|
||||||
|
import 'package:unit2/widgets/Leadings/close_leading.dart';
|
||||||
import 'package:unit2/widgets/empty_data.dart';
|
import 'package:unit2/widgets/empty_data.dart';
|
||||||
|
|
||||||
import '../../../utils/alerts.dart';
|
import '../../../utils/alerts.dart';
|
||||||
|
|
||||||
class EligibiltyScreen extends StatelessWidget {
|
class EligibiltyScreen extends StatelessWidget {
|
||||||
|
@ -24,15 +25,33 @@ class EligibiltyScreen extends StatelessWidget {
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
String? token;
|
String? token;
|
||||||
String? profileId;
|
String? profileId;
|
||||||
return Scaffold(
|
List<EligibityCert>? eligibilities;
|
||||||
|
return WillPopScope(
|
||||||
|
onWillPop: () async {
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
child: Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: const Text(elibilityScreenTitle),
|
title: context.watch<ProfileBloc>().state is AddEligibilityState
|
||||||
|
? const Text("Add Eligiblity")
|
||||||
|
: context.watch<ProfileBloc>().state is EditEligibilityState
|
||||||
|
? const Text("Edit Eligibilty")
|
||||||
|
: const Text(elibilityScreenTitle),
|
||||||
centerTitle: true,
|
centerTitle: true,
|
||||||
backgroundColor: primary,
|
backgroundColor: primary,
|
||||||
actions: [
|
actions: (context.watch<ProfileBloc>().state is EligibilityLoaded ||
|
||||||
|
context.watch<ProfileBloc>().state is ProfileLoading)
|
||||||
|
? [
|
||||||
AddLeading(onPressed: () {
|
AddLeading(onPressed: () {
|
||||||
context.read<ProfileBloc>().add(ShowAddEligibilityForm());
|
context.read<ProfileBloc>().add(ShowAddEligibilityForm());
|
||||||
})
|
})
|
||||||
|
]
|
||||||
|
: [
|
||||||
|
CloseLeading(onPressed: () {
|
||||||
|
context
|
||||||
|
.read<ProfileBloc>()
|
||||||
|
.add(GetEligibilities(profileId: int.parse(profileId!), token: token!));
|
||||||
|
})
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
body: BlocBuilder<UserBloc, UserState>(
|
body: BlocBuilder<UserBloc, UserState>(
|
||||||
|
@ -42,26 +61,33 @@ class EligibiltyScreen extends StatelessWidget {
|
||||||
profileId =
|
profileId =
|
||||||
state.userData!.user!.login!.user!.profileId.toString();
|
state.userData!.user!.login!.user!.profileId.toString();
|
||||||
return ProgressHUD(
|
return ProgressHUD(
|
||||||
|
padding: const EdgeInsets.all(24),
|
||||||
|
indicatorWidget: const SpinKitFadingCircle(
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
backgroundColor: Colors.black87,
|
||||||
child: BlocConsumer<ProfileBloc, ProfileState>(
|
child: BlocConsumer<ProfileBloc, ProfileState>(
|
||||||
listener: (context, state) {
|
listener: (context, state) {
|
||||||
if (state is EditEligibilityState) {
|
|
||||||
final progress = ProgressHUD.of(context);
|
|
||||||
progress!.dismiss();
|
|
||||||
}
|
|
||||||
if (state is ProfileLoading) {
|
if (state is ProfileLoading) {
|
||||||
final progress = ProgressHUD.of(context);
|
final progress = ProgressHUD.of(context);
|
||||||
progress!.showWithText("Loading");
|
progress!.showWithText("Loading");
|
||||||
}
|
}
|
||||||
if (state is EligibilityLoaded ||
|
if (state is EligibilityLoaded ||
|
||||||
state is AddEligibilityState ||
|
state is AddEligibilityState ||
|
||||||
state is ProfileErrorState) {
|
state is ProfileErrorState ||
|
||||||
|
state is EditEligibilityState ||
|
||||||
|
state is DeletedState ||
|
||||||
|
state is EligibilityAddedState ||
|
||||||
|
state is EligibilityEditedState) {
|
||||||
final progress = ProgressHUD.of(context);
|
final progress = ProgressHUD.of(context);
|
||||||
progress!.dismiss();
|
progress!.dismiss();
|
||||||
}
|
}
|
||||||
|
//DELETED STATE
|
||||||
if (state is DeletedState) {
|
if (state is DeletedState) {
|
||||||
if (state.success) {
|
if (state.success) {
|
||||||
successAlert(context, "Deletion Successfull",
|
successAlert(context, "Deletion Successfull",
|
||||||
"Eligibility has been deleted successfully", () {
|
"Eligibility has been deleted successfully", () {
|
||||||
|
Navigator.of(context).pop();
|
||||||
context.read<ProfileBloc>().add(LoadEligibility(
|
context.read<ProfileBloc>().add(LoadEligibility(
|
||||||
eligibilities: state.eligibilities));
|
eligibilities: state.eligibilities));
|
||||||
});
|
});
|
||||||
|
@ -74,11 +100,12 @@ class EligibiltyScreen extends StatelessWidget {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//ADDED STATE
|
||||||
if (state is EligibilityAddedState) {
|
if (state is EligibilityAddedState) {
|
||||||
if (state.response['success']) {
|
if (state.response['success']) {
|
||||||
Navigator.of(context).pop();
|
|
||||||
successAlert(context, "Adding Successfull!",
|
successAlert(context, "Adding Successfull!",
|
||||||
state.response['message'], () {
|
state.response['message'], () {
|
||||||
|
Navigator.of(context).pop();
|
||||||
context.read<ProfileBloc>().add(LoadEligibility(
|
context.read<ProfileBloc>().add(LoadEligibility(
|
||||||
eligibilities: state.eligibilities));
|
eligibilities: state.eligibilities));
|
||||||
});
|
});
|
||||||
|
@ -91,21 +118,42 @@ class EligibiltyScreen extends StatelessWidget {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//UPDATED STATE
|
||||||
|
if (state is EligibilityEditedState) {
|
||||||
|
if (state.response['success']) {
|
||||||
|
successAlert(context, "Update Successfull!",
|
||||||
|
state.response['message'], () {
|
||||||
|
Navigator.of(context).pop();
|
||||||
|
context.read<ProfileBloc>().add(LoadEligibility(
|
||||||
|
eligibilities: state.eligibilities));
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
errorAlert(context, "Update Failed",
|
||||||
|
"Something went wrong. Please try again.", () {
|
||||||
|
Navigator.of(context).pop();
|
||||||
|
context.read<ProfileBloc>().add(LoadEligibility(
|
||||||
|
eligibilities: state.eligibilities));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
builder: (context, state) {
|
builder: (context, state) {
|
||||||
return BlocBuilder<ProfileBloc, ProfileState>(
|
return BlocBuilder<ProfileBloc, ProfileState>(
|
||||||
builder: (context, state) {
|
builder: (context, state) {
|
||||||
if (state is EligibilityLoaded) {
|
if (state is EligibilityLoaded) {
|
||||||
|
eligibilities = state.eligibilities;
|
||||||
if (state.eligibilities.isNotEmpty) {
|
if (state.eligibilities.isNotEmpty) {
|
||||||
return ListView.builder(
|
return ListView.builder(
|
||||||
padding: const EdgeInsets.symmetric(
|
padding: const EdgeInsets.symmetric(
|
||||||
vertical: 8, horizontal: 10),
|
vertical: 8, horizontal: 10),
|
||||||
itemCount: state.eligibilities.length,
|
itemCount: state.eligibilities.length,
|
||||||
itemBuilder: (BuildContext context, int index) {
|
itemBuilder:
|
||||||
String title = state
|
(BuildContext context, int index) {
|
||||||
.eligibilities[index].eligibility!.title;
|
String title = state.eligibilities[index]
|
||||||
|
.eligibility!.title;
|
||||||
return Column(
|
return Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.start,
|
||||||
crossAxisAlignment:
|
crossAxisAlignment:
|
||||||
CrossAxisAlignment.start,
|
CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
|
@ -121,7 +169,8 @@ class EligibiltyScreen extends StatelessWidget {
|
||||||
mainAxisAlignment:
|
mainAxisAlignment:
|
||||||
MainAxisAlignment.start,
|
MainAxisAlignment.start,
|
||||||
crossAxisAlignment:
|
crossAxisAlignment:
|
||||||
CrossAxisAlignment.start,
|
CrossAxisAlignment
|
||||||
|
.start,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
title,
|
title,
|
||||||
|
@ -139,7 +188,8 @@ class EligibiltyScreen extends StatelessWidget {
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
"$licenseNumber: ${state.eligibilities[index].licenseNumber == null ? 'N/A' : state.eligibilities[index].licenseNumber.toString()}",
|
"$licenseNumber: ${state.eligibilities[index].licenseNumber == null ? 'N/A' : state.eligibilities[index].licenseNumber.toString()}",
|
||||||
style: Theme.of(context)
|
style:
|
||||||
|
Theme.of(context)
|
||||||
.textTheme
|
.textTheme
|
||||||
.titleSmall),
|
.titleSmall),
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
|
@ -147,7 +197,8 @@ class EligibiltyScreen extends StatelessWidget {
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
"Rating : ${state.eligibilities[index].rating ?? 'N/A'}.",
|
"Rating : ${state.eligibilities[index].rating ?? 'N/A'}.",
|
||||||
style: Theme.of(context)
|
style:
|
||||||
|
Theme.of(context)
|
||||||
.textTheme
|
.textTheme
|
||||||
.titleSmall)
|
.titleSmall)
|
||||||
]),
|
]),
|
||||||
|
@ -156,13 +207,19 @@ class EligibiltyScreen extends StatelessWidget {
|
||||||
offset: const Offset(-10, -10),
|
offset: const Offset(-10, -10),
|
||||||
elevation: 3,
|
elevation: 3,
|
||||||
onSelected: (value) {
|
onSelected: (value) {
|
||||||
|
final progress =
|
||||||
|
ProgressHUD.of(context);
|
||||||
|
progress!.showWithText(
|
||||||
|
"Loading...");
|
||||||
|
////delete eligibilty-= = = = = = = = =>>
|
||||||
if (value == 2) {
|
if (value == 2) {
|
||||||
confirmAlert(context, () {
|
confirmAlert(context, () {
|
||||||
BlocProvider.of<
|
BlocProvider.of<
|
||||||
ProfileBloc>(
|
ProfileBloc>(
|
||||||
context)
|
context)
|
||||||
.add(DeleteEligibility(
|
.add(DeleteEligibility(
|
||||||
eligibilities: state
|
eligibilities:
|
||||||
|
state
|
||||||
.eligibilities,
|
.eligibilities,
|
||||||
eligibilityId: state
|
eligibilityId: state
|
||||||
.eligibilities[
|
.eligibilities[
|
||||||
|
@ -175,9 +232,11 @@ class EligibiltyScreen extends StatelessWidget {
|
||||||
"Confirm Delete?");
|
"Confirm Delete?");
|
||||||
}
|
}
|
||||||
if (value == 1) {
|
if (value == 1) {
|
||||||
EligibityCert eligibityCert =
|
////edit eligibilty-= = = = = = = = =>>
|
||||||
state
|
EligibityCert
|
||||||
.eligibilities[index];
|
eligibityCert =
|
||||||
|
state.eligibilities[
|
||||||
|
index];
|
||||||
bool overseas = eligibityCert
|
bool overseas = eligibityCert
|
||||||
.examAddress!
|
.examAddress!
|
||||||
.country!
|
.country!
|
||||||
|
@ -188,15 +247,12 @@ class EligibiltyScreen extends StatelessWidget {
|
||||||
: true;
|
: true;
|
||||||
eligibityCert.overseas =
|
eligibityCert.overseas =
|
||||||
overseas;
|
overseas;
|
||||||
final progress =
|
|
||||||
ProgressHUD.of(context);
|
|
||||||
eligibityCert.overseas =
|
eligibityCert.overseas =
|
||||||
overseas;
|
overseas;
|
||||||
progress!.showWithText(
|
|
||||||
"Loading...");
|
context.read<ProfileBloc>().add(
|
||||||
context
|
ShowEditEligibilityForm(
|
||||||
.read<ProfileBloc>()
|
|
||||||
.add(EditEligibility(
|
|
||||||
eligibityCert:
|
eligibityCert:
|
||||||
eligibityCert));
|
eligibityCert));
|
||||||
}
|
}
|
||||||
|
@ -248,7 +304,9 @@ class EligibiltyScreen extends StatelessWidget {
|
||||||
child: Text(state.mesage),
|
child: Text(state.mesage),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return Container();
|
return Container(
|
||||||
|
color: Colors.grey.shade200,
|
||||||
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
@ -257,7 +315,8 @@ class EligibiltyScreen extends StatelessWidget {
|
||||||
}
|
}
|
||||||
return Container();
|
return Container();
|
||||||
},
|
},
|
||||||
));
|
)),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
PopupMenuItem<int> popMenuItem({String? text, int? value, IconData? icon}) {
|
PopupMenuItem<int> popMenuItem({String? text, int? value, IconData? icon}) {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import 'package:unit2/theme-data.dart/box_shadow.dart';
|
||||||
import 'package:unit2/theme-data.dart/colors.dart';
|
import 'package:unit2/theme-data.dart/colors.dart';
|
||||||
import 'package:unit2/utils/global.dart';
|
import 'package:unit2/utils/global.dart';
|
||||||
import 'package:unit2/utils/text_container.dart';
|
import 'package:unit2/utils/text_container.dart';
|
||||||
import 'package:unit2/widgets/add_leading.dart';
|
import 'package:unit2/widgets/Leadings/add_leading.dart';
|
||||||
import 'package:unit2/widgets/empty_data.dart';
|
import 'package:unit2/widgets/empty_data.dart';
|
||||||
|
|
||||||
class LearningAndDevelopmentScreen extends StatelessWidget {
|
class LearningAndDevelopmentScreen extends StatelessWidget {
|
||||||
|
|
|
@ -6,7 +6,7 @@ import 'package:unit2/theme-data.dart/box_shadow.dart';
|
||||||
import 'package:unit2/theme-data.dart/colors.dart';
|
import 'package:unit2/theme-data.dart/colors.dart';
|
||||||
import 'package:unit2/utils/global.dart';
|
import 'package:unit2/utils/global.dart';
|
||||||
import 'package:unit2/utils/text_container.dart';
|
import 'package:unit2/utils/text_container.dart';
|
||||||
import 'package:unit2/widgets/add_leading.dart';
|
import 'package:unit2/widgets/Leadings/add_leading.dart';
|
||||||
import 'package:unit2/widgets/empty_data.dart';
|
import 'package:unit2/widgets/empty_data.dart';
|
||||||
|
|
||||||
class NonAcademicRecognitionScreen extends StatelessWidget {
|
class NonAcademicRecognitionScreen extends StatelessWidget {
|
||||||
|
|
|
@ -3,7 +3,7 @@ import 'package:unit2/model/profile/other_information/organization_memberships.d
|
||||||
import 'package:unit2/theme-data.dart/box_shadow.dart';
|
import 'package:unit2/theme-data.dart/box_shadow.dart';
|
||||||
import 'package:unit2/theme-data.dart/colors.dart';
|
import 'package:unit2/theme-data.dart/colors.dart';
|
||||||
import 'package:unit2/utils/text_container.dart';
|
import 'package:unit2/utils/text_container.dart';
|
||||||
import 'package:unit2/widgets/add_leading.dart';
|
import 'package:unit2/widgets/Leadings/add_leading.dart';
|
||||||
import 'package:unit2/widgets/empty_data.dart';
|
import 'package:unit2/widgets/empty_data.dart';
|
||||||
|
|
||||||
import '../../../../utils/global.dart';
|
import '../../../../utils/global.dart';
|
||||||
|
|
|
@ -5,7 +5,7 @@ import 'package:unit2/model/profile/other_information/skills_and_hobbies.dart';
|
||||||
import 'package:unit2/theme-data.dart/colors.dart';
|
import 'package:unit2/theme-data.dart/colors.dart';
|
||||||
import 'package:unit2/utils/global.dart';
|
import 'package:unit2/utils/global.dart';
|
||||||
import 'package:unit2/utils/text_container.dart';
|
import 'package:unit2/utils/text_container.dart';
|
||||||
import 'package:unit2/widgets/add_leading.dart';
|
import 'package:unit2/widgets/Leadings/add_leading.dart';
|
||||||
import 'package:unit2/widgets/empty_data.dart';
|
import 'package:unit2/widgets/empty_data.dart';
|
||||||
|
|
||||||
class SkillHobbiesScreen extends StatelessWidget {
|
class SkillHobbiesScreen extends StatelessWidget {
|
||||||
|
|
|
@ -5,7 +5,7 @@ import 'package:unit2/model/profile/references.dart';
|
||||||
import 'package:unit2/theme-data.dart/box_shadow.dart';
|
import 'package:unit2/theme-data.dart/box_shadow.dart';
|
||||||
import 'package:unit2/theme-data.dart/colors.dart';
|
import 'package:unit2/theme-data.dart/colors.dart';
|
||||||
import 'package:unit2/utils/text_container.dart';
|
import 'package:unit2/utils/text_container.dart';
|
||||||
import 'package:unit2/widgets/add_leading.dart';
|
import 'package:unit2/widgets/Leadings/add_leading.dart';
|
||||||
import 'package:unit2/widgets/empty_data.dart';
|
import 'package:unit2/widgets/empty_data.dart';
|
||||||
|
|
||||||
class ReferencesScreen extends StatelessWidget {
|
class ReferencesScreen extends StatelessWidget {
|
||||||
|
|
|
@ -4,7 +4,7 @@ import 'package:unit2/model/profile/voluntary_works.dart';
|
||||||
import 'package:unit2/theme-data.dart/box_shadow.dart';
|
import 'package:unit2/theme-data.dart/box_shadow.dart';
|
||||||
import 'package:unit2/theme-data.dart/colors.dart';
|
import 'package:unit2/theme-data.dart/colors.dart';
|
||||||
import 'package:unit2/utils/text_container.dart';
|
import 'package:unit2/utils/text_container.dart';
|
||||||
import 'package:unit2/widgets/add_leading.dart';
|
import 'package:unit2/widgets/Leadings/add_leading.dart';
|
||||||
import 'package:unit2/widgets/empty_data.dart';
|
import 'package:unit2/widgets/empty_data.dart';
|
||||||
|
|
||||||
class VolunataryWorkScreen extends StatelessWidget {
|
class VolunataryWorkScreen extends StatelessWidget {
|
||||||
|
|
|
@ -4,7 +4,7 @@ import 'package:unit2/model/profile/work_history.dart';
|
||||||
import 'package:unit2/theme-data.dart/box_shadow.dart';
|
import 'package:unit2/theme-data.dart/box_shadow.dart';
|
||||||
import 'package:unit2/theme-data.dart/colors.dart';
|
import 'package:unit2/theme-data.dart/colors.dart';
|
||||||
import 'package:unit2/utils/text_container.dart';
|
import 'package:unit2/utils/text_container.dart';
|
||||||
import 'package:unit2/widgets/add_leading.dart';
|
import 'package:unit2/widgets/Leadings/add_leading.dart';
|
||||||
import 'package:unit2/widgets/empty_data.dart';
|
import 'package:unit2/widgets/empty_data.dart';
|
||||||
|
|
||||||
import '../../../utils/global.dart';
|
import '../../../utils/global.dart';
|
||||||
|
|
|
@ -2,6 +2,7 @@ import 'package:expandable_group/expandable_group_widget.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:flutter_progress_hud/flutter_progress_hud.dart';
|
import 'package:flutter_progress_hud/flutter_progress_hud.dart';
|
||||||
|
import 'package:flutter_spinkit/flutter_spinkit.dart';
|
||||||
import 'package:fluttericon/brandico_icons.dart';
|
import 'package:fluttericon/brandico_icons.dart';
|
||||||
import 'package:fluttericon/elusive_icons.dart';
|
import 'package:fluttericon/elusive_icons.dart';
|
||||||
import 'package:fluttericon/entypo_icons.dart';
|
import 'package:fluttericon/entypo_icons.dart';
|
||||||
|
@ -38,6 +39,8 @@ class ProfileInfo extends StatefulWidget {
|
||||||
}
|
}
|
||||||
|
|
||||||
class _ProfileInfoState extends State<ProfileInfo> {
|
class _ProfileInfoState extends State<ProfileInfo> {
|
||||||
|
int? profileId;
|
||||||
|
String? token;
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
|
@ -47,8 +50,12 @@ class _ProfileInfoState extends State<ProfileInfo> {
|
||||||
title: const Text('Profile'),
|
title: const Text('Profile'),
|
||||||
),
|
),
|
||||||
body: ProgressHUD(
|
body: ProgressHUD(
|
||||||
|
backgroundColor: Colors.black87,
|
||||||
|
indicatorWidget: const SpinKitFadingCircle(color: Colors.white),
|
||||||
child: BlocBuilder<UserBloc, UserState>(builder: (context, state) {
|
child: BlocBuilder<UserBloc, UserState>(builder: (context, state) {
|
||||||
if (state is UserLoggedIn) {
|
if (state is UserLoggedIn) {
|
||||||
|
profileId = state.userData!.user!.login!.user!.profileId;
|
||||||
|
token = state.userData!.user!.login!.token!;
|
||||||
return BlocConsumer<ProfileBloc, ProfileState>(
|
return BlocConsumer<ProfileBloc, ProfileState>(
|
||||||
listener: (context, state) {
|
listener: (context, state) {
|
||||||
if (state is ProfileLoading) {
|
if (state is ProfileLoading) {
|
||||||
|
@ -57,7 +64,7 @@ class _ProfileInfoState extends State<ProfileInfo> {
|
||||||
'Loading Profile',
|
'Loading Profile',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (state is ProfileLoaded) {
|
if (state is ProfileLoaded || state is ProfileErrorState) {
|
||||||
final progress = ProgressHUD.of(context);
|
final progress = ProgressHUD.of(context);
|
||||||
progress?.dismiss();
|
progress?.dismiss();
|
||||||
}
|
}
|
||||||
|
@ -141,12 +148,12 @@ class _ProfileInfoState extends State<ProfileInfo> {
|
||||||
icon: Elusive.group,
|
icon: Elusive.group,
|
||||||
title: "Family",
|
title: "Family",
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.push(context, MaterialPageRoute(
|
// Navigator.push(context, MaterialPageRoute(
|
||||||
builder: (BuildContext context) {
|
// builder: (BuildContext context) {
|
||||||
return FamilyBackgroundScreen(
|
// return FamilyBackgroundScreen(
|
||||||
familyBackground:
|
// familyBackground:
|
||||||
state.profileInformation.families);
|
// state.profileInformation.families);
|
||||||
}));
|
// }));
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
const Divider(),
|
const Divider(),
|
||||||
|
@ -154,13 +161,13 @@ class _ProfileInfoState extends State<ProfileInfo> {
|
||||||
icon: FontAwesome5.graduation_cap,
|
icon: FontAwesome5.graduation_cap,
|
||||||
title: "Education",
|
title: "Education",
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.push(context, MaterialPageRoute(
|
// Navigator.push(context, MaterialPageRoute(
|
||||||
builder: (BuildContext context) {
|
// builder: (BuildContext context) {
|
||||||
return EducationScreen(
|
// return EducationScreen(
|
||||||
educationBackgrounds: state
|
// educationBackgrounds: state
|
||||||
.profileInformation
|
// .profileInformation
|
||||||
.educationalBackgrounds);
|
// .educationalBackgrounds);
|
||||||
}));
|
// }));
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
const Divider(),
|
const Divider(),
|
||||||
|
@ -170,10 +177,11 @@ class _ProfileInfoState extends State<ProfileInfo> {
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.push(context, MaterialPageRoute(
|
Navigator.push(context, MaterialPageRoute(
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
return BlocProvider<ProfileBloc>.value(value: ProfileBloc()..add(LoadEligibility(eligibilities: state.profileInformation.eligibilities)),
|
return BlocProvider<ProfileBloc>.value(
|
||||||
|
value: ProfileBloc()
|
||||||
child: EligibiltyScreen(
|
..add(GetEligibilities(
|
||||||
),
|
profileId: profileId!, token: token!)),
|
||||||
|
child: const EligibiltyScreen(),
|
||||||
);
|
);
|
||||||
}));
|
}));
|
||||||
},
|
},
|
||||||
|
@ -183,12 +191,12 @@ class _ProfileInfoState extends State<ProfileInfo> {
|
||||||
icon: FontAwesome5.shopping_bag,
|
icon: FontAwesome5.shopping_bag,
|
||||||
title: "Work History",
|
title: "Work History",
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.push(context, MaterialPageRoute(
|
// Navigator.push(context, MaterialPageRoute(
|
||||||
builder: (BuildContext context) {
|
// builder: (BuildContext context) {
|
||||||
return WorkHistoryScreen(
|
// return WorkHistoryScreen(
|
||||||
workExperiences: state
|
// workExperiences: state
|
||||||
.profileInformation.workExperiences);
|
// .profileInformation.workExperiences);
|
||||||
}));
|
// }));
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
const Divider(),
|
const Divider(),
|
||||||
|
@ -196,12 +204,12 @@ class _ProfileInfoState extends State<ProfileInfo> {
|
||||||
icon: FontAwesome5.walking,
|
icon: FontAwesome5.walking,
|
||||||
title: "Voluntary Work & Civic Services",
|
title: "Voluntary Work & Civic Services",
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.push(context, MaterialPageRoute(
|
// Navigator.push(context, MaterialPageRoute(
|
||||||
builder: (BuildContext context) {
|
// builder: (BuildContext context) {
|
||||||
return VolunataryWorkScreen(
|
// return VolunataryWorkScreen(
|
||||||
voluntaryWorks: state
|
// voluntaryWorks: state
|
||||||
.profileInformation.voluntaryWorks);
|
// .profileInformation.voluntaryWorks);
|
||||||
}));
|
// }));
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
const Divider(),
|
const Divider(),
|
||||||
|
@ -209,13 +217,13 @@ class _ProfileInfoState extends State<ProfileInfo> {
|
||||||
icon: Elusive.lightbulb,
|
icon: Elusive.lightbulb,
|
||||||
title: "Learning & Development",
|
title: "Learning & Development",
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.push(context, MaterialPageRoute(
|
// Navigator.push(context, MaterialPageRoute(
|
||||||
builder: (BuildContext context) {
|
// builder: (BuildContext context) {
|
||||||
return LearningAndDevelopmentScreen(
|
// return LearningAndDevelopmentScreen(
|
||||||
learningDevelopments: state
|
// learningDevelopments: state
|
||||||
.profileInformation
|
// .profileInformation
|
||||||
.learningsAndDevelopment);
|
// .learningsAndDevelopment);
|
||||||
}));
|
// }));
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
const Divider(),
|
const Divider(),
|
||||||
|
@ -223,12 +231,12 @@ class _ProfileInfoState extends State<ProfileInfo> {
|
||||||
icon: Brandico.codepen,
|
icon: Brandico.codepen,
|
||||||
title: "Personal References",
|
title: "Personal References",
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.push(context, MaterialPageRoute(
|
// Navigator.push(context, MaterialPageRoute(
|
||||||
builder: (BuildContext context) {
|
// builder: (BuildContext context) {
|
||||||
return ReferencesScreen(
|
// return ReferencesScreen(
|
||||||
references:
|
// references:
|
||||||
state.profileInformation.references);
|
// state.profileInformation.references);
|
||||||
}));
|
// }));
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
ExpandableGroup(
|
ExpandableGroup(
|
||||||
|
@ -249,32 +257,32 @@ class _ProfileInfoState extends State<ProfileInfo> {
|
||||||
subMenu(
|
subMenu(
|
||||||
Icons.fitness_center, "Skills & Hobbies",
|
Icons.fitness_center, "Skills & Hobbies",
|
||||||
() {
|
() {
|
||||||
Navigator.push(context, MaterialPageRoute(
|
// Navigator.push(context, MaterialPageRoute(
|
||||||
builder: (BuildContext context) {
|
// builder: (BuildContext context) {
|
||||||
return SkillHobbiesScreen(
|
// return SkillHobbiesScreen(
|
||||||
skillsHobbies: state.profileInformation
|
// skillsHobbies: state.profileInformation
|
||||||
.otherInformation.skillsAndHobbies);
|
// .otherInformation.skillsAndHobbies);
|
||||||
}));
|
// }));
|
||||||
}),
|
}),
|
||||||
subMenu(FontAwesome5.certificate,
|
subMenu(FontAwesome5.certificate,
|
||||||
"Organization Memberships", () {
|
"Organization Memberships", () {
|
||||||
Navigator.push(context, MaterialPageRoute(
|
// Navigator.push(context, MaterialPageRoute(
|
||||||
builder: (BuildContext context) {
|
// builder: (BuildContext context) {
|
||||||
return OrgMembershipsScreen(
|
// return OrgMembershipsScreen(
|
||||||
orgMemberships: state.profileInformation
|
// orgMemberships: state.profileInformation
|
||||||
.otherInformation.orgMemberships);
|
// .otherInformation.orgMemberships);
|
||||||
}));
|
// }));
|
||||||
}),
|
}),
|
||||||
subMenu(Entypo.doc_text,
|
subMenu(Entypo.doc_text,
|
||||||
"Non-Academic Recognitions", () {
|
"Non-Academic Recognitions", () {
|
||||||
Navigator.push(context, MaterialPageRoute(
|
// Navigator.push(context, MaterialPageRoute(
|
||||||
builder: (BuildContext context) {
|
// builder: (BuildContext context) {
|
||||||
return NonAcademicRecognitionScreen(
|
// return NonAcademicRecognitionScreen(
|
||||||
nonAcademicRecognitions: state
|
// nonAcademicRecognitions: state
|
||||||
.profileInformation
|
// .profileInformation
|
||||||
.otherInformation
|
// .otherInformation
|
||||||
.nonAcademicRecognition);
|
// .nonAcademicRecognition);
|
||||||
}));
|
// }));
|
||||||
}),
|
}),
|
||||||
]),
|
]),
|
||||||
ExpandableGroup(
|
ExpandableGroup(
|
||||||
|
@ -302,6 +310,9 @@ class _ProfileInfoState extends State<ProfileInfo> {
|
||||||
if (state is ProfileLoading) {
|
if (state is ProfileLoading) {
|
||||||
return const LoadingScreen();
|
return const LoadingScreen();
|
||||||
}
|
}
|
||||||
|
if (state is ProfileErrorState) {
|
||||||
|
return Text(state.mesage);
|
||||||
|
}
|
||||||
|
|
||||||
return Container();
|
return Container();
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import 'package:barcode_scan2/barcode_scan2.dart';
|
import 'package:barcode_scan2/barcode_scan2.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
|
import 'package:flutter_spinkit/flutter_spinkit.dart';
|
||||||
import 'package:flutter_svg/flutter_svg.dart';
|
import 'package:flutter_svg/flutter_svg.dart';
|
||||||
import 'package:flutter_form_builder/flutter_form_builder.dart';
|
import 'package:flutter_form_builder/flutter_form_builder.dart';
|
||||||
import 'package:fluttericon/font_awesome5_icons.dart';
|
import 'package:fluttericon/font_awesome5_icons.dart';
|
||||||
|
@ -38,29 +39,21 @@ class _UniT2LoginState extends State<UniT2Login> {
|
||||||
onWillPop: pressAgainToExit,
|
onWillPop: pressAgainToExit,
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
body: ProgressHUD(
|
body: ProgressHUD(
|
||||||
|
backgroundColor: Colors.black87,
|
||||||
|
indicatorWidget: const SpinKitFadingCircle(color: Colors.white),
|
||||||
child: BlocConsumer<UserBloc, UserState>(listener: (context, state) {
|
child: BlocConsumer<UserBloc, UserState>(listener: (context, state) {
|
||||||
if (state is UserLoggedIn) {
|
if (state is UserLoggedIn ||
|
||||||
|
state is UuidLoaded ||
|
||||||
|
state is UserError ||
|
||||||
|
state is InternetTimeout) {
|
||||||
final progress = ProgressHUD.of(context);
|
final progress = ProgressHUD.of(context);
|
||||||
progress!.dismiss();
|
progress!.dismiss();
|
||||||
Navigator.pushReplacementNamed(context, '/module-screen');
|
Navigator.pushReplacementNamed(context, '/module-screen');
|
||||||
}
|
}
|
||||||
if (state is UuidLoaded) {
|
|
||||||
final progress = ProgressHUD.of(context);
|
|
||||||
progress!.dismiss();
|
|
||||||
Navigator.pushNamed(context, '/qr-login');
|
|
||||||
}
|
|
||||||
if (state is UserError) {
|
|
||||||
final progress = ProgressHUD.of(context);
|
|
||||||
progress!.dismiss();
|
|
||||||
}
|
|
||||||
if (state is InternetTimeout) {
|
|
||||||
final progress = ProgressHUD.of(context);
|
|
||||||
progress!.dismiss();
|
|
||||||
}
|
|
||||||
if (state is InvalidCredentials) {
|
if (state is InvalidCredentials) {
|
||||||
final progress = ProgressHUD.of(context);
|
final progress = ProgressHUD.of(context);
|
||||||
progress!.dismiss();
|
progress!.dismiss();
|
||||||
errorAlert(context, "Error Login", state.message,(){});
|
errorAlert(context, "Error Login", state.message, () {});
|
||||||
context.read<UserBloc>().add(LoadVersion());
|
context.read<UserBloc>().add(LoadVersion());
|
||||||
}
|
}
|
||||||
}, builder: (context, state) {
|
}, builder: (context, state) {
|
||||||
|
@ -321,8 +314,8 @@ class _UniT2LoginState extends State<UniT2Login> {
|
||||||
}
|
}
|
||||||
if (state is UserError) {
|
if (state is UserError) {
|
||||||
return SomethingWentWrong(
|
return SomethingWentWrong(
|
||||||
message:onError ,
|
message: onError,
|
||||||
onpressed:(){} ,
|
onpressed: () {},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (state is InternetTimeout) {
|
if (state is InternetTimeout) {
|
||||||
|
|
|
@ -9,6 +9,34 @@ class EligibilityService {
|
||||||
static final EligibilityService _instance = EligibilityService();
|
static final EligibilityService _instance = EligibilityService();
|
||||||
static EligibilityService get instance => _instance;
|
static EligibilityService get instance => _instance;
|
||||||
|
|
||||||
|
|
||||||
|
Future<List<EligibityCert>> getEligibilities(int profileId, String token)async{
|
||||||
|
List<EligibityCert> eligibilities = [];
|
||||||
|
String authToken = "Token $token";
|
||||||
|
String path = "${Url.instance.getEligibilities()}$profileId/";
|
||||||
|
Map<String, String> headers = {
|
||||||
|
'Content-Type': 'application/json; charset=UTF-8',
|
||||||
|
'Authorization': authToken
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
// try{
|
||||||
|
http.Response response = await Request.instance.getRequest(path: path,headers: headers,param: {});
|
||||||
|
if(response.statusCode == 200){
|
||||||
|
Map data = jsonDecode(response.body);
|
||||||
|
if (data['data']!= null) {
|
||||||
|
data['data'].forEach((var cert) {
|
||||||
|
EligibityCert eligibility = EligibityCert.fromJson(cert);
|
||||||
|
eligibilities.add(eligibility);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// }catch(e){
|
||||||
|
// throw e.toString();
|
||||||
|
// }
|
||||||
|
return eligibilities;
|
||||||
|
}
|
||||||
|
|
||||||
Future<bool> delete(
|
Future<bool> delete(
|
||||||
{required int eligibilityId,
|
{required int eligibilityId,
|
||||||
required int profileId,
|
required int profileId,
|
||||||
|
@ -22,7 +50,7 @@ class EligibilityService {
|
||||||
'Content-Type': 'application/json; charset=UTF-8',
|
'Content-Type': 'application/json; charset=UTF-8',
|
||||||
'Authorization': authtoken
|
'Authorization': authtoken
|
||||||
};
|
};
|
||||||
// try{
|
try{
|
||||||
http.Response response = await Request.instance
|
http.Response response = await Request.instance
|
||||||
.deleteRequest(path: path, headers: headers, body: body, param: params);
|
.deleteRequest(path: path, headers: headers, body: body, param: params);
|
||||||
if (response.statusCode == 200) {
|
if (response.statusCode == 200) {
|
||||||
|
@ -32,9 +60,9 @@ class EligibilityService {
|
||||||
success = false;
|
success = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// }catch(e){
|
}catch(e){
|
||||||
// throw(e.toString());
|
throw(e.toString());
|
||||||
// }
|
}
|
||||||
return success!;
|
return success!;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,7 +71,7 @@ class EligibilityService {
|
||||||
required String token,
|
required String token,
|
||||||
required int profileId}) async {
|
required int profileId}) async {
|
||||||
Map<dynamic, dynamic>? _response={};
|
Map<dynamic, dynamic>? _response={};
|
||||||
String authtoken = "Token $token+1";
|
String authtoken = "Token $token";
|
||||||
String path = '${Url.instance.addEligibility()}$profileId/';
|
String path = '${Url.instance.addEligibility()}$profileId/';
|
||||||
Map<String, String> headers = {
|
Map<String, String> headers = {
|
||||||
'Content-Type': 'application/json; charset=UTF-8',
|
'Content-Type': 'application/json; charset=UTF-8',
|
||||||
|
@ -74,4 +102,42 @@ class EligibilityService {
|
||||||
throw e.toString();
|
throw e.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<Map<dynamic, dynamic>> update(
|
||||||
|
{required EligibityCert eligibityCert,
|
||||||
|
required String token,
|
||||||
|
required int profileId, required int oldEligibility}) async {
|
||||||
|
Map<dynamic, dynamic>? response={};
|
||||||
|
String authtoken = "Token $token";
|
||||||
|
String path = '${Url.instance.addEligibility()}$profileId/';
|
||||||
|
Map<String, String> headers = {
|
||||||
|
'Content-Type': 'application/json; charset=UTF-8',
|
||||||
|
'Authorization': authtoken
|
||||||
|
};
|
||||||
|
|
||||||
|
Map body = {
|
||||||
|
'eligibility_id': eligibityCert.eligibility!.id,
|
||||||
|
'license_number': eligibityCert.licenseNumber,
|
||||||
|
'exam_date': eligibityCert.examDate?.toString(),
|
||||||
|
'validity_date': eligibityCert.validityDate?.toString(),
|
||||||
|
'rating': eligibityCert.rating,
|
||||||
|
'_citymunCode': eligibityCert.examAddress?.cityMunicipality?.code,
|
||||||
|
'_countryId': eligibityCert.examAddress?.country!.id,
|
||||||
|
'_oldEligibilityId': oldEligibility
|
||||||
|
};
|
||||||
|
try {
|
||||||
|
http.Response res = await Request.instance
|
||||||
|
.putRequest(path: path, body: body, headers: headers, param: {});
|
||||||
|
if (res.statusCode == 200) {
|
||||||
|
Map data = jsonDecode(res.body);
|
||||||
|
response = data;
|
||||||
|
} else {
|
||||||
|
response.addAll({'success':false});
|
||||||
|
}
|
||||||
|
|
||||||
|
return response;
|
||||||
|
} catch (e) {
|
||||||
|
throw e.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,7 @@ class ProfileService {
|
||||||
List<MainAdress> addresses = [];
|
List<MainAdress> addresses = [];
|
||||||
List<Identification> identificationInformation = [];
|
List<Identification> identificationInformation = [];
|
||||||
List<ContactInfo> contactInformation = [];
|
List<ContactInfo> contactInformation = [];
|
||||||
List<EligibityCert> eligibilities = [];
|
|
||||||
List<FamilyBackground> families = [];
|
List<FamilyBackground> families = [];
|
||||||
List<Citizenship> citizenships = [];
|
List<Citizenship> citizenships = [];
|
||||||
List<LearningDevelopement> learningsDevelopments = [];
|
List<LearningDevelopement> learningsDevelopments = [];
|
||||||
|
@ -50,9 +50,10 @@ class ProfileService {
|
||||||
'Content-Type': 'application/json; charset=UTF-8',
|
'Content-Type': 'application/json; charset=UTF-8',
|
||||||
'Authorization': "Token $token"
|
'Authorization': "Token $token"
|
||||||
};
|
};
|
||||||
|
Map<String,String> param={"basic":"true"};
|
||||||
// try{
|
// try{
|
||||||
http.Response response = await Request.instance
|
http.Response response = await Request.instance
|
||||||
.getRequest(path: path, param: {}, headers: headers);
|
.getRequest(path: path, param: param, headers: headers);
|
||||||
if (response.statusCode == 200) {
|
if (response.statusCode == 200) {
|
||||||
Map data = jsonDecode(response.body);
|
Map data = jsonDecode(response.body);
|
||||||
|
|
||||||
|
@ -92,100 +93,100 @@ class ProfileService {
|
||||||
}
|
}
|
||||||
|
|
||||||
// get all family background
|
// get all family background
|
||||||
if(data['data']['family_background'] != null){
|
// if(data['data']['family_background'] != null){
|
||||||
data['data']['family_background'].forEach((var family){
|
// data['data']['family_background'].forEach((var family){
|
||||||
FamilyBackground familyBackground = FamilyBackground.fromJson(family);
|
// FamilyBackground familyBackground = FamilyBackground.fromJson(family);
|
||||||
families.add(familyBackground);
|
// families.add(familyBackground);
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
|
|
||||||
//get all eligibilities
|
//get all eligibilities
|
||||||
if (data['data']['eligibilities'] != null) {
|
// if (data['data']['eligibilities'] != null) {
|
||||||
data['data']['eligibilities']!.forEach((var cert) {
|
// data['data']['eligibilities']!.forEach((var cert) {
|
||||||
EligibityCert eligibility = EligibityCert.fromJson(cert);
|
// EligibityCert eligibility = EligibityCert.fromJson(cert);
|
||||||
eligibilities.add(eligibility);
|
// eligibilities.add(eligibility);
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
|
|
||||||
// get all citizenships
|
// get all citizenships
|
||||||
if (data['data']['citizenship'] != null) {
|
// if (data['data']['citizenship'] != null) {
|
||||||
data['data']['citizenships']!.forEach((var citizenship) {
|
// data['data']['citizenships']!.forEach((var citizenship) {
|
||||||
Citizenship person = Citizenship.fromJson(citizenship);
|
// Citizenship person = Citizenship.fromJson(citizenship);
|
||||||
citizenships.add(person);
|
// citizenships.add(person);
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
// get all references;
|
// get all references;
|
||||||
if (data['data']['personal_references'] != null) {
|
// if (data['data']['personal_references'] != null) {
|
||||||
data['data']['personal_references'].forEach((var person) {
|
// data['data']['personal_references'].forEach((var person) {
|
||||||
PersonalReference reference = PersonalReference.fromJson(person);
|
// PersonalReference reference = PersonalReference.fromJson(person);
|
||||||
references.add(reference);
|
// references.add(reference);
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
|
|
||||||
//get all learning and developments
|
//get all learning and developments
|
||||||
if (data['data']['learning_development'] != null) {
|
// if (data['data']['learning_development'] != null) {
|
||||||
data['data']['learning_development'].forEach((var training) {
|
// data['data']['learning_development'].forEach((var training) {
|
||||||
LearningDevelopement learnings =
|
// LearningDevelopement learnings =
|
||||||
LearningDevelopement.fromJson(training);
|
// LearningDevelopement.fromJson(training);
|
||||||
learningsDevelopments.add(learnings);
|
// learningsDevelopments.add(learnings);
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
|
|
||||||
//get all educational background
|
//get all educational background
|
||||||
if (data['data']['education_background'] != null) {
|
// if (data['data']['education_background'] != null) {
|
||||||
data['data']['education_background'].forEach((var education) {
|
// data['data']['education_background'].forEach((var education) {
|
||||||
EducationalBackground educationalBackground =
|
// EducationalBackground educationalBackground =
|
||||||
EducationalBackground.fromJson(education);
|
// EducationalBackground.fromJson(education);
|
||||||
educationalBackgrounds.add(educationalBackground);
|
// educationalBackgrounds.add(educationalBackground);
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
|
|
||||||
// get all work history
|
// get all work history
|
||||||
if (data['data']['work_experiences'] != null) {
|
// if (data['data']['work_experiences'] != null) {
|
||||||
data['data']['work_experiences'].forEach((var work) {
|
// data['data']['work_experiences'].forEach((var work) {
|
||||||
WorkHistory experience = WorkHistory.fromJson(work);
|
// WorkHistory experience = WorkHistory.fromJson(work);
|
||||||
workExperiences.add(experience);
|
// workExperiences.add(experience);
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
|
|
||||||
// get all voluntary works
|
// get all voluntary works
|
||||||
if (data['data']['voluntary_works'] != null) {
|
// if (data['data']['voluntary_works'] != null) {
|
||||||
data['data']['voluntary_works'].forEach((var work) {
|
// data['data']['voluntary_works'].forEach((var work) {
|
||||||
VoluntaryWork vwork = VoluntaryWork.fromJson(work);
|
// VoluntaryWork vwork = VoluntaryWork.fromJson(work);
|
||||||
voluntaryWorks.add(vwork);
|
// voluntaryWorks.add(vwork);
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
|
|
||||||
// get all hobbies
|
// get all hobbies
|
||||||
if (data['data']['other_information']['skills_hobbies'] != null) {
|
// if (data['data']['other_information']['skills_hobbies'] != null) {
|
||||||
data['data']['other_information']['skills_hobbies']
|
// data['data']['other_information']['skills_hobbies']
|
||||||
.forEach((var skills_hobbies) {
|
// .forEach((var skills_hobbies) {
|
||||||
SkillsHobbies skillsAndHobbies =
|
// SkillsHobbies skillsAndHobbies =
|
||||||
SkillsHobbies.fromJson(skills_hobbies);
|
// SkillsHobbies.fromJson(skills_hobbies);
|
||||||
skillsHobbies.add(skillsAndHobbies);
|
// skillsHobbies.add(skillsAndHobbies);
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
|
|
||||||
//get all organization memberships
|
//get all organization memberships
|
||||||
if (data['data']['other_information']['organization_memberships'] !=
|
// if (data['data']['other_information']['organization_memberships'] !=
|
||||||
null) {
|
// null) {
|
||||||
data['data']['other_information']['organization_memberships']
|
// data['data']['other_information']['organization_memberships']
|
||||||
.forEach((var org) {
|
// .forEach((var org) {
|
||||||
OrganizationMembership organization =
|
// OrganizationMembership organization =
|
||||||
OrganizationMembership.fromJson(org);
|
// OrganizationMembership.fromJson(org);
|
||||||
orgMemberships.add(organization);
|
// orgMemberships.add(organization);
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
|
|
||||||
//get all non academic recognition
|
//get all non academic recognition
|
||||||
if (data['data']['other_information']['non_academic_records'] != null) {
|
// if (data['data']['other_information']['non_academic_records'] != null) {
|
||||||
data['data']['other_information']['non_academic_records']
|
// data['data']['other_information']['non_academic_records']
|
||||||
.forEach((var recognition) {
|
// .forEach((var recognition) {
|
||||||
NonAcademicRecognition nonAcademicRecognition =
|
// NonAcademicRecognition nonAcademicRecognition =
|
||||||
NonAcademicRecognition.fromJson(recognition);
|
// NonAcademicRecognition.fromJson(recognition);
|
||||||
nonAcademicRecognitions.add(nonAcademicRecognition);
|
// nonAcademicRecognitions.add(nonAcademicRecognition);
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
|
|
||||||
BasicInfo basicInfo = BasicInfo(
|
BasicInfo basicInfo = BasicInfo(
|
||||||
contactInformation: contactInformation,
|
contactInformation: contactInformation,
|
||||||
|
@ -193,20 +194,21 @@ class ProfileService {
|
||||||
identifications: identificationInformation,
|
identifications: identificationInformation,
|
||||||
citizenships: citizenships,
|
citizenships: citizenships,
|
||||||
addresses: addresses);
|
addresses: addresses);
|
||||||
OtherInformation otherInformation = OtherInformation(
|
// OtherInformation otherInformation = OtherInformation(
|
||||||
skillsAndHobbies: skillsHobbies,
|
// skillsAndHobbies: skillsHobbies,
|
||||||
orgMemberships: orgMemberships,
|
// orgMemberships: orgMemberships,
|
||||||
nonAcademicRecognition: nonAcademicRecognitions);
|
// nonAcademicRecognition: nonAcademicRecognitions);
|
||||||
ProfileInformation profileInformation = ProfileInformation(
|
ProfileInformation profileInformation = ProfileInformation(
|
||||||
families: families,
|
// families: families,
|
||||||
otherInformation: otherInformation,
|
// otherInformation: otherInformation,
|
||||||
workExperiences: workExperiences,
|
// workExperiences: workExperiences,
|
||||||
basicInfo: basicInfo,
|
basicInfo: basicInfo,
|
||||||
eligibilities: eligibilities,
|
// eligibilities: eligibilities,
|
||||||
references: references,
|
// references: references,
|
||||||
learningsAndDevelopment: learningsDevelopments,
|
// learningsAndDevelopment: learningsDevelopments,
|
||||||
educationalBackgrounds: educationalBackgrounds,
|
// educationalBackgrounds: educationalBackgrounds,
|
||||||
voluntaryWorks: voluntaryWorks);
|
// voluntaryWorks: voluntaryWorks
|
||||||
|
);
|
||||||
profileInformation0 = profileInformation;
|
profileInformation0 = profileInformation;
|
||||||
}
|
}
|
||||||
// }catch(e){
|
// }catch(e){
|
||||||
|
@ -215,3 +217,5 @@ class ProfileService {
|
||||||
return profileInformation0;
|
return profileInformation0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -58,6 +58,6 @@ successAlert(context, title, description,Function() func) {
|
||||||
headerAnimationLoop: false,
|
headerAnimationLoop: false,
|
||||||
title: title,
|
title: title,
|
||||||
desc: description,
|
desc: description,
|
||||||
btnOk: SizedBox(height: 50,child: ElevatedButton(style: mainBtnStyle(primary, Colors.transparent, second), onPressed: func, child: const Text("OK")), )
|
btnOk: SizedBox(height: 50,child: ElevatedButton(style: mainBtnStyle(success2, Colors.transparent, success), onPressed: func, child: const Text("OK")), )
|
||||||
).show();
|
).show();
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,46 +97,86 @@ class Request {
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<Response> putRequest(
|
||||||
|
{required String path,
|
||||||
|
required Map<String, String>? headers,
|
||||||
|
required Map? body,
|
||||||
|
required Map<String, dynamic>? param}) async {
|
||||||
|
Response response;
|
||||||
|
try {
|
||||||
|
response =await put(Uri.http(host,path,param),headers: headers,body: jsonEncode(body));
|
||||||
|
} on TimeoutException catch (_) {
|
||||||
|
Fluttertoast.showToast(
|
||||||
|
msg: timeoutError,
|
||||||
|
toastLength: Toast.LENGTH_LONG,
|
||||||
|
gravity: ToastGravity.BOTTOM,
|
||||||
|
backgroundColor: Colors.black,
|
||||||
|
);
|
||||||
|
throw (timeoutError);
|
||||||
|
} on SocketException catch (_) {
|
||||||
|
Fluttertoast.showToast(
|
||||||
|
msg: timeoutError,
|
||||||
|
toastLength: Toast.LENGTH_LONG,
|
||||||
|
gravity: ToastGravity.BOTTOM,
|
||||||
|
backgroundColor: Colors.black,
|
||||||
|
);
|
||||||
|
throw (timeoutError);
|
||||||
|
} on FormatException catch (_) {
|
||||||
|
throw const FormatException(formatError);
|
||||||
|
} on HttpException catch (_) {
|
||||||
|
throw const HttpException(httpError);
|
||||||
|
} on Error catch (e) {
|
||||||
|
debugPrint("post request error: $e");
|
||||||
|
Fluttertoast.showToast(
|
||||||
|
msg: onError,
|
||||||
|
toastLength: Toast.LENGTH_LONG,
|
||||||
|
gravity: ToastGravity.BOTTOM,
|
||||||
|
backgroundColor: Colors.black,
|
||||||
|
);
|
||||||
|
throw (e.toString());
|
||||||
|
}
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
Future<Response> deleteRequest(
|
Future<Response> deleteRequest(
|
||||||
{required String path,
|
{required String path,
|
||||||
required Map<String, String>? headers,
|
required Map<String, String>? headers,
|
||||||
required Map? body,
|
required Map? body,
|
||||||
required Map<String, dynamic>? param}) async {
|
required Map<String, dynamic>? param}) async {
|
||||||
Response response;
|
Response response;
|
||||||
// try {
|
try {
|
||||||
response = await delete(Uri.http(host, path, param),
|
response = await delete(Uri.http(host, path, param),
|
||||||
headers: headers, body: jsonEncode(body))
|
headers: headers, body: jsonEncode(body))
|
||||||
.timeout(Duration(seconds: requestTimeout));
|
.timeout(Duration(seconds: requestTimeout));
|
||||||
// } on TimeoutException catch (_) {
|
} on TimeoutException catch (_) {
|
||||||
// Fluttertoast.showToast(
|
Fluttertoast.showToast(
|
||||||
// msg: timeoutError,
|
msg: timeoutError,
|
||||||
// toastLength: Toast.LENGTH_LONG,
|
toastLength: Toast.LENGTH_LONG,
|
||||||
// gravity: ToastGravity.BOTTOM,
|
gravity: ToastGravity.BOTTOM,
|
||||||
// backgroundColor: Colors.black,
|
backgroundColor: Colors.black,
|
||||||
// );
|
);
|
||||||
// throw (timeoutError);
|
throw (timeoutError);
|
||||||
// } on SocketException catch (_) {
|
} on SocketException catch (_) {
|
||||||
// Fluttertoast.showToast(
|
Fluttertoast.showToast(
|
||||||
// msg: timeoutError,
|
msg: timeoutError,
|
||||||
// toastLength: Toast.LENGTH_LONG,
|
toastLength: Toast.LENGTH_LONG,
|
||||||
// gravity: ToastGravity.BOTTOM,
|
gravity: ToastGravity.BOTTOM,
|
||||||
// backgroundColor: Colors.black,
|
backgroundColor: Colors.black,
|
||||||
// );
|
);
|
||||||
// throw (timeoutError);
|
throw (timeoutError);
|
||||||
// } on FormatException catch (_) {
|
} on FormatException catch (_) {
|
||||||
// throw const FormatException(formatError);
|
throw const FormatException(formatError);
|
||||||
// } on HttpException catch (_) {
|
} on HttpException catch (_) {
|
||||||
// throw const HttpException(httpError);
|
throw const HttpException(httpError);
|
||||||
// } on Error catch (e) {
|
} on Error catch (e) {
|
||||||
// debugPrint("post request error: $e");
|
Fluttertoast.showToast(
|
||||||
// Fluttertoast.showToast(
|
msg: onError,
|
||||||
// msg: onError,
|
toastLength: Toast.LENGTH_LONG,
|
||||||
// toastLength: Toast.LENGTH_LONG,
|
gravity: ToastGravity.BOTTOM,
|
||||||
// gravity: ToastGravity.BOTTOM,
|
backgroundColor: Colors.black,
|
||||||
// backgroundColor: Colors.black,
|
);
|
||||||
// );
|
throw (e.toString());
|
||||||
// throw (e.toString());
|
}
|
||||||
// }
|
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,10 +3,11 @@ class Url {
|
||||||
static Url get instance => _instance;
|
static Url get instance => _instance;
|
||||||
|
|
||||||
String host() {
|
String host() {
|
||||||
// return '192.168.10.221:3003';
|
// // return '192.168.10.221:3003';
|
||||||
// return 'agusandelnorte.gov.ph';
|
// return 'agusandelnorte.gov.ph';
|
||||||
// return "192.168.10.219:3000";
|
// return "192.168.10.219:3000";
|
||||||
return 'devweb.agusandelnorte.gov.ph';
|
return "devweb.agusandelnorte.gov.ph";
|
||||||
|
// return 'devapi.agusandelnorte.gov.ph:3004';
|
||||||
}
|
}
|
||||||
|
|
||||||
String authentication() {
|
String authentication() {
|
||||||
|
@ -14,23 +15,33 @@ class Url {
|
||||||
}
|
}
|
||||||
|
|
||||||
String profileInformation(){
|
String profileInformation(){
|
||||||
return '/api/jobnet_app/profile/pds/';
|
return 'api/jobnet_app/profile/pds/';
|
||||||
}
|
}
|
||||||
|
|
||||||
String latestApk(){
|
String latestApk(){
|
||||||
return "/api/system_app/apk_version/latest";
|
return "/api/system_app/apk_version/latest";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////ELIGIBILITIES PATHS
|
||||||
String eligibilities(){
|
String eligibilities(){
|
||||||
return "/api/jobnet_app/eligibilities/";
|
return "/api/jobnet_app/eligibilities/";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String getEligibilities(){
|
||||||
|
return "/api/jobnet_app/profile/pds/eligibility/";
|
||||||
|
}
|
||||||
|
|
||||||
String addEligibility(){
|
String addEligibility(){
|
||||||
return "/api/jobnet_app/profile/pds/eligibility/";
|
return "/api/jobnet_app/profile/pds/eligibility/";
|
||||||
}
|
}
|
||||||
String deleteEligibility(){
|
String deleteEligibility(){
|
||||||
return "/api/jobnet_app/profile/pds/eligibility/";
|
return "/api/jobnet_app/profile/pds/eligibility/";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String updateEligibility(){
|
||||||
|
return "/api/jobnet_app/profile/pds/eligibility/";
|
||||||
|
}
|
||||||
|
|
||||||
// location utils path
|
// location utils path
|
||||||
String getCounties(){
|
String getCounties(){
|
||||||
return "/api/jobnet_app/countries/";
|
return "/api/jobnet_app/countries/";
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/src/widgets/framework.dart';
|
||||||
|
import 'package:flutter/src/widgets/placeholder.dart';
|
||||||
|
|
||||||
|
class CloseLeading extends StatelessWidget {
|
||||||
|
final Function() onPressed;
|
||||||
|
const CloseLeading({super.key, required this.onPressed});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return IconButton(onPressed: onPressed, icon: const Icon(Icons.close));
|
||||||
|
}
|
||||||
|
}
|
|
@ -3,6 +3,8 @@ PODS:
|
||||||
- FMDB (2.7.5):
|
- FMDB (2.7.5):
|
||||||
- FMDB/standard (= 2.7.5)
|
- FMDB/standard (= 2.7.5)
|
||||||
- FMDB/standard (2.7.5)
|
- FMDB/standard (2.7.5)
|
||||||
|
- modal_progress_hud_nsn (0.0.1):
|
||||||
|
- FlutterMacOS
|
||||||
- package_info_plus (0.0.1):
|
- package_info_plus (0.0.1):
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
- path_provider_foundation (0.0.1):
|
- path_provider_foundation (0.0.1):
|
||||||
|
@ -17,6 +19,7 @@ PODS:
|
||||||
|
|
||||||
DEPENDENCIES:
|
DEPENDENCIES:
|
||||||
- FlutterMacOS (from `Flutter/ephemeral`)
|
- FlutterMacOS (from `Flutter/ephemeral`)
|
||||||
|
- modal_progress_hud_nsn (from `Flutter/ephemeral/.symlinks/plugins/modal_progress_hud_nsn/macos`)
|
||||||
- package_info_plus (from `Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos`)
|
- package_info_plus (from `Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos`)
|
||||||
- path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/macos`)
|
- path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/macos`)
|
||||||
- shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/macos`)
|
- shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/macos`)
|
||||||
|
@ -29,6 +32,8 @@ SPEC REPOS:
|
||||||
EXTERNAL SOURCES:
|
EXTERNAL SOURCES:
|
||||||
FlutterMacOS:
|
FlutterMacOS:
|
||||||
:path: Flutter/ephemeral
|
:path: Flutter/ephemeral
|
||||||
|
modal_progress_hud_nsn:
|
||||||
|
:path: Flutter/ephemeral/.symlinks/plugins/modal_progress_hud_nsn/macos
|
||||||
package_info_plus:
|
package_info_plus:
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos
|
:path: Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos
|
||||||
path_provider_foundation:
|
path_provider_foundation:
|
||||||
|
@ -41,6 +46,7 @@ EXTERNAL SOURCES:
|
||||||
SPEC CHECKSUMS:
|
SPEC CHECKSUMS:
|
||||||
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
|
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
|
||||||
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
|
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
|
||||||
|
modal_progress_hud_nsn: 8099d46c2cf9de7af8fe0a3f8f5d2aa32cf956c3
|
||||||
package_info_plus: 02d7a575e80f194102bef286361c6c326e4c29ce
|
package_info_plus: 02d7a575e80f194102bef286361c6c326e4c29ce
|
||||||
path_provider_foundation: 37748e03f12783f9de2cb2c4eadfaa25fe6d4852
|
path_provider_foundation: 37748e03f12783f9de2cb2c4eadfaa25fe6d4852
|
||||||
shared_preferences_foundation: 297b3ebca31b34ec92be11acd7fb0ba932c822ca
|
shared_preferences_foundation: 297b3ebca31b34ec92be11acd7fb0ba932c822ca
|
||||||
|
|
Loading…
Reference in New Issue