From 118a4f45872e02f8a6a279e3c11bdddde59f5523 Mon Sep 17 00:00:00 2001 From: PGAN-MIS Date: Thu, 9 Feb 2023 16:48:19 +0800 Subject: [PATCH] refactor profile screens --- lib/model/profile/eligibility.dart | 2 +- .../basic_information/address_screen.dart | 42 +- .../basic_information/citizenship_screen.dart | 3 +- ...n.dart => contact_information_screen.dart} | 35 +- .../identification_information.dart | 63 --- .../identification_information_screen.dart | 90 ++++ .../primary_information.dart | 163 ------- .../primary_information_screen.dart | 159 +++++++ .../profile/components/education_screen.dart | 110 +++-- .../profile/components/eligibility.dart | 68 --- .../components/eligibility_screen.dart | 70 +++ .../components/family_background_screen.dart | 412 ++++++++++------ .../learning_and_development_screen.dart | 20 +- .../profile/components/loading_screen.dart | 2 +- ...t => non_academic_recognition_screen.dart} | 14 +- ...ership.dart => org_membership_screen.dart} | 25 +- .../skills_and_hobbies_screen.dart | 50 +- .../profile/components/references_screen.dart | 26 +- .../voluntary_works_screen.dart} | 23 +- .../components/work_history_screen.dart | 80 ++-- lib/screens/profile/profile.dart | 442 +++++++++--------- lib/theme-data.dart/box_shadow.dart | 8 + lib/utils/text_container.dart | 46 +- 23 files changed, 1120 insertions(+), 833 deletions(-) rename lib/screens/profile/components/basic_information/{contact_information.dart => contact_information_screen.dart} (66%) delete mode 100644 lib/screens/profile/components/basic_information/identification_information.dart create mode 100644 lib/screens/profile/components/basic_information/identification_information_screen.dart delete mode 100644 lib/screens/profile/components/basic_information/primary_information.dart create mode 100644 lib/screens/profile/components/basic_information/primary_information_screen.dart delete mode 100644 lib/screens/profile/components/eligibility.dart create mode 100644 lib/screens/profile/components/eligibility_screen.dart rename lib/screens/profile/components/other_information/{non_academic_recognition.dart => non_academic_recognition_screen.dart} (77%) rename lib/screens/profile/components/other_information/{org_membership.dart => org_membership_screen.dart} (71%) rename lib/screens/profile/{voluntary_works.dart => components/voluntary_works_screen.dart} (70%) create mode 100644 lib/theme-data.dart/box_shadow.dart diff --git a/lib/model/profile/eligibility.dart b/lib/model/profile/eligibility.dart index 8da69b6..b67a775 100644 --- a/lib/model/profile/eligibility.dart +++ b/lib/model/profile/eligibility.dart @@ -28,7 +28,7 @@ class EligibityCert { final Eligibility? eligibility; final ExamAddress? examAddress; final DateTime? validityDate; - final DateTime? licenseNumber; + final String? licenseNumber; factory EligibityCert.fromJson(Map json) => EligibityCert( id: json["id"], diff --git a/lib/screens/profile/components/basic_information/address_screen.dart b/lib/screens/profile/components/basic_information/address_screen.dart index f5c9bff..fecfa17 100644 --- a/lib/screens/profile/components/basic_information/address_screen.dart +++ b/lib/screens/profile/components/basic_information/address_screen.dart @@ -1,7 +1,9 @@ import 'package:flutter/material.dart'; import 'package:unit2/model/profile/basic_information/adress.dart'; +import 'package:unit2/theme-data.dart/box_shadow.dart'; import 'package:unit2/theme-data.dart/colors.dart'; import 'package:unit2/utils/global.dart'; +import 'package:unit2/utils/text_container.dart'; class AddressScreen extends StatefulWidget { final List addresses; @@ -16,33 +18,41 @@ class _AddressScreenState extends State { Widget build(BuildContext context) { return Scaffold( - appBar: AppBar(title: const Text("Addresses"),centerTitle: true, backgroundColor: primary,), + appBar: AppBar(title: const Text(adressScreenTitle),centerTitle: true, backgroundColor: primary,), body: ListView.builder( + padding: const EdgeInsets.symmetric(vertical: 8,horizontal: 10), itemCount: widget.addresses.length, itemBuilder: ( BuildContext context, int index){ String? subdivision = widget.addresses[index].details??''; String category = widget.addresses[index].address!.category!.name!; - String? barangay = widget.addresses[index].address!.barangay != null?widget.addresses[index].address!.barangay!.description:''; + String? barangay = widget.addresses[index].address!.barangay != null?'${widget.addresses[index].address!.barangay!.description!.toUpperCase()},':''; String cityMunicipality = widget.addresses[index].address!.cityMunicipality!.description!; String province = widget.addresses[index].address!.cityMunicipality!.province!.description!; String region = widget.addresses[index].address!.cityMunicipality!.province!.region!.description!; return Column(children: [ - Container( - width: screenWidth, - decoration: BoxDecoration( - color: Colors.grey[200], - borderRadius: const BorderRadius.all(Radius.circular(12))), - padding: const EdgeInsets.symmetric(horizontal: 12,vertical: 8), - child: Row(children: [ - Expanded(child: Column(children: [ - Row(children: [Text(subdivision), const SizedBox(width: 5,), Text(category)],), - Text("$barangay $cityMunicipality $province $region"), - ],)), - IconButton(onPressed: (){}, icon: const Icon(Icons.more_vert)) - ]), + + Column( + children: [ + Container( + width: screenWidth, + decoration: box1(), + padding: const EdgeInsets.fromLTRB(8,16,0,16), + child: Row(children: [ + Expanded(child: Column(children: [ + Row(children: [Text(subdivision,style: Theme.of(context).textTheme.titleMedium,), const SizedBox(width: 5,), + + Text(category,style: Theme.of(context).textTheme.bodySmall,)],), + const Divider(), + const SizedBox(height: 5,), + Text("$barangay $cityMunicipality, $province, $region",style: Theme.of(context).textTheme.labelLarge,), + ],)), + IconButton(onPressed: (){}, icon: const Icon(Icons.more_vert,color: Colors.grey,)) + ]), + ), + ], ), - const SizedBox(height: 5,) + const SizedBox(height: 5,), ],); }), ); diff --git a/lib/screens/profile/components/basic_information/citizenship_screen.dart b/lib/screens/profile/components/basic_information/citizenship_screen.dart index 3275bd0..f826806 100644 --- a/lib/screens/profile/components/basic_information/citizenship_screen.dart +++ b/lib/screens/profile/components/basic_information/citizenship_screen.dart @@ -4,6 +4,7 @@ import 'package:flutter/src/widgets/placeholder.dart'; import 'package:unit2/model/profile/basic_information/citizenship.dart'; import 'package:unit2/theme-data.dart/colors.dart'; import 'package:unit2/utils/global.dart'; +import 'package:unit2/utils/text_container.dart'; class CitizenShipScreen extends StatefulWidget { final List citizenships; @@ -18,7 +19,7 @@ class _CitizenShipScreenState extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - title: const Text("Citizenship"),centerTitle: true, + title: const Text(citizenshipScreenTitle),centerTitle: true, backgroundColor: primary, ), body: widget.citizenships.isEmpty? diff --git a/lib/screens/profile/components/basic_information/contact_information.dart b/lib/screens/profile/components/basic_information/contact_information_screen.dart similarity index 66% rename from lib/screens/profile/components/basic_information/contact_information.dart rename to lib/screens/profile/components/basic_information/contact_information_screen.dart index 68962a6..e8055e6 100644 --- a/lib/screens/profile/components/basic_information/contact_information.dart +++ b/lib/screens/profile/components/basic_information/contact_information_screen.dart @@ -1,36 +1,39 @@ import 'package:flutter/material.dart'; 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/colors.dart'; +import 'package:unit2/utils/text_container.dart'; -class ContactInformation extends StatefulWidget { +class ContactInformationScreen extends StatefulWidget { final List contacts; - const ContactInformation({super.key, required this.contacts}); + const ContactInformationScreen({super.key, required this.contacts}); @override - State createState() => _ContactInformationState(); + State createState() => _ContactInformationScreenState(); } -class _ContactInformationState extends State { +class _ContactInformationScreenState extends State { @override Widget build(BuildContext context) { return SafeArea( child: Scaffold( appBar: AppBar( - title: const Text("Contact Information"), + title: const Text(contactScreenTitle), centerTitle: true, backgroundColor: primary, ), body: ListView.builder( + padding: const EdgeInsets.symmetric(vertical: 8,horizontal: 10), itemCount: widget.contacts.length, itemBuilder: (BuildContext context, int index) { + String numberMail = widget.contacts[index].numbermail!; + String commService = widget.contacts[index].commService!.serviceProvider!.alias!; return Column( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [ Container( - decoration: BoxDecoration( - color: Colors.grey[200], - borderRadius: const BorderRadius.all(Radius.circular(12))), + decoration: box1(), padding: const EdgeInsets.symmetric(horizontal: 12,vertical: 8), child: Row( children: [ @@ -39,16 +42,18 @@ class _ContactInformationState extends State { mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text(widget.contacts[index].numbermail.toString(),style: Theme.of(context).textTheme.titleLarge,), + Text(numberMail,style: Theme.of(context).textTheme.titleMedium!.copyWith(fontWeight: FontWeight.w500)), + const Divider(), const SizedBox(height: 5,), Row( children: [ - Text(widget.contacts[index].commService! - .serviceProvider!.alias - .toString()), - const SizedBox(width: 15,), + Expanded( + child: Text(commService + .toString(),style: Theme.of(context).textTheme.titleSmall,), + ), + widget.contacts[index].active==true? const Badge(backgroundColor: Colors.green, label: Text("Active",),):const SizedBox(), - const SizedBox(width: 8), + const SizedBox(width: 5), widget.contacts[index].primary==true? const Badge(backgroundColor: Colors.blue, label: Text("Primary"),):const SizedBox() ], ), @@ -59,7 +64,7 @@ class _ContactInformationState extends State { ]), ), - IconButton(onPressed: (){}, icon: const Icon(Icons.more_vert)) + IconButton(onPressed: (){}, icon: const Icon(Icons.more_vert,color: Colors.grey,)) ], ), ), diff --git a/lib/screens/profile/components/basic_information/identification_information.dart b/lib/screens/profile/components/basic_information/identification_information.dart deleted file mode 100644 index 7cf8efc..0000000 --- a/lib/screens/profile/components/basic_information/identification_information.dart +++ /dev/null @@ -1,63 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter/src/widgets/framework.dart'; -import 'package:flutter/src/widgets/placeholder.dart'; -import 'package:unit2/model/profile/basic_information/identification_information.dart'; -import 'package:unit2/theme-data.dart/colors.dart'; -import 'package:unit2/utils/global.dart'; - -class IdentificationInformations extends StatefulWidget { - final List identities; - const IdentificationInformations({super.key, required this.identities}); - - @override - State createState() => _IdentificationInformationsState(); -} - -class _IdentificationInformationsState extends State { - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar(title: const Text("Identifications"),centerTitle: true, backgroundColor: primary,), -body: ListView.builder( - itemCount: widget.identities.length, - itemBuilder: (BuildContext context, int index){ - return Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - width: screenWidth, - decoration: BoxDecoration( - color: Colors.grey[200], - borderRadius: const BorderRadius.all(Radius.circular(12))), - padding: const EdgeInsets.symmetric(horizontal: 12,vertical: 8), - child: Row( - children: [ - Expanded( - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text(widget.identities[index].agency!.name!,style: Theme.of(context).textTheme.titleMedium!.copyWith(fontWeight: FontWeight.bold)), - Row( - children: [ - Text(widget.identities[index].identificationNumber!,style: Theme.of(context).textTheme.titleSmall!.copyWith(fontWeight: FontWeight.bold)), - const SizedBox(width: 20,), - Badge(backgroundColor: success2, label:Text(widget.identities[index].agency!.privateEntity==true?"PRIVATE":"GOVERNMENT",)), - ], - ), - Text("${widget.identities[index].issuedAt!.cityMunicipality!.description!} ${widget.identities[index].issuedAt!.cityMunicipality!.province!.description}"), - ]), - - ), - IconButton(onPressed: (){}, icon: const Icon(Icons.more_vert)) - ], - ), - ), - const SizedBox(height: 5,), - ], - ); -}), - ); - } -} \ No newline at end of file diff --git a/lib/screens/profile/components/basic_information/identification_information_screen.dart b/lib/screens/profile/components/basic_information/identification_information_screen.dart new file mode 100644 index 0000000..e531d2a --- /dev/null +++ b/lib/screens/profile/components/basic_information/identification_information_screen.dart @@ -0,0 +1,90 @@ +import 'package:flutter/material.dart'; +import 'package:unit2/model/profile/basic_information/identification_information.dart'; +import 'package:unit2/theme-data.dart/box_shadow.dart'; +import 'package:unit2/theme-data.dart/colors.dart'; +import 'package:unit2/utils/global.dart'; +import 'package:unit2/utils/text_container.dart'; + +class IdentificationsScreen extends StatefulWidget { + final List identities; + const IdentificationsScreen({super.key, required this.identities}); + + @override + State createState() => + _IdentificationsScreenState(); +} + +class _IdentificationsScreenState + extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: const Text(identificationScreenTitle), + centerTitle: true, + backgroundColor: primary, + ), + body: ListView.builder( + padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 10), + itemCount: widget.identities.length, + itemBuilder: (BuildContext context, int index) { + String agency = widget.identities[index].agency!.name!; + String idNumber = widget.identities[index].identificationNumber!; + bool government = widget.identities[index].agency!.privateEntity!; + String issuedAt = "${widget.identities[index].issuedAt!.cityMunicipality!.description!} ${widget.identities[index].issuedAt!.cityMunicipality!.province!.description}"; + return Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + width: screenWidth, + decoration: box1(), + padding: + const EdgeInsets.symmetric(horizontal: 12, vertical: 8), + child: Row( + children: [ + Expanded( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(agency,style: Theme.of(context).textTheme.titleMedium!.copyWith(fontWeight: FontWeight.w500)), + const Divider(), + const SizedBox(height: 5,), + Row( + children: [ + Expanded( + child: Text( + "$idNumberText : $idNumber",style: Theme.of(context).textTheme.titleSmall, + ), + ), + + Badge( + + backgroundColor: success2, + label: Text( + government == + true + ? privateText.toUpperCase() + :governmentText.toUpperCase(), + style: Theme.of(context).textTheme.bodySmall!.copyWith(color: Colors.white),)), + ], + ), + const SizedBox(height: 5,), + Text(issuedAt), + ]), + ), + IconButton( + onPressed: () {}, icon: const Icon(Icons.more_vert,color: Colors.grey,)) + ], + ), + ), + const SizedBox( + height: 5, + ), + ], + ); + }), + ); + } +} diff --git a/lib/screens/profile/components/basic_information/primary_information.dart b/lib/screens/profile/components/basic_information/primary_information.dart deleted file mode 100644 index f8243a0..0000000 --- a/lib/screens/profile/components/basic_information/primary_information.dart +++ /dev/null @@ -1,163 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter/src/widgets/framework.dart'; -import 'package:flutter/src/widgets/placeholder.dart'; -import 'package:flutter_form_builder/flutter_form_builder.dart'; -import 'package:form_builder_validators/form_builder_validators.dart'; -import 'package:intl/intl.dart'; -import 'package:unit2/model/profile/basic_information/primary-information.dart'; -import 'package:unit2/theme-data.dart/colors.dart'; -import 'package:unit2/theme-data.dart/form-style.dart'; -import 'package:unit2/utils/global.dart'; - -class PrimaryInfo extends StatefulWidget { - final PrimaryInformation primaryInformation; - const PrimaryInfo({super.key, required this.primaryInformation}); - - @override - State createState() => _PrimaryInfoState(); -} - -class _PrimaryInfoState extends State { - @override - Widget build(BuildContext context) { - final _formKey = GlobalKey(); - bool enabled = false; - DateFormat dteFormat2 = DateFormat.yMMMMd('en_US'); - return SafeArea( - child: Scaffold( - appBar: AppBar( - title: const Text("Primary Information"), - centerTitle: true, - backgroundColor: primary, - ), - body: Container( - padding: const EdgeInsets.symmetric(vertical: 24, horizontal: 24), - child: FormBuilder( - child: Column( - children: [ - FormBuilderTextField( - enabled: enabled, - name: 'lastname', - initialValue: widget.primaryInformation.lastName!, - decoration: normalTextFieldStyle("Last name", ""), - - ), - const SizedBox(height: 15,), - FormBuilderTextField( - enabled: enabled, - name: 'firstname', - initialValue: widget.primaryInformation.firstName!, - decoration: normalTextFieldStyle("First name", ""), - ), - const SizedBox(height: 15,), - SizedBox( - width: screenWidth, - child: Row(children: [ - Flexible( - flex: 2, - child: FormBuilderTextField( - enabled: enabled, - name: 'middlename', - initialValue: widget.primaryInformation.middleName!, - decoration: normalTextFieldStyle("Middle name", ""), - ),), - const SizedBox(width: 10,), - Flexible( - flex: 1, - child: FormBuilderTextField( - enabled: enabled, - name: 'extension-name', - initialValue: widget.primaryInformation.nameExtension??='N/A', - decoration: normalTextFieldStyle("Name extension", ""), - ),) - ]), - - ), - const SizedBox(height: 15,), - SizedBox(width: screenWidth, - child: Row(children: [ - Flexible( - flex: 1, - child: FormBuilderTextField( - enabled: enabled, - name: 'bday', - initialValue: dteFormat2.format(widget.primaryInformation.birthdate!), - decoration: normalTextFieldStyle("Birth date", ""), - ),), - const SizedBox(width: 10,), - Flexible( - flex: 1, - child: FormBuilderTextField( - enabled: enabled, - name: 'sex', - initialValue: widget.primaryInformation.sex!, - decoration: normalTextFieldStyle("Sex", ""), - ),) - ]),), - const SizedBox(height: 15,), - SizedBox(width: screenWidth, - child: Row(children: [ - Flexible( - flex: 1, - child: FormBuilderTextField( - enabled: enabled, - name: 'bloodtype', - initialValue:widget.primaryInformation.bloodType!, - decoration: normalTextFieldStyle("Blood type", ""), - ),), - const SizedBox(width: 10,), - Flexible( - flex: 1, - child: FormBuilderTextField( - enabled: enabled, - name: 'civil-status', - initialValue: widget.primaryInformation.civilStatus!, - decoration: normalTextFieldStyle("Civil Status", ""), - ),), - const SizedBox(width: 10,), - Flexible( - flex: 1, - child: FormBuilderTextField( - enabled: enabled, - name: 'gender', - initialValue:widget.primaryInformation.gender??="N/A", - decoration: normalTextFieldStyle("Gender", ""), - ),), - ]),), - - const SizedBox(height: 15,), - SizedBox(width: screenWidth, - child: Row(children: [ - Flexible( - flex: 1, - child: FormBuilderTextField( - enabled: enabled, - name: 'height', - initialValue:widget.primaryInformation.heightM!.toString(), - decoration: normalTextFieldStyle("Height", ""), - ),), - const SizedBox(width: 10,), - Flexible( - flex: 1, - child: FormBuilderTextField( - enabled: enabled, - name: 'Weight', - initialValue: widget.primaryInformation.weightKg!.toString(), - decoration: normalTextFieldStyle("Weight", ""), - ),), - const SizedBox(width: 10,), - Flexible( - flex: 1, - child: FormBuilderTextField( - enabled: enabled, - name: 'prefix&suffix', - initialValue:"${widget.primaryInformation.titlePrefix??="NA"} | ${widget.primaryInformation.titleSuffix??="N/A"}", - decoration: normalTextFieldStyle("Title Prefix and Suffix", ""), - ),), - ]),), - ], - )), - )), - ); - } -} diff --git a/lib/screens/profile/components/basic_information/primary_information_screen.dart b/lib/screens/profile/components/basic_information/primary_information_screen.dart new file mode 100644 index 0000000..3dddc42 --- /dev/null +++ b/lib/screens/profile/components/basic_information/primary_information_screen.dart @@ -0,0 +1,159 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_form_builder/flutter_form_builder.dart'; +import 'package:intl/intl.dart'; +import 'package:unit2/model/profile/basic_information/primary-information.dart'; +import 'package:unit2/theme-data.dart/colors.dart'; +import 'package:unit2/theme-data.dart/form-style.dart'; +import 'package:unit2/utils/global.dart'; +import 'package:unit2/utils/text_container.dart'; + +class PrimaryInfo extends StatefulWidget { + final PrimaryInformation primaryInformation; + const PrimaryInfo({super.key, required this.primaryInformation}); + + @override + State createState() => _PrimaryInfoState(); +} + +class _PrimaryInfoState extends State { + @override + Widget build(BuildContext context) { + final _formKey = GlobalKey(); + bool enabled = false; + DateFormat dteFormat2 = DateFormat.yMMMMd('en_US'); + return Scaffold( + appBar: AppBar( + title: const Text(primaryInformationScreenTitle), + centerTitle: true, + backgroundColor: primary, + ), + body: Container( + padding: const EdgeInsets.symmetric(vertical: 24, horizontal: 24), + child: FormBuilder( + child: Column( + children: [ + FormBuilderTextField( + enabled: enabled, + name: lastname, + initialValue: widget.primaryInformation.lastName!, + decoration: normalTextFieldStyle("Last name", ""), + + ), + const SizedBox(height: 15,), + FormBuilderTextField( + enabled: enabled, + name: firstname, + initialValue: widget.primaryInformation.firstName!, + decoration: normalTextFieldStyle("First name", ""), + ), + const SizedBox(height: 15,), + SizedBox( + width: screenWidth, + child: Row(children: [ + Flexible( + flex: 2, + child: FormBuilderTextField( + enabled: enabled, + name: middlename, + initialValue: widget.primaryInformation.middleName!, + decoration: normalTextFieldStyle("Middle name", ""), + ),), + const SizedBox(width: 10,), + Flexible( + flex: 1, + child: FormBuilderTextField( + enabled: enabled, + name: extensionName, + initialValue: widget.primaryInformation.nameExtension??='N/A', + decoration: normalTextFieldStyle("Name extension", ""), + ),) + ]), + + ), + const SizedBox(height: 15,), + SizedBox(width: screenWidth, + child: Row(children: [ + Flexible( + flex: 1, + child: FormBuilderTextField( + enabled: enabled, + name: extensionName, + initialValue: dteFormat2.format(widget.primaryInformation.birthdate!), + decoration: normalTextFieldStyle("Birth date", ""), + ),), + const SizedBox(width: 10,), + Flexible( + flex: 1, + child: FormBuilderTextField( + enabled: enabled, + name: sex, + initialValue: widget.primaryInformation.sex!, + decoration: normalTextFieldStyle("Sex", ""), + ),) + ]),), + const SizedBox(height: 15,), + SizedBox(width: screenWidth, + child: Row(children: [ + Flexible( + flex: 1, + child: FormBuilderTextField( + enabled: enabled, + name: bloodType, + initialValue:widget.primaryInformation.bloodType!, + decoration: normalTextFieldStyle("Blood type", ""), + ),), + const SizedBox(width: 10,), + Flexible( + flex: 1, + child: FormBuilderTextField( + enabled: enabled, + name: civilStatus, + initialValue: widget.primaryInformation.civilStatus!, + decoration: normalTextFieldStyle("Civil Status", ""), + ),), + const SizedBox(width: 10,), + Flexible( + flex: 1, + child: FormBuilderTextField( + enabled: enabled, + name: gender, + initialValue:widget.primaryInformation.gender??="N/A", + decoration: normalTextFieldStyle("Gender", ""), + ),), + ]),), + + const SizedBox(height: 15,), + SizedBox(width: screenWidth, + child: Row(children: [ + Flexible( + flex: 1, + child: FormBuilderTextField( + enabled: enabled, + name: height, + initialValue:widget.primaryInformation.heightM!.toString(), + decoration: normalTextFieldStyle("Height", ""), + ),), + const SizedBox(width: 10,), + Flexible( + flex: 1, + child: FormBuilderTextField( + enabled: enabled, + name: width, + initialValue: widget.primaryInformation.weightKg!.toString(), + decoration: normalTextFieldStyle("Weight", ""), + ),), + const SizedBox(width: 10,), + Flexible( + flex: 1, + child: FormBuilderTextField( + enabled: enabled, + name: prefixSuffix, + initialValue:"${widget.primaryInformation.titlePrefix??="NA"} | ${widget.primaryInformation.titleSuffix??="N/A"}", + decoration: normalTextFieldStyle("Title Prefix and Suffix", ""), + ),), + ]),), + ], + )), + )); + } +} diff --git a/lib/screens/profile/components/education_screen.dart b/lib/screens/profile/components/education_screen.dart index 0cd6db4..de6f09f 100644 --- a/lib/screens/profile/components/education_screen.dart +++ b/lib/screens/profile/components/education_screen.dart @@ -1,8 +1,9 @@ import 'package:flutter/material.dart'; -import 'package:flutter/src/widgets/framework.dart'; -import 'package:flutter/src/widgets/placeholder.dart'; + import 'package:unit2/model/profile/educational_background.dart'; +import 'package:unit2/theme-data.dart/box_shadow.dart'; import 'package:unit2/theme-data.dart/colors.dart'; +import 'package:unit2/utils/text_container.dart'; class EducationScreen extends StatefulWidget { final List educationBackgrounds; @@ -17,52 +18,109 @@ class _EducationScreenState extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - title: const Text("Educational Background"), + title: const Text(educationScreenTitle), centerTitle: true, backgroundColor: primary, ), body: ListView.builder( + padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 10), itemCount: widget.educationBackgrounds.length, itemBuilder: (BuildContext context, int index) { String level = widget.educationBackgrounds[index].education!.level!; String periodFrom = widget.educationBackgrounds[index].periodFrom!; String periodTo = widget.educationBackgrounds[index].periodTo!; - String? program = widget.educationBackgrounds[index].education!.course == null? null: widget.educationBackgrounds[index].education!.course!.program!; - List? honors = widget.educationBackgrounds[index].honors!.toList(); - String school = widget.educationBackgrounds[index].education!.school!.name!; + String? program = + widget.educationBackgrounds[index].education!.course == null + ? null + : widget.educationBackgrounds[index].education!.course! + .program!; + List? honors = + widget.educationBackgrounds[index].honors!.toList(); + String school = + widget.educationBackgrounds[index].education!.school!.name!; return Column( children: [ Container( - decoration: BoxDecoration( - color: Colors.grey[200], - borderRadius: - const BorderRadius.all(Radius.circular(12))), + decoration: box1(), padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8), child: Row( children: [ Expanded( - child: Column(children: [ - Row( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text(level), - Text("$periodFrom $periodTo"), - ], - ), - Text(program??=''), - Text(school), - Container( - child: honors.isNotEmpty? Column( - children: honors.map((Honor honor) => Text(honor.name!)).toList(), - ):const SizedBox() - ) - ]), + Row( + children: [ + Expanded( + child: Text( + level, + style: Theme.of(context) + .textTheme + .titleMedium! + .copyWith(fontWeight: FontWeight.w500), + )), + Text( + "$periodFrom - $periodTo", + style: + Theme.of(context).textTheme.bodyMedium, + ), + ], + ), + + const SizedBox(height: 5,), + Text( + school, + style: Theme.of(context).textTheme.titleSmall, + ), + Container( + padding: const EdgeInsets.only(top: 8), + child: honors.isNotEmpty + ? Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const Text("$honorsText : "), + Column( + children: + + honors + .map((Honor honor) => + Text(" ${honor.name!}")) + .toList(), + ), + ], + ) + : const SizedBox()), + program == null + ? const SizedBox() + : Column( + mainAxisAlignment: + MainAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + const SizedBox( + height: 5, + ), + Text(program), + ], + ), + ]), ), IconButton( - onPressed: () {}, icon: const Icon(Icons.more_vert)) + onPressed: () {}, + icon: const Icon( + Icons.more_vert, + color: Colors.grey, + )) ], ), - ) + ), + const SizedBox( + height: 5, + ), ], ); }), diff --git a/lib/screens/profile/components/eligibility.dart b/lib/screens/profile/components/eligibility.dart deleted file mode 100644 index be2d7ff..0000000 --- a/lib/screens/profile/components/eligibility.dart +++ /dev/null @@ -1,68 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter/src/widgets/framework.dart'; -import 'package:flutter/src/widgets/placeholder.dart'; -import 'package:unit2/model/profile/eligibility.dart'; -import 'package:unit2/theme-data.dart/colors.dart'; -import 'package:unit2/utils/global.dart'; - -class EligibiltyScreen extends StatefulWidget { - final List eligibilities; - const EligibiltyScreen({super.key, required this.eligibilities}); - - @override - State createState() => _EligibiltyScreenState(); -} - -class _EligibiltyScreenState extends State { - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - title: const Text("Eligibility"), - centerTitle: true, - backgroundColor: primary, - ), - body: ListView.builder( - itemCount: widget.eligibilities.length, - itemBuilder: (BuildContext context, int index) { - return Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - width: screenWidth, - padding: const EdgeInsets.symmetric(horizontal: 12,vertical: 8), - decoration: BoxDecoration( - color: Colors.grey[200], - borderRadius: - const BorderRadius.all(Radius.circular(12))), - child: Row( - children: [ - Expanded( - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - - children: [ - - Text(widget.eligibilities[index].eligibility!.title!, - style: Theme.of(context) - .textTheme - .titleMedium! - .copyWith(fontWeight: FontWeight.bold)), - Text( - "License number: ${widget.eligibilities[index].licenseNumber==null?'N/A':widget.eligibilities[index].licenseNumber.toString()}"), - Text("Rating: ${widget.eligibilities[index].rating}.") - ]), - - ), - IconButton(onPressed: (){}, icon: const Icon(Icons.more_vert)) - ], - ), - ) - ], - ); - }), - ); - } -} diff --git a/lib/screens/profile/components/eligibility_screen.dart b/lib/screens/profile/components/eligibility_screen.dart new file mode 100644 index 0000000..8eb7b5d --- /dev/null +++ b/lib/screens/profile/components/eligibility_screen.dart @@ -0,0 +1,70 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/src/widgets/framework.dart'; +import 'package:flutter/src/widgets/placeholder.dart'; +import 'package:unit2/model/profile/eligibility.dart'; +import 'package:unit2/theme-data.dart/box_shadow.dart'; +import 'package:unit2/theme-data.dart/colors.dart'; +import 'package:unit2/utils/global.dart'; +import 'package:unit2/utils/text_container.dart'; + +class EligibiltyScreen extends StatefulWidget { + final List eligibilities; + const EligibiltyScreen({super.key, required this.eligibilities}); + + @override + State createState() => _EligibiltyScreenState(); +} + +class _EligibiltyScreenState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: const Text(elibilityScreenTitle), + centerTitle: true, + backgroundColor: primary, + ), + body: ListView.builder( + padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 10), + itemCount: widget.eligibilities.length, + itemBuilder: (BuildContext context, int index) { + String title = widget.eligibilities[index].eligibility!.title!; + return Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + width: screenWidth, + padding: + const EdgeInsets.symmetric(horizontal: 12, vertical: 8), + decoration: box1(), + child: Row( + children: [ + Expanded( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + title,style: Theme.of(context).textTheme.titleMedium!.copyWith(fontWeight: FontWeight.w500), + ), + const Divider(), + const SizedBox(height: 5,), + Text( + "$licenseNumber: ${widget.eligibilities[index].licenseNumber == null ? 'N/A' : widget.eligibilities[index].licenseNumber.toString()}",style: Theme.of(context).textTheme.titleSmall), + const SizedBox(height: 3,), + Text( + "$rating : ${widget.eligibilities[index].rating}.",style: Theme.of(context).textTheme.titleSmall) + ]), + ), + IconButton( + onPressed: () {}, icon: const Icon(Icons.more_vert,color: Colors.grey,)) + ], + ), + ) + ], + ); + }), + ); + } +} diff --git a/lib/screens/profile/components/family_background_screen.dart b/lib/screens/profile/components/family_background_screen.dart index 7668ff7..393b2f9 100644 --- a/lib/screens/profile/components/family_background_screen.dart +++ b/lib/screens/profile/components/family_background_screen.dart @@ -1,11 +1,9 @@ -import 'dart:math'; - import 'package:flutter/material.dart'; -import 'package:flutter/src/widgets/framework.dart'; -import 'package:flutter/src/widgets/placeholder.dart'; import 'package:unit2/model/profile/family_backround.dart'; +import 'package:unit2/theme-data.dart/box_shadow.dart'; import 'package:unit2/theme-data.dart/colors.dart'; import 'package:unit2/utils/global.dart'; +import 'package:unit2/utils/text_container.dart'; class FamilyBackgroundScreen extends StatefulWidget { final List familyBackground; @@ -23,167 +21,275 @@ class _FamilyBackgroundScreenState extends State { List otherRelated = []; @override Widget build(BuildContext context) { - father = widget.familyBackground.firstWhere((element) => element.relationship!.id==1); - mother = widget.familyBackground.firstWhere((element) => element.relationship!.id==2); - spouse = widget.familyBackground.firstWhere((element) => element.relationship!.id==3); - var childs = widget.familyBackground.where((element) => element.relationship!.id==4); - if(childs.isNotEmpty){ + father = widget.familyBackground + .firstWhere((element) => element.relationship!.id == 1); + mother = widget.familyBackground + .firstWhere((element) => element.relationship!.id == 2); + spouse = widget.familyBackground + .firstWhere((element) => element.relationship!.id == 3); + + // get all children + var childs = widget.familyBackground + .where((element) => element.relationship!.id == 4); + if (childs.isNotEmpty) { for (var element in childs) { children.add(element); } - } - var relateds = widget.familyBackground.where((element) => element.relationship!.id! < 4); - if(relateds.isNotEmpty){ - for (var element in childs) { + } + + //get all related persons + var relateds = widget.familyBackground + .where((element) => element.relationship!.id! > 4); + if (relateds.isNotEmpty) { + for (var element in relateds) { otherRelated.add(element); } - } + } return Scaffold( - appBar: AppBar(title: const Text("Addresses"), centerTitle: true, backgroundColor: primary,), - body: Column( - children: [ - //Father - Container( - decoration: BoxDecoration( - color: Colors.grey[200], - borderRadius: const BorderRadius.all(Radius.circular(12))), - padding: const EdgeInsets.symmetric(horizontal: 12,vertical: 8), + appBar: AppBar( + title: const Text(familyBackgroundScreenTitle), + centerTitle: true, + backgroundColor: primary, + ), + body: ListView(children: [ + //Father---------------------------------------------- + Container( + decoration: box1(), + padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8), width: screenWidth, - child: Row( - children: [ - Expanded( - child: Column( + child: Row( + children: [ + Expanded( + child: Column( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [ - const Text("Father"), - Text("${father!.relatedPerson!.firstName} ${father!.relatedPerson!.middleName} ${father!.relatedPerson!.lastName} ${father!.relatedPerson!.nameExtension??''}"), - const Text("Full Name"), - Row(children: [ - Checkbox(value: false, onChanged: (value){}), - const Text("Incase of emergency") - ],) - ]), - ), - IconButton(onPressed: (){}, icon: const Icon(Icons.more_vert)) - ], - ),), - const SizedBox(height: 5,), - //Mother - Container( - decoration: BoxDecoration( - color: Colors.grey[200], - borderRadius: const BorderRadius.all(Radius.circular(12))), - padding: const EdgeInsets.symmetric(horizontal: 12,vertical: 8), - width: screenWidth, - child: Row( - children: [ - Expanded( - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - const Text("Mother"), - Text("${mother!.relatedPerson!.firstName} ${mother!.relatedPerson!.middleName} ${mother!.relatedPerson!.lastName} ${mother!.relatedPerson!.nameExtension??''}"), - const Text("Full Name"), - Row(children: [ - Checkbox(value: false, onChanged: (value){}), - const Text("Incase of emergency") - ],) - ]), - ), - IconButton(onPressed: (){}, icon: const Icon(Icons.more_vert)) - ], - ),), - const SizedBox(height: 5,), - //Spouse - spouse != null? - Container( - decoration: BoxDecoration( - color: Colors.grey[200], - borderRadius: const BorderRadius.all(Radius.circular(12))), - padding: const EdgeInsets.symmetric(horizontal: 12,vertical: 8), - width: screenWidth, - child: Row( - children: [ - Expanded( - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - const Text("Spouse"), - Text("${spouse!.relatedPerson!.firstName} ${spouse!.relatedPerson!.middleName} ${spouse!.relatedPerson!.lastName} ${spouse!.relatedPerson!.nameExtension??''}"), - const Text("Full Name"), - Row(children: [ - Checkbox(value: false, onChanged: (value){}), - const Text("Incase of emergency") - ],) - ]), - ), - IconButton(onPressed: (){}, icon: const Icon(Icons.more_vert)) - ], - ),):const SizedBox(), - const SizedBox(height: 5,), + const Text(fatherText), + const SizedBox(height: 5,), + Text( + " ${father!.relatedPerson!.firstName} ${father!.relatedPerson!.middleName} ${father!.relatedPerson!.lastName} ${father!.relatedPerson!.nameExtension ?? ''},",style: Theme.of(context).textTheme.titleMedium!.copyWith(fontWeight: FontWeight.w500),), + Text(" $fullname",style: Theme.of(context).textTheme.bodySmall,), + Row( + children: [ + Checkbox(value: false, onChanged: (value) {}), + const Text(incaseOfEmergency) + ], + ) + ]), + ), + IconButton( + onPressed: () {}, + icon: const Icon( + Icons.more_vert, + color: Colors.grey, + )) + ], + ), + ), + const SizedBox( + height: 5, + ), -// Childrens - children.isNotEmpty?Expanded( - child: ListView( - children: children.map((child) => Container( - decoration: BoxDecoration( - color: Colors.grey[200], - borderRadius: const BorderRadius.all(Radius.circular(12))), - padding: const EdgeInsets.symmetric(horizontal: 12,vertical: 8), - width: screenWidth, - child: Row( - children: [ - Expanded( - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - const Text("Children"), - Text("${child.relatedPerson!.firstName} ${child.relatedPerson!.middleName} ${child.relatedPerson!.lastName} ${child.relatedPerson!.nameExtension??''}"), - const Text("Full Name"), - Row(children: [ - Checkbox(value: false, onChanged: (value){}), - const Text("Incase of emergency") - ],) - ]), - ), - IconButton(onPressed: (){}, icon: const Icon(Icons.more_vert)) - ], - ),),).toList()), - ):const SizedBox(), + //Mother----------------------------------------------------- + Container( + decoration: box1(), + padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8), + width: screenWidth, + child: Row( + children: [ + Expanded( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const Text(motherText), + const SizedBox(height: 5,), + Text( + " ${mother!.relatedPerson!.firstName} ${mother!.relatedPerson!.middleName} ${mother!.relatedPerson!.lastName} ${mother!.relatedPerson!.nameExtension ?? ''}",style: Theme.of(context).textTheme.titleMedium!.copyWith(fontWeight: FontWeight.w500),), + Text(" $fullname",style: Theme.of(context).textTheme.bodySmall), + Row( + children: [ + Checkbox(value: false, onChanged: (value) {}), + const Text(incaseOfEmergency) + ], + ) + ]), + ), + IconButton( + onPressed: () {}, + icon: const Icon( + Icons.more_vert, + color: Colors.grey, + )) + ], + ), + ), + const SizedBox( + height: 5, + ), + //Spouse --------------------------------------------------------- + spouse != null + ? Container( + decoration: box1(), + padding: + const EdgeInsets.symmetric(horizontal: 12, vertical: 8), + width: screenWidth, + child: Row( + children: [ + Expanded( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const Text(spouseText), + const SizedBox(height: 5,), + Text( + " ${spouse!.relatedPerson!.firstName} ${spouse!.relatedPerson!.middleName} ${spouse!.relatedPerson!.lastName} ${spouse!.relatedPerson!.nameExtension ?? ''}",style: Theme.of(context).textTheme.titleMedium!.copyWith(fontWeight: FontWeight.w500)), + Text(" $fullname",style: Theme.of(context).textTheme.bodySmall), + Row( + children: [ + Checkbox(value: false, onChanged: (value) {}), + const Text(incaseOfEmergency) + ], + ) + ]), + ), + IconButton( + onPressed: () {}, + icon: const Icon( + Icons.more_vert, + color: Colors.grey, + )) + ], + ), + ) + : const SizedBox(), + const SizedBox( + height: 5, + ), - otherRelated.isNotEmpty?Expanded( - child: ListView( - children: otherRelated.map((relative) => Container( - decoration: BoxDecoration( - color: Colors.grey[200], - borderRadius: const BorderRadius.all(Radius.circular(12))), - padding: const EdgeInsets.symmetric(horizontal: 12,vertical: 8), - width: screenWidth, - child: Row( - children: [ - Expanded( - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - const Text("Other related Person(s)"), - Text("${relative.relatedPerson!.firstName} ${relative!.relatedPerson!.middleName} ${relative!.relatedPerson!.lastName} ${relative!.relatedPerson!.nameExtension??''}"), - const Text("Full Name"), - Row(children: [ - Checkbox(value: false, onChanged: (value){}), - const Text("Incase of emergency") - ],) - ]), - ), - IconButton(onPressed: (){}, icon: const Icon(Icons.more_vert)) - ], - ),),).toList()), - ):const SizedBox() +// Childrens ---------------------------------- + children.isNotEmpty + ? Container( + decoration: box1(), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: children + .map( + (child){ + int index = children.indexOf(child); + return Container( + + padding: const EdgeInsets.symmetric( + horizontal: 12, vertical: 8), + width: screenWidth, + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + index == 0? const Text(childrenText):const SizedBox(), + const SizedBox( + height: 5, + ), + Row( + children: [ + Expanded( + child: Column( + mainAxisAlignment: + MainAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Text( + " ${child.relatedPerson!.firstName} ${child.relatedPerson!.middleName} ${child.relatedPerson!.lastName} ${child.relatedPerson!.nameExtension ?? ''}",style: Theme.of(context).textTheme.titleMedium!.copyWith(fontWeight: FontWeight.w500)), + Text(" $fullname",style: Theme.of(context).textTheme.bodySmall), + Row( + children: [ + Checkbox( + value: false, + onChanged: (value) {}), + const Text(incaseOfEmergency) + ], + ) + ]), + ), + IconButton( + onPressed: () {}, + icon: const Icon(Icons.more_vert,color: Colors.grey,)) + ], + ), + ], + ), + ); + } + ) + .toList()), + ) + : const SizedBox(), + const SizedBox( + height: 5, + ), +//Other related person + otherRelated.isNotEmpty + ? Container( + decoration: box1(), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: otherRelated + .map( + (relative){ + int index2 = otherRelated.indexOf(relative); + return Container( + + padding: const EdgeInsets.symmetric( + horizontal: 12, vertical: 8), + width: screenWidth, + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + index2 == 0? const Text(otherRelatedText):const SizedBox(), + const SizedBox( + height: 5, + ), + Row( + children: [ + Expanded( + child: Column( + mainAxisAlignment: + MainAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Text( + " ${relative.relatedPerson!.firstName} ${relative.relatedPerson!.middleName} ${relative.relatedPerson!.lastName} ${relative.relatedPerson!.nameExtension ?? ''}",style: Theme.of(context).textTheme.titleMedium!.copyWith(fontWeight: FontWeight.w500)), + Text(" $fullname",style: Theme.of(context).textTheme.bodySmall!), + Row( + children: [ + Checkbox( + value: false, + onChanged: (value) {}), + const Text(incaseOfEmergency) + ], + ) + ]), + ), + IconButton( + onPressed: () {}, + icon: const Icon(Icons.more_vert,color: Colors.grey,)) + ], + ), + ], + ), + ); + } + ) + .toList()), + ) + : const SizedBox(), ]), ); } -} \ No newline at end of file +} diff --git a/lib/screens/profile/components/learning_and_development_screen.dart b/lib/screens/profile/components/learning_and_development_screen.dart index f2f89ed..78e64c9 100644 --- a/lib/screens/profile/components/learning_and_development_screen.dart +++ b/lib/screens/profile/components/learning_and_development_screen.dart @@ -3,8 +3,10 @@ import 'package:flutter/src/widgets/framework.dart'; import 'package:flutter/src/widgets/placeholder.dart'; import 'package:intl/intl.dart'; import 'package:unit2/model/profile/learning_development.dart'; +import 'package:unit2/theme-data.dart/box_shadow.dart'; import 'package:unit2/theme-data.dart/colors.dart'; import 'package:unit2/utils/global.dart'; +import 'package:unit2/utils/text_container.dart'; class LearningAndDevelopmentScreen extends StatefulWidget { final List learningDevelopments; @@ -19,23 +21,24 @@ class _LearningAndDevelopmentScreenState extends State nonAcademicRecognitions; @@ -17,8 +19,9 @@ class _NonAcademicRecognitionScreenState extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - title: const Text("Organization Memberships"), + title: const Text(orgMembershipTitle), backgroundColor: primary, centerTitle: true, ), body: ListView.builder( itemCount: widget.orgMemberships.length, + padding: const EdgeInsets.symmetric(vertical: 8,horizontal: 10), itemBuilder: (BuildContext context, int index) { String entity = widget.orgMemberships[index].agency!.privateEntity == false - ? "Government" - : "Private"; + ? governmentText.toUpperCase() + : privateText.toUpperCase(); String agencyName = widget.orgMemberships[index].agency!.name!; return Column( children: [ Container( width: screenWidth, - decoration: BoxDecoration( - color: Colors.grey[200], - borderRadius: - const BorderRadius.all(Radius.circular(12))), + decoration: box1(), padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8), child: Row(children: [ @@ -47,14 +47,17 @@ class _OrgMembershipsScreenState extends State { mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text(entity), - Text(agencyName), + + Text(agencyName,style: Theme.of(context).textTheme.titleMedium!.copyWith(fontWeight: FontWeight.w500),), + const Divider(), + Text(entity,style: Theme.of(context).textTheme.labelLarge,), ], )), IconButton( - onPressed: () {}, icon: const Icon(Icons.more_vert)) + onPressed: () {}, icon: const Icon(Icons.more_vert,color: Colors.grey,)) ]), - ) + ), + const SizedBox(height: 5,), ], ); }), diff --git a/lib/screens/profile/components/other_information/skills_and_hobbies_screen.dart b/lib/screens/profile/components/other_information/skills_and_hobbies_screen.dart index 332a02f..b00f398 100644 --- a/lib/screens/profile/components/other_information/skills_and_hobbies_screen.dart +++ b/lib/screens/profile/components/other_information/skills_and_hobbies_screen.dart @@ -3,6 +3,8 @@ import 'package:flutter/src/widgets/framework.dart'; import 'package:flutter/src/widgets/placeholder.dart'; import 'package:unit2/model/profile/other_information/skills_and_hobbies.dart'; import 'package:unit2/theme-data.dart/colors.dart'; +import 'package:unit2/utils/global.dart'; +import 'package:unit2/utils/text_container.dart'; class SkillHobbiesScreen extends StatefulWidget { final ListskillsHobbies; @@ -16,33 +18,35 @@ class _SkillHobbiesScreenState extends State { @override Widget build(BuildContext context) { return Scaffold( - appBar: AppBar(title: const Text("Skills and Hobbies"), + appBar: AppBar(title: const Text(skillAndHobbiesTitle), backgroundColor: primary, centerTitle: true, ), - body: Wrap( - spacing: 5, - runSpacing: 5, - clipBehavior: Clip.none, - verticalDirection: VerticalDirection.down, - children:widget.skillsHobbies.map((SkillsHobbies sh){ - return Badge( - padding: const EdgeInsets.all(8), - alignment: AlignmentDirectional.topStart, - backgroundColor: Colors.grey.shade300, - child: Row( - children: [ - Text(sh.name!), - IconButton( - onPressed: () {}, - icon: const Icon(Icons.close)), - ], - ), - - ); - }).toList() - + body: Padding( + padding: const EdgeInsets.all(16), + child: Wrap( + spacing: 8, + runSpacing: 8, + alignment: WrapAlignment.start, + clipBehavior: Clip.none, + verticalDirection: VerticalDirection.up, + crossAxisAlignment: WrapCrossAlignment.start, + direction: Axis.horizontal, + children:widget.skillsHobbies.map((SkillsHobbies sh){ + return FittedBox( + child: Row( + children: [ + Text(sh.name!), + IconButton( + onPressed: () {}, + icon: const Icon(Icons.close)), + ], + ), + ); + }).toList() + + ), ), ); } diff --git a/lib/screens/profile/components/references_screen.dart b/lib/screens/profile/components/references_screen.dart index 5fb200b..1a4e221 100644 --- a/lib/screens/profile/components/references_screen.dart +++ b/lib/screens/profile/components/references_screen.dart @@ -2,7 +2,9 @@ import 'package:flutter/material.dart'; import 'package:flutter/src/widgets/framework.dart'; import 'package:flutter/src/widgets/placeholder.dart'; import 'package:unit2/model/profile/references.dart'; +import 'package:unit2/theme-data.dart/box_shadow.dart'; import 'package:unit2/theme-data.dart/colors.dart'; +import 'package:unit2/utils/text_container.dart'; class ReferencesScreen extends StatefulWidget { final List references; @@ -17,19 +19,18 @@ class _ReferencesScreenState extends State { Widget build(BuildContext context) { return Scaffold( - appBar: AppBar(title: const Text("Personal References"),centerTitle: true,backgroundColor: primary,), + appBar: AppBar(title: const Text(referencesScreenTitle),centerTitle: true,backgroundColor: primary,), body: ListView.builder( + padding: const EdgeInsets.symmetric(vertical: 8,horizontal: 10), itemCount: widget.references.length, itemBuilder: (BuildContext context, int index){ - String fullname = "${widget.references[0].firstName} ${widget.references[0].middleName} ${widget.references[0].lastName}"; - String addres = "${widget.references[0].address!.cityMunicipality!.description}, ${widget.references[0].address!.cityMunicipality!.province!.description}, ${widget.references[0].address!.cityMunicipality!.province!.region!.description}"; - String mobile = widget.references[0].contactNo.toString(); + String fullname = "${widget.references[index].firstName} ${widget.references[index].middleName} ${widget.references[index].lastName}"; + String addres = "${widget.references[index].address!.cityMunicipality!.description}, ${widget.references[index].address!.cityMunicipality!.province!.description}, ${widget.references[0].address!.cityMunicipality!.province!.region!.description}"; + String mobile = widget.references[index].contactNo.toString(); return Column(children: [ Container( padding: const EdgeInsets.symmetric(horizontal: 12,vertical: 8), - decoration: BoxDecoration( - color: Colors.grey[200], - borderRadius: const BorderRadius.all(Radius.circular(12))), + decoration:box1(), child: Row( children: [ Expanded( @@ -38,18 +39,19 @@ class _ReferencesScreenState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text(fullname,style: Theme.of(context).textTheme.titleLarge!.copyWith(fontWeight: FontWeight.bold)), + Text(fullname,style: Theme.of(context).textTheme.titleMedium!.copyWith(fontWeight: FontWeight.w500)), + const Divider(), const SizedBox(height: 5,), - Text(addres,style: Theme.of(context).textTheme.labelLarge!.copyWith(fontWeight: FontWeight.bold)), + Text(addres,style: Theme.of(context).textTheme.titleSmall!.copyWith(fontWeight: FontWeight.w500)), const SizedBox(height: 8,), - Text("PHONE / MOBILE NUMBER $mobile",style: Theme.of(context).textTheme.labelSmall!.copyWith(fontWeight: FontWeight.bold)), + Text("${mobileOrPhone.toUpperCase()} : $mobile",style: Theme.of(context).textTheme.labelMedium!), ],), ), - IconButton(onPressed: (){}, icon: const Icon(Icons.more_vert)) + IconButton(onPressed: (){}, icon: const Icon(Icons.more_vert,color: Colors.grey,)) ], ), ), - const SizedBox(height: 8,), + const SizedBox(height: 5,), ],); }) , ); diff --git a/lib/screens/profile/voluntary_works.dart b/lib/screens/profile/components/voluntary_works_screen.dart similarity index 70% rename from lib/screens/profile/voluntary_works.dart rename to lib/screens/profile/components/voluntary_works_screen.dart index eb06273..b6e24b7 100644 --- a/lib/screens/profile/voluntary_works.dart +++ b/lib/screens/profile/components/voluntary_works_screen.dart @@ -1,9 +1,9 @@ import 'package:flutter/material.dart'; -import 'package:flutter/src/widgets/framework.dart'; -import 'package:flutter/src/widgets/placeholder.dart'; import 'package:intl/intl.dart'; import 'package:unit2/model/profile/voluntary_works.dart'; +import 'package:unit2/theme-data.dart/box_shadow.dart'; import 'package:unit2/theme-data.dart/colors.dart'; +import 'package:unit2/utils/text_container.dart'; class VolunataryWorkScreen extends StatefulWidget { final List voluntaryWorks; @@ -18,9 +18,10 @@ class _VolunataryWorkScreenState extends State { @override Widget build(BuildContext context) { return Scaffold( - appBar: AppBar(title: const Text("Volunatary Work & Civic Services"),backgroundColor: primary,), + appBar: AppBar(title: const Text(voluntaryScreenTitle),backgroundColor: primary,), body: ListView.builder( itemCount:widget.voluntaryWorks.length , + padding: const EdgeInsets.symmetric(vertical: 8,horizontal: 10), itemBuilder: (BuildContext context, int index){ String position = widget.voluntaryWorks[index].position!.title!; String agency = widget.voluntaryWorks[index].agency!.name!; @@ -30,9 +31,7 @@ class _VolunataryWorkScreenState extends State { return Column( children: [ Container( - decoration: BoxDecoration( - color: Colors.grey[200], - borderRadius: const BorderRadius.all(Radius.circular(12))), + decoration:box1(), padding: const EdgeInsets.symmetric(horizontal: 12,vertical: 8), child: Row( children: [ @@ -41,10 +40,14 @@ class _VolunataryWorkScreenState extends State { mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text(position), - Text(agency), - Text("$from to $to"), - Text("Worked/Involved for: $hours hours"), + Text(position,style: Theme.of(context).textTheme.titleMedium!.copyWith(fontWeight: FontWeight.w500),), + const SizedBox(height: 5,), + Text(agency,style: Theme.of(context).textTheme.titleSmall,), + const Divider(), + const SizedBox(height: 3,), + Text("$duration : $from to $to"), + const SizedBox(height: 5,), + Text("$numberOfHours : $hours hours"), ]), ), IconButton(onPressed: (){}, icon: const Icon(Icons.more_vert)) diff --git a/lib/screens/profile/components/work_history_screen.dart b/lib/screens/profile/components/work_history_screen.dart index 13442bb..47d5c90 100644 --- a/lib/screens/profile/components/work_history_screen.dart +++ b/lib/screens/profile/components/work_history_screen.dart @@ -1,59 +1,71 @@ import 'package:flutter/material.dart'; -import 'package:flutter/src/widgets/framework.dart'; -import 'package:flutter/src/widgets/placeholder.dart'; import 'package:intl/intl.dart'; import 'package:unit2/model/profile/work_history.dart'; +import 'package:unit2/theme-data.dart/box_shadow.dart'; import 'package:unit2/theme-data.dart/colors.dart'; +import 'package:unit2/utils/text_container.dart'; import '../../../utils/global.dart'; class WorkHistoryScreen extends StatefulWidget { - final ListworkExperiences; - const WorkHistoryScreen({super.key,required this.workExperiences}); + final List workExperiences; + const WorkHistoryScreen({super.key, required this.workExperiences}); @override State createState() => _WorkHistoryScreenState(); } class _WorkHistoryScreenState extends State { - DateFormat dteFormat2 = DateFormat.yMMMMd('en_US'); + DateFormat dteFormat2 = DateFormat.yMMMMd('en_US'); @override Widget build(BuildContext context) { return Scaffold( - appBar: AppBar(title: const Text("Work History"),backgroundColor: primary,centerTitle: true,), + appBar: AppBar( + title: const Text(workHistoryScreenTitle), + backgroundColor: primary, + centerTitle: true, + ), body: ListView.builder( - itemCount: widget.workExperiences.length, - itemBuilder: (BuildContext context, int index){ - String position = widget.workExperiences[index].position!.title!; - String agency = widget.workExperiences[index].agency!.name!; - String from = dteFormat2.format(widget.workExperiences[index].fromDate!); - String? to = widget.workExperiences[index].toDate == null? "Present" : dteFormat2.format(widget.workExperiences[index].toDate!); - return Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - width: screenWidth, - decoration: BoxDecoration( - color: Colors.grey[200], - borderRadius: const BorderRadius.all(Radius.circular(12))), - padding: const EdgeInsets.symmetric(horizontal: 12,vertical: 8), + padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 10), + itemCount: widget.workExperiences.length, + itemBuilder: (BuildContext context, int index) { + String position = widget.workExperiences[index].position!.title!; + String agency = widget.workExperiences[index].agency!.name!; + String from = + dteFormat2.format(widget.workExperiences[index].fromDate!); + String? to = widget.workExperiences[index].toDate == null + ? present.toUpperCase() + : dteFormat2.format(widget.workExperiences[index].toDate!); + return Column( + + children: [ + Container( + width: screenWidth, + decoration: box1(), + padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8), child: Row(children: [ - Expanded(child: Column( + Expanded( + child: Column( mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text(position), - Text(agency), - Text("$from to $to"), - ],)), - IconButton(onPressed: (){}, icon: const Icon(Icons.more_vert)) + Text(position,style: Theme.of(context).textTheme.titleMedium!.copyWith(fontWeight: FontWeight.w600),), + const Divider(), + const SizedBox(height: 8,), + Text(agency,style: Theme.of(context).textTheme.titleSmall!.copyWith(fontWeight: FontWeight.w500),), + const SizedBox(height: 5,), + Text("$from to $to",style: Theme.of(context).textTheme.bodyMedium,), + ], + )), + IconButton(onPressed: () {}, icon: const Icon(Icons.more_vert,color: Colors.grey,)) ]), - ), - const SizedBox(height: 5,), - ], - ); + ), + const SizedBox( + height: 5, + ), + ], + ); }), ); } -} \ No newline at end of file +} diff --git a/lib/screens/profile/profile.dart b/lib/screens/profile/profile.dart index 05ca514..ce97d91 100644 --- a/lib/screens/profile/profile.dart +++ b/lib/screens/profile/profile.dart @@ -10,20 +10,20 @@ import 'package:fluttericon/modern_pictograms_icons.dart'; import 'package:unit2/bloc/profile/profile_bloc.dart'; import 'package:unit2/screens/profile/components/basic_information/address_screen.dart'; import 'package:unit2/screens/profile/components/basic_information/citizenship_screen.dart'; -import 'package:unit2/screens/profile/components/basic_information/contact_information.dart'; -import 'package:unit2/screens/profile/components/basic_information/identification_information.dart'; -import 'package:unit2/screens/profile/components/basic_information/primary_information.dart'; +import 'package:unit2/screens/profile/components/basic_information/contact_information_screen.dart'; +import 'package:unit2/screens/profile/components/basic_information/identification_information_screen.dart'; +import 'package:unit2/screens/profile/components/basic_information/primary_information_screen.dart'; import 'package:unit2/screens/profile/components/education_screen.dart'; -import 'package:unit2/screens/profile/components/eligibility.dart'; +import 'package:unit2/screens/profile/components/eligibility_screen.dart'; import 'package:unit2/screens/profile/components/family_background_screen.dart'; import 'package:unit2/screens/profile/components/learning_and_development_screen.dart'; import 'package:unit2/screens/profile/components/loading_screen.dart'; -import 'package:unit2/screens/profile/components/other_information/non_academic_recognition.dart'; -import 'package:unit2/screens/profile/components/other_information/org_membership.dart'; +import 'package:unit2/screens/profile/components/other_information/non_academic_recognition_screen.dart'; +import 'package:unit2/screens/profile/components/other_information/org_membership_screen.dart'; import 'package:unit2/screens/profile/components/other_information/skills_and_hobbies_screen.dart'; import 'package:unit2/screens/profile/components/references_screen.dart'; import 'package:unit2/screens/profile/components/work_history_screen.dart'; -import 'package:unit2/screens/profile/voluntary_works.dart'; +import 'package:unit2/screens/profile/components/voluntary_works_screen.dart'; import 'package:unit2/theme-data.dart/colors.dart'; import '../../bloc/user/user_bloc.dart'; import 'components/main_menu.dart'; @@ -39,227 +39,227 @@ class ProfileInfo extends StatefulWidget { class _ProfileInfoState extends State { @override Widget build(BuildContext context) { - return SafeArea( - child: Scaffold( - appBar: AppBar( - backgroundColor: primary, - centerTitle: true, - title: const Text('Profile'), - ), - body: ProgressHUD( - child: - BlocBuilder(builder: (context, state) { - if (state is UserLoggedIn) { - return BlocConsumer( - listener: (context, state) { - if (state is ProfileLoading) { - final progress = ProgressHUD.of(context); - progress?.showWithText( - 'Loading Profile', - ); - } - if (state is ProfileLoaded) { - final progress = ProgressHUD.of(context); - progress?.dismiss(); - } - }, - builder: (context, state) { - if (state is ProfileLoaded) { + return Scaffold( + appBar: AppBar( + backgroundColor: primary, + centerTitle: true, + title: const Text('Profile'), + ), + body: ProgressHUD( + child: + BlocBuilder(builder: (context, state) { + if (state is UserLoggedIn) { + return BlocConsumer( + listener: (context, state) { + if (state is ProfileLoading) { + final progress = ProgressHUD.of(context); + progress?.showWithText( + 'Loading Profile', + ); + } + if (state is ProfileLoaded) { + final progress = ProgressHUD.of(context); + progress?.dismiss(); + } + }, + builder: (context, state) { + if (state is ProfileLoaded) { - return Container( - padding: const EdgeInsets.symmetric( - vertical: 12, horizontal: 12), - child: ListView( - children: [ - const Text( - "View and Update your Profile Information"), - ExpandableGroup( - collapsedIcon: - const Icon(Icons.keyboard_arrow_down), - expandedIcon: - const Icon(Icons.keyboard_arrow_up), - header: const ListTile( - leading: Icon( - Elusive.address_book, - color: primary, - ), - title: Text( - "Basic Information", - style: TextStyle( - fontWeight: FontWeight.bold), - ), - ), - items: [ - subMenu(Icons.person, "Primary",(){ - Navigator.push(context,MaterialPageRoute(builder: (BuildContext context){ - return PrimaryInfo(primaryInformation: state.profileInformation.basicInfo.primaryInformation!); - }) ); - }), - subMenu(Icons.home, "Home Addresses",(){ - Navigator.push(context,MaterialPageRoute(builder: (BuildContext context){ - return AddressScreen(addresses: state.profileInformation.basicInfo.addresses); - }) ); - - }), - subMenu( - Icons.contact_mail, "Identifications",(){ - Navigator.push(context, MaterialPageRoute(builder: (BuildContext context){ - return IdentificationInformations(identities: state.profileInformation.basicInfo.identifications); - })); - }), - subMenu( - Icons.contact_phone, "Contact Info",(){ - Navigator.push(context, MaterialPageRoute(builder: (BuildContext context){ - return ContactInformation(contacts: state.profileInformation.basicInfo.contactInformation,); - })); - }), - subMenu(Icons.flag, "Citizenships",(){ + return Container( + padding: const EdgeInsets.symmetric( + vertical: 12, horizontal: 12), + child: ListView( + children: [ + Text( + "View and Update your Profile Information",textAlign: TextAlign.center + ,style: Theme.of(context).textTheme.bodyLarge,), + ExpandableGroup( + collapsedIcon: + const Icon(Icons.keyboard_arrow_down), + expandedIcon: + const Icon(Icons.keyboard_arrow_up), + header: const ListTile( + leading: Icon( + Elusive.address_book, + color: primary, + ), + title: Text( + "Basic Information", + style: TextStyle( + fontWeight: FontWeight.bold), + ), + ), + items: [ + subMenu(Icons.person, "Primary",(){ + Navigator.push(context,MaterialPageRoute(builder: (BuildContext context){ + return PrimaryInfo(primaryInformation: state.profileInformation.basicInfo.primaryInformation!); + }) ); + }), + subMenu(Icons.home, "Home Addresses",(){ + Navigator.push(context,MaterialPageRoute(builder: (BuildContext context){ + return AddressScreen(addresses: state.profileInformation.basicInfo.addresses); + }) ); + + }), + subMenu( + Icons.contact_mail, "Identifications",(){ Navigator.push(context, MaterialPageRoute(builder: (BuildContext context){ - return CitizenShipScreen(citizenships: state.profileInformation.basicInfo.citizenships,); + return IdentificationsScreen(identities: state.profileInformation.basicInfo.identifications); })); }), - ]), - const Divider(), - MainMenu( - icon: Elusive.group, - title: "Family", - onTap: (){ - Navigator.push(context, MaterialPageRoute(builder: (BuildContext context){ - return FamilyBackgroundScreen(familyBackground: state.profileInformation.families); - })); - }, - ), - const Divider(), - MainMenu( - icon: FontAwesome5.graduation_cap, - title: "Education", - onTap: (){ - Navigator.push(context, MaterialPageRoute(builder: (BuildContext context){ - return EducationScreen(educationBackgrounds: state.profileInformation.educationalBackgrounds); - })); - }, - ), - const Divider(), - MainMenu( - icon: Icons.stars, - title: "Eligibility", - onTap: (){ + subMenu( + Icons.contact_phone, "Contact Info",(){ + Navigator.push(context, MaterialPageRoute(builder: (BuildContext context){ + return ContactInformationScreen(contacts: state.profileInformation.basicInfo.contactInformation,); + })); + }), + subMenu(Icons.flag, "Citizenships",(){ Navigator.push(context, MaterialPageRoute(builder: (BuildContext context){ - return EligibiltyScreen(eligibilities: state.profileInformation.eligibilities); + return CitizenShipScreen(citizenships: state.profileInformation.basicInfo.citizenships,); })); - }, - ), - const Divider(), - MainMenu( - icon: FontAwesome5.shopping_bag, - title: "Work History", - onTap: (){ - Navigator.push(context, MaterialPageRoute(builder: (BuildContext context){ - return WorkHistoryScreen(workExperiences: state.profileInformation.workExperiences); - })); - }, - ), - const Divider(), - MainMenu( - icon: FontAwesome5.walking, - title: "Voluntary Work & Civic Services", - onTap: (){ - Navigator.push(context, MaterialPageRoute(builder: (BuildContext context){ - return VolunataryWorkScreen(voluntaryWorks: state.profileInformation.voluntaryWorks); - })); - }, - ), - const Divider(), - MainMenu( - icon: Elusive.lightbulb, - title: "Learning & Development", - onTap: (){ - Navigator.push(context, MaterialPageRoute(builder: (BuildContext context){ - return LearningAndDevelopmentScreen(learningDevelopments: state.profileInformation.learningsAndDevelopment); - })); - }, - ), - const Divider(), - MainMenu( - icon: Brandico.codepen, - title: "Personal References", - onTap: (){ - Navigator.push(context, MaterialPageRoute(builder: (BuildContext context){ - return ReferencesScreen(references: state.profileInformation.references); - })); - }, - ), - ExpandableGroup( - collapsedIcon: - const Icon(Icons.keyboard_arrow_down), - expandedIcon: - const Icon(Icons.keyboard_arrow_up), - header: const ListTile( - leading: Icon( - Icons.info, - color: primary, - ), - title: Text( - "Other Information", - style: TextStyle( - fontWeight: FontWeight.bold), - ), - ), - items: [ - subMenu(Icons.fitness_center, - "Skills & Hobbies",(){ - Navigator.push(context, MaterialPageRoute(builder: (BuildContext context){ - return SkillHobbiesScreen(skillsHobbies: state.profileInformation.otherInformation.skillsAndHobbies); - })); - }), - subMenu(FontAwesome5.certificate, - "Organization Memberships",(){ - Navigator.push(context, MaterialPageRoute(builder: (BuildContext context){ - return OrgMembershipsScreen(orgMemberships: state.profileInformation.otherInformation.orgMemberships); - })); - }), - subMenu(Entypo.doc_text, - "Non-Academic Recognitions",(){ - - Navigator.push(context, MaterialPageRoute(builder: (BuildContext context){ - return NonAcademicRecognitionScreen(nonAcademicRecognitions: state.profileInformation.otherInformation.nonAcademicRecognition); - })); - }), - ]), - ExpandableGroup( - collapsedIcon: - const Icon(Icons.keyboard_arrow_down), - expandedIcon: - const Icon(Icons.keyboard_arrow_up), - header: const ListTile( - leading: Icon( - FontAwesome5.laptop_house, - color: primary, - ), - title: Text( - "Assets", - style: TextStyle( - fontWeight: FontWeight.bold), - ), - ), - items: [ - subMenu(ModernPictograms.home, - "Real Property Tax",(){}), - ]), - ], + }), + ]), + const Divider(), + MainMenu( + icon: Elusive.group, + title: "Family", + onTap: (){ + Navigator.push(context, MaterialPageRoute(builder: (BuildContext context){ + return FamilyBackgroundScreen(familyBackground: state.profileInformation.families); + })); + }, ), - ); - } - if (state is ProfileLoading) { - return const LoadingScreen(); - } + const Divider(), + MainMenu( + icon: FontAwesome5.graduation_cap, + title: "Education", + onTap: (){ + Navigator.push(context, MaterialPageRoute(builder: (BuildContext context){ + return EducationScreen(educationBackgrounds: state.profileInformation.educationalBackgrounds); + })); + }, + ), + const Divider(), + MainMenu( + icon: Icons.stars, + title: "Eligibility", + onTap: (){ + Navigator.push(context, MaterialPageRoute(builder: (BuildContext context){ + return EligibiltyScreen(eligibilities: state.profileInformation.eligibilities); + })); + }, + ), + const Divider(), + MainMenu( + icon: FontAwesome5.shopping_bag, + title: "Work History", + onTap: (){ + Navigator.push(context, MaterialPageRoute(builder: (BuildContext context){ + return WorkHistoryScreen(workExperiences: state.profileInformation.workExperiences); + })); + }, + ), + const Divider(), + MainMenu( + icon: FontAwesome5.walking, + title: "Voluntary Work & Civic Services", + onTap: (){ + Navigator.push(context, MaterialPageRoute(builder: (BuildContext context){ + return VolunataryWorkScreen(voluntaryWorks: state.profileInformation.voluntaryWorks); + })); + }, + ), + const Divider(), + MainMenu( + icon: Elusive.lightbulb, + title: "Learning & Development", + onTap: (){ + Navigator.push(context, MaterialPageRoute(builder: (BuildContext context){ + return LearningAndDevelopmentScreen(learningDevelopments: state.profileInformation.learningsAndDevelopment); + })); + }, + ), + const Divider(), + MainMenu( + icon: Brandico.codepen, + title: "Personal References", + onTap: (){ + Navigator.push(context, MaterialPageRoute(builder: (BuildContext context){ + return ReferencesScreen(references: state.profileInformation.references); + })); + }, + ), + ExpandableGroup( + collapsedIcon: + const Icon(Icons.keyboard_arrow_down), + expandedIcon: + const Icon(Icons.keyboard_arrow_up), + header: const ListTile( + leading: Icon( + Icons.info, + color: primary, + ), + title: Text( + "Other Information", + style: TextStyle( + fontWeight: FontWeight.bold), + ), + ), + items: [ + subMenu(Icons.fitness_center, + "Skills & Hobbies",(){ + Navigator.push(context, MaterialPageRoute(builder: (BuildContext context){ + return SkillHobbiesScreen(skillsHobbies: state.profileInformation.otherInformation.skillsAndHobbies); + })); + }), + subMenu(FontAwesome5.certificate, + "Organization Memberships",(){ + Navigator.push(context, MaterialPageRoute(builder: (BuildContext context){ + return OrgMembershipsScreen(orgMemberships: state.profileInformation.otherInformation.orgMemberships); + })); + }), + subMenu(Entypo.doc_text, + "Non-Academic Recognitions",(){ - return Container(); - }, - ); - } - return Container(); - }), - ))); + Navigator.push(context, MaterialPageRoute(builder: (BuildContext context){ + return NonAcademicRecognitionScreen(nonAcademicRecognitions: state.profileInformation.otherInformation.nonAcademicRecognition); + })); + }), + ]), + ExpandableGroup( + collapsedIcon: + const Icon(Icons.keyboard_arrow_down), + expandedIcon: + const Icon(Icons.keyboard_arrow_up), + header: const ListTile( + leading: Icon( + FontAwesome5.laptop_house, + color: primary, + ), + title: Text( + "Assets", + style: TextStyle( + fontWeight: FontWeight.bold), + ), + ), + items: [ + subMenu(ModernPictograms.home, + "Real Property Tax",(){}), + ]), + ], + ), + ); + } + if (state is ProfileLoading) { + return const LoadingScreen(); + } + + return Container(); + }, + ); + } + return Container(); + }), + )); } } diff --git a/lib/theme-data.dart/box_shadow.dart b/lib/theme-data.dart/box_shadow.dart new file mode 100644 index 0000000..1df168d --- /dev/null +++ b/lib/theme-data.dart/box_shadow.dart @@ -0,0 +1,8 @@ + import 'package:flutter/material.dart'; + +BoxDecoration box1(){ + return const BoxDecoration( + boxShadow: [BoxShadow(color: Colors.black12,spreadRadius: 5,blurRadius: 5)] , + color: Colors.white, + borderRadius: BorderRadius.all(Radius.circular(3))); +} \ No newline at end of file diff --git a/lib/utils/text_container.dart b/lib/utils/text_container.dart index 8363228..2e72c43 100644 --- a/lib/utils/text_container.dart +++ b/lib/utils/text_container.dart @@ -69,6 +69,50 @@ const String timeoutError = "Internet timeout! Please Check your connection"; const String formatError = "Invalid Error"; const String httpError = "Error getting requested data"; const String onError = "Something went wrong! Please try again."; -// +const String adressScreenTitle = "Addresses"; +const String citizenshipScreenTitle = "Citizenship"; +const String contactScreenTitle = "Contact Information"; +const String identificationScreenTitle = "Identifications"; +const String idNumberText = "ID number"; +const String privateText = 'private'; +const String governmentText = "government"; +const String primaryInformationScreenTitle = "Primary Information"; +const String lastname = "lastname"; +const String firstname = "firstname"; +const String middlename = "middlename"; +const String extensionName = 'extension-name'; +const String birthDat = 'bday'; +const String sex = 'sex'; +const String bloodType = 'bloodtype'; +const String civilStatus = 'civil-status'; +const String gender = 'gender'; +const String height = 'height'; +const String width = 'width'; +const String prefixSuffix = 'prefix&suffix'; +const String nonAcademicRecTitle = "Non Academic Recognition"; +const String orgMembershipTitle = "Organization Membership"; +const String skillAndHobbiesTitle = "Skills and Hobbies"; +const String educationScreenTitle = "Educational Background"; +const String honorsText = 'Honors'; +const String elibilityScreenTitle = "Eligibility"; +const String licenseNumber = "LicenseNumber"; +const String rating = "Rating"; +const String familyBackgroundScreenTitle = "Family Background"; +const String fatherText = "Father"; +const String fullname = "Full name"; +const String incaseOfEmergency = "Incase of emergency"; +const String motherText = 'Mother'; +const String spouseText = "Spouse"; +const String childrenText = "Children"; +const String otherRelatedText = "Other related person"; +const String learningAndDevelopmentScreenTitle = "Learning and Development"; +const String duration = "Duration"; +const String type = "Type"; +const String referencesScreenTitle = "Personal References"; +const String mobileOrPhone = "phone / mobile number"; +const String voluntaryScreenTitle = "Voluntary Work & Civic Services"; +const String numberOfHours = "Worked/Involved for"; +const String workHistoryScreenTitle = "Work History"; +const String present = "present"; //