refactor profile screens

feature/passo/PASSO-#1-Sync-data-from-device-to-postgre-and-vice-versa
PGAN-MIS 2023-02-09 16:48:19 +08:00
parent 7795b5883b
commit 118a4f4587
23 changed files with 1120 additions and 833 deletions

View File

@ -28,7 +28,7 @@ class EligibityCert {
final Eligibility? eligibility; final Eligibility? eligibility;
final ExamAddress? examAddress; final ExamAddress? examAddress;
final DateTime? validityDate; final DateTime? validityDate;
final DateTime? licenseNumber; final String? licenseNumber;
factory EligibityCert.fromJson(Map<String, dynamic> json) => EligibityCert( factory EligibityCert.fromJson(Map<String, dynamic> json) => EligibityCert(
id: json["id"], id: json["id"],

View File

@ -1,7 +1,9 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:unit2/model/profile/basic_information/adress.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/theme-data.dart/colors.dart';
import 'package:unit2/utils/global.dart'; import 'package:unit2/utils/global.dart';
import 'package:unit2/utils/text_container.dart';
class AddressScreen extends StatefulWidget { class AddressScreen extends StatefulWidget {
final List<MainAdress> addresses; final List<MainAdress> addresses;
@ -16,33 +18,41 @@ class _AddressScreenState extends State<AddressScreen> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( 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( body: ListView.builder(
padding: const EdgeInsets.symmetric(vertical: 8,horizontal: 10),
itemCount: widget.addresses.length, itemCount: widget.addresses.length,
itemBuilder: ( itemBuilder: (
BuildContext context, int index){ BuildContext context, int index){
String? subdivision = widget.addresses[index].details??''; String? subdivision = widget.addresses[index].details??'';
String category = widget.addresses[index].address!.category!.name!; 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 cityMunicipality = widget.addresses[index].address!.cityMunicipality!.description!;
String province = widget.addresses[index].address!.cityMunicipality!.province!.description!; String province = widget.addresses[index].address!.cityMunicipality!.province!.description!;
String region = widget.addresses[index].address!.cityMunicipality!.province!.region!.description!; String region = widget.addresses[index].address!.cityMunicipality!.province!.region!.description!;
return Column(children: [ return Column(children: [
Column(
children: [
Container( Container(
width: screenWidth, width: screenWidth,
decoration: BoxDecoration( decoration: box1(),
color: Colors.grey[200], padding: const EdgeInsets.fromLTRB(8,16,0,16),
borderRadius: const BorderRadius.all(Radius.circular(12))),
padding: const EdgeInsets.symmetric(horizontal: 12,vertical: 8),
child: Row(children: [ child: Row(children: [
Expanded(child: Column(children: [ Expanded(child: Column(children: [
Row(children: [Text(subdivision), const SizedBox(width: 5,), Text(category)],), Row(children: [Text(subdivision,style: Theme.of(context).textTheme.titleMedium,), const SizedBox(width: 5,),
Text("$barangay $cityMunicipality $province $region"),
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)) IconButton(onPressed: (){}, icon: const Icon(Icons.more_vert,color: Colors.grey,))
]), ]),
), ),
const SizedBox(height: 5,) ],
),
const SizedBox(height: 5,),
],); ],);
}), }),
); );

View File

@ -4,6 +4,7 @@ import 'package:flutter/src/widgets/placeholder.dart';
import 'package:unit2/model/profile/basic_information/citizenship.dart'; import 'package:unit2/model/profile/basic_information/citizenship.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';
class CitizenShipScreen extends StatefulWidget { class CitizenShipScreen extends StatefulWidget {
final List<Citizenship> citizenships; final List<Citizenship> citizenships;
@ -18,7 +19,7 @@ class _CitizenShipScreenState extends State<CitizenShipScreen> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppBar(
title: const Text("Citizenship"),centerTitle: true, title: const Text(citizenshipScreenTitle),centerTitle: true,
backgroundColor: primary, backgroundColor: primary,
), ),
body: widget.citizenships.isEmpty? body: widget.citizenships.isEmpty?

View File

@ -1,36 +1,39 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:unit2/model/profile/basic_information/contact_information.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/theme-data.dart/colors.dart';
import 'package:unit2/utils/text_container.dart';
class ContactInformation extends StatefulWidget { class ContactInformationScreen extends StatefulWidget {
final List<ContactInfo> contacts; final List<ContactInfo> contacts;
const ContactInformation({super.key, required this.contacts}); const ContactInformationScreen({super.key, required this.contacts});
@override @override
State<ContactInformation> createState() => _ContactInformationState(); State<ContactInformationScreen> createState() => _ContactInformationScreenState();
} }
class _ContactInformationState extends State<ContactInformation> { class _ContactInformationScreenState extends State<ContactInformationScreen> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return SafeArea( return SafeArea(
child: Scaffold( child: Scaffold(
appBar: AppBar( appBar: AppBar(
title: const Text("Contact Information"), title: const Text(contactScreenTitle),
centerTitle: true, centerTitle: true,
backgroundColor: primary, backgroundColor: primary,
), ),
body: ListView.builder( body: ListView.builder(
padding: const EdgeInsets.symmetric(vertical: 8,horizontal: 10),
itemCount: widget.contacts.length, itemCount: widget.contacts.length,
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
String numberMail = widget.contacts[index].numbermail!;
String commService = widget.contacts[index].commService!.serviceProvider!.alias!;
return Column( return Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Container( Container(
decoration: BoxDecoration( decoration: box1(),
color: Colors.grey[200],
borderRadius: const BorderRadius.all(Radius.circular(12))),
padding: const EdgeInsets.symmetric(horizontal: 12,vertical: 8), padding: const EdgeInsets.symmetric(horizontal: 12,vertical: 8),
child: Row( child: Row(
children: [ children: [
@ -39,16 +42,18 @@ class _ContactInformationState extends State<ContactInformation> {
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ 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,), const SizedBox(height: 5,),
Row( Row(
children: [ children: [
Text(widget.contacts[index].commService! Expanded(
.serviceProvider!.alias child: Text(commService
.toString()), .toString(),style: Theme.of(context).textTheme.titleSmall,),
const SizedBox(width: 15,), ),
widget.contacts[index].active==true? const Badge(backgroundColor: Colors.green, label: Text("Active",),):const SizedBox(), 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() widget.contacts[index].primary==true? const Badge(backgroundColor: Colors.blue, label: Text("Primary"),):const SizedBox()
], ],
), ),
@ -59,7 +64,7 @@ class _ContactInformationState extends State<ContactInformation> {
]), ]),
), ),
IconButton(onPressed: (){}, icon: const Icon(Icons.more_vert)) IconButton(onPressed: (){}, icon: const Icon(Icons.more_vert,color: Colors.grey,))
], ],
), ),
), ),

View File

@ -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<Identification> identities;
const IdentificationInformations({super.key, required this.identities});
@override
State<IdentificationInformations> createState() => _IdentificationInformationsState();
}
class _IdentificationInformationsState extends State<IdentificationInformations> {
@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,),
],
);
}),
);
}
}

View File

@ -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<Identification> identities;
const IdentificationsScreen({super.key, required this.identities});
@override
State<IdentificationsScreen> createState() =>
_IdentificationsScreenState();
}
class _IdentificationsScreenState
extends State<IdentificationsScreen> {
@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,
),
],
);
}),
);
}
}

View File

@ -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<PrimaryInfo> createState() => _PrimaryInfoState();
}
class _PrimaryInfoState extends State<PrimaryInfo> {
@override
Widget build(BuildContext context) {
final _formKey = GlobalKey<FormBuilderState>();
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", ""),
),),
]),),
],
)),
)),
);
}
}

View File

@ -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<PrimaryInfo> createState() => _PrimaryInfoState();
}
class _PrimaryInfoState extends State<PrimaryInfo> {
@override
Widget build(BuildContext context) {
final _formKey = GlobalKey<FormBuilderState>();
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", ""),
),),
]),),
],
)),
));
}
}

View File

@ -1,8 +1,9 @@
import 'package:flutter/material.dart'; 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/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/theme-data.dart/colors.dart';
import 'package:unit2/utils/text_container.dart';
class EducationScreen extends StatefulWidget { class EducationScreen extends StatefulWidget {
final List<EducationalBackground> educationBackgrounds; final List<EducationalBackground> educationBackgrounds;
@ -17,52 +18,109 @@ class _EducationScreenState extends State<EducationScreen> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppBar(
title: const Text("Educational Background"), title: const Text(educationScreenTitle),
centerTitle: true, centerTitle: true,
backgroundColor: primary, backgroundColor: primary,
), ),
body: ListView.builder( body: ListView.builder(
padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 10),
itemCount: widget.educationBackgrounds.length, itemCount: widget.educationBackgrounds.length,
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
String level = widget.educationBackgrounds[index].education!.level!; String level = widget.educationBackgrounds[index].education!.level!;
String periodFrom = widget.educationBackgrounds[index].periodFrom!; String periodFrom = widget.educationBackgrounds[index].periodFrom!;
String periodTo = widget.educationBackgrounds[index].periodTo!; String periodTo = widget.educationBackgrounds[index].periodTo!;
String? program = widget.educationBackgrounds[index].education!.course == null? null: widget.educationBackgrounds[index].education!.course!.program!; String? program =
List<Honor>? honors = widget.educationBackgrounds[index].honors!.toList(); widget.educationBackgrounds[index].education!.course == null
String school = widget.educationBackgrounds[index].education!.school!.name!; ? null
: widget.educationBackgrounds[index].education!.course!
.program!;
List<Honor>? honors =
widget.educationBackgrounds[index].honors!.toList();
String school =
widget.educationBackgrounds[index].education!.school!.name!;
return Column( return Column(
children: [ children: [
Container( Container(
decoration: BoxDecoration( decoration: box1(),
color: Colors.grey[200],
borderRadius:
const BorderRadius.all(Radius.circular(12))),
padding: padding:
const EdgeInsets.symmetric(horizontal: 12, vertical: 8), const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
child: Row( child: Row(
children: [ children: [
Expanded( Expanded(
child: Column(children: [ child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row( Row(
children: [ children: [
Text(level), Expanded(
Text("$periodFrom $periodTo"), child: Text(
level,
style: Theme.of(context)
.textTheme
.titleMedium!
.copyWith(fontWeight: FontWeight.w500),
)),
Text(
"$periodFrom - $periodTo",
style:
Theme.of(context).textTheme.bodyMedium,
),
], ],
), ),
Text(program??=''),
Text(school), const SizedBox(height: 5,),
Text(
school,
style: Theme.of(context).textTheme.titleSmall,
),
Container( Container(
child: honors.isNotEmpty? Column( padding: const EdgeInsets.only(top: 8),
children: honors.map((Honor honor) => Text(honor.name!)).toList(), child: honors.isNotEmpty
):const SizedBox() ? 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( IconButton(
onPressed: () {}, icon: const Icon(Icons.more_vert)) onPressed: () {},
icon: const Icon(
Icons.more_vert,
color: Colors.grey,
))
], ],
), ),
) ),
const SizedBox(
height: 5,
),
], ],
); );
}), }),

View File

@ -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<EligibityCert> eligibilities;
const EligibiltyScreen({super.key, required this.eligibilities});
@override
State<EligibiltyScreen> createState() => _EligibiltyScreenState();
}
class _EligibiltyScreenState extends State<EligibiltyScreen> {
@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))
],
),
)
],
);
}),
);
}
}

View File

@ -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<EligibityCert> eligibilities;
const EligibiltyScreen({super.key, required this.eligibilities});
@override
State<EligibiltyScreen> createState() => _EligibiltyScreenState();
}
class _EligibiltyScreenState extends State<EligibiltyScreen> {
@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,))
],
),
)
],
);
}),
);
}
}

View File

@ -1,11 +1,9 @@
import 'dart:math';
import 'package:flutter/material.dart'; 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/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/theme-data.dart/colors.dart';
import 'package:unit2/utils/global.dart'; import 'package:unit2/utils/global.dart';
import 'package:unit2/utils/text_container.dart';
class FamilyBackgroundScreen extends StatefulWidget { class FamilyBackgroundScreen extends StatefulWidget {
final List<FamilyBackground> familyBackground; final List<FamilyBackground> familyBackground;
@ -23,30 +21,40 @@ class _FamilyBackgroundScreenState extends State<FamilyBackgroundScreen> {
List<FamilyBackground> otherRelated = []; List<FamilyBackground> otherRelated = [];
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
father = widget.familyBackground.firstWhere((element) => element.relationship!.id==1); father = widget.familyBackground
mother = widget.familyBackground.firstWhere((element) => element.relationship!.id==2); .firstWhere((element) => element.relationship!.id == 1);
spouse = widget.familyBackground.firstWhere((element) => element.relationship!.id==3); mother = widget.familyBackground
var childs = widget.familyBackground.where((element) => element.relationship!.id==4); .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) { if (childs.isNotEmpty) {
for (var element in childs) { for (var element in childs) {
children.add(element); children.add(element);
} }
} }
var relateds = widget.familyBackground.where((element) => element.relationship!.id! < 4);
//get all related persons
var relateds = widget.familyBackground
.where((element) => element.relationship!.id! > 4);
if (relateds.isNotEmpty) { if (relateds.isNotEmpty) {
for (var element in childs) { for (var element in relateds) {
otherRelated.add(element); otherRelated.add(element);
} }
} }
return Scaffold( return Scaffold(
appBar: AppBar(title: const Text("Addresses"), centerTitle: true, backgroundColor: primary,), appBar: AppBar(
body: Column( title: const Text(familyBackgroundScreenTitle),
children: [ centerTitle: true,
//Father backgroundColor: primary,
),
body: ListView(children: [
//Father----------------------------------------------
Container( Container(
decoration: BoxDecoration( decoration: box1(),
color: Colors.grey[200],
borderRadius: const BorderRadius.all(Radius.circular(12))),
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8), padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
width: screenWidth, width: screenWidth,
child: Row( child: Row(
@ -56,82 +64,35 @@ class _FamilyBackgroundScreenState extends State<FamilyBackgroundScreen> {
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
const Text("Father"), const Text(fatherText),
Text("${father!.relatedPerson!.firstName} ${father!.relatedPerson!.middleName} ${father!.relatedPerson!.lastName} ${father!.relatedPerson!.nameExtension??''}"), const SizedBox(height: 5,),
const Text("Full Name"), Text(
Row(children: [ " ${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) {}), Checkbox(value: false, onChanged: (value) {}),
const Text("Incase of emergency") const Text(incaseOfEmergency)
],) ],
)
]), ]),
), ),
IconButton(onPressed: (){}, icon: const Icon(Icons.more_vert)) IconButton(
onPressed: () {},
icon: const Icon(
Icons.more_vert,
color: Colors.grey,
))
], ],
),),
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(
], height: 5,
),):const SizedBox(), ),
const SizedBox(height: 5,),
// Childrens //Mother-----------------------------------------------------
children.isNotEmpty?Expanded( Container(
child: ListView( decoration: box1(),
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), padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
width: screenWidth, width: screenWidth,
child: Row( child: Row(
@ -141,48 +102,193 @@ class _FamilyBackgroundScreenState extends State<FamilyBackgroundScreen> {
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
const Text("Children"), const Text(motherText),
Text("${child.relatedPerson!.firstName} ${child.relatedPerson!.middleName} ${child.relatedPerson!.lastName} ${child.relatedPerson!.nameExtension??''}"), const SizedBox(height: 5,),
const Text("Full Name"), Text(
Row(children: [ " ${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) {}), Checkbox(value: false, onChanged: (value) {}),
const Text("Incase of emergency") const Text(incaseOfEmergency)
],) ],
)
]), ]),
), ),
IconButton(onPressed: (){}, icon: const Icon(Icons.more_vert)) IconButton(
onPressed: () {},
icon: const Icon(
Icons.more_vert,
color: Colors.grey,
))
], ],
),),).toList()), ),
):const SizedBox(), ),
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( // Childrens ----------------------------------
child: ListView( children.isNotEmpty
children: otherRelated.map((relative) => Container( ? Container(
decoration: BoxDecoration( decoration: box1(),
color: Colors.grey[200], child: Column(
borderRadius: const BorderRadius.all(Radius.circular(12))), mainAxisAlignment: MainAxisAlignment.start,
padding: const EdgeInsets.symmetric(horizontal: 12,vertical: 8), crossAxisAlignment: CrossAxisAlignment.start,
children: children
.map(
(child){
int index = children.indexOf(child);
return Container(
padding: const EdgeInsets.symmetric(
horizontal: 12, vertical: 8),
width: screenWidth, width: screenWidth,
child: Row(
children: [
Expanded(
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
const Text("Other related Person(s)"), index == 0? const Text(childrenText):const SizedBox(),
Text("${relative.relatedPerson!.firstName} ${relative!.relatedPerson!.middleName} ${relative!.relatedPerson!.lastName} ${relative!.relatedPerson!.nameExtension??''}"), const SizedBox(
const Text("Full Name"), height: 5,
Row(children: [ ),
Checkbox(value: false, onChanged: (value){}), Row(
const Text("Incase of emergency") 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)) IconButton(
onPressed: () {},
icon: const Icon(Icons.more_vert,color: Colors.grey,))
], ],
),),).toList()), ),
):const SizedBox() ],
),
);
}
)
.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(),
]), ]),
); );
} }

View File

@ -3,8 +3,10 @@ import 'package:flutter/src/widgets/framework.dart';
import 'package:flutter/src/widgets/placeholder.dart'; import 'package:flutter/src/widgets/placeholder.dart';
import 'package:intl/intl.dart'; import 'package:intl/intl.dart';
import 'package:unit2/model/profile/learning_development.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/theme-data.dart/colors.dart';
import 'package:unit2/utils/global.dart'; import 'package:unit2/utils/global.dart';
import 'package:unit2/utils/text_container.dart';
class LearningAndDevelopmentScreen extends StatefulWidget { class LearningAndDevelopmentScreen extends StatefulWidget {
final List<LearningDevelopement> learningDevelopments; final List<LearningDevelopement> learningDevelopments;
@ -19,23 +21,24 @@ class _LearningAndDevelopmentScreenState extends State<LearningAndDevelopmentScr
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
appBar: AppBar(title: const Text("Learning and Development"), appBar: AppBar(title: const Text(learningAndDevelopmentScreenTitle),
centerTitle: true, centerTitle: true,
backgroundColor: primary, backgroundColor: primary,
), ),
body: ListView.builder( body: ListView.builder(
padding: const EdgeInsets.symmetric(vertical: 8,horizontal: 10),
itemCount: widget.learningDevelopments.length, itemCount: widget.learningDevelopments.length,
itemBuilder: (BuildContext context, int index){ itemBuilder: (BuildContext context, int index){
String training = widget.learningDevelopments[index].conductedTraining!.title!.title!;
String provider = widget.learningDevelopments[index].conductedTraining!.conductedBy!.name!;
String start = dteFormat2.format(widget.learningDevelopments[index].conductedTraining!.fromDate!); String start = dteFormat2.format(widget.learningDevelopments[index].conductedTraining!.fromDate!);
String end = dteFormat2.format(widget.learningDevelopments[index].conductedTraining!.toDate!); String end = dteFormat2.format(widget.learningDevelopments[index].conductedTraining!.toDate!);
String type = widget.learningDevelopments[index].conductedTraining!.learningDevelopmentType!.title!; String type = widget.learningDevelopments[index].conductedTraining!.learningDevelopmentType!.title!;
return Column( return Column(
children: [ children: [
Container( Container(
decoration: BoxDecoration( decoration: box1(),
color: Colors.grey[200],
borderRadius: const BorderRadius.all(Radius.circular(12))),
padding: const EdgeInsets.symmetric(horizontal: 12,vertical: 8), padding: const EdgeInsets.symmetric(horizontal: 12,vertical: 8),
width: screenWidth, width: screenWidth,
child: Row( child: Row(
@ -45,13 +48,14 @@ class _LearningAndDevelopmentScreenState extends State<LearningAndDevelopmentScr
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text(widget.learningDevelopments[index].conductedTraining!.title!.title!), Text(training,style: Theme.of(context).textTheme.titleMedium!.copyWith(fontWeight: FontWeight.w500),),
const Divider(),
const SizedBox(height: 5,), const SizedBox(height: 5,),
Text(widget.learningDevelopments[index].conductedTraining!.conductedBy!.name!), Text(provider,style: Theme.of(context).textTheme.titleSmall,),
const SizedBox(height: 5,), const SizedBox(height: 5,),
Text("$start TO $end"), Text("$duration : $start TO $end",style: Theme.of(context).textTheme.labelMedium,),
const SizedBox(height: 5,), const SizedBox(height: 5,),
Text("TYPE : $type"), Text("$type : $type",style: Theme.of(context).textTheme.labelMedium,),
]), ]),
), ),
IconButton(onPressed: (){}, icon: const Icon(Icons.more_vert)), IconButton(onPressed: (){}, icon: const Icon(Icons.more_vert)),

View File

@ -25,7 +25,7 @@ class LoadingScreen extends StatelessWidget {
child: ListView( child: ListView(
children: [ children: [
const Text( const Text(
"View and Update your Profile Information"), "View and Update your Profile Information",textAlign: TextAlign.center,),
ExpandableGroup( ExpandableGroup(
collapsedIcon: collapsedIcon:
const Icon(Icons.keyboard_arrow_down), const Icon(Icons.keyboard_arrow_down),

View File

@ -2,8 +2,10 @@ import 'package:flutter/material.dart';
import 'package:flutter/src/widgets/framework.dart'; import 'package:flutter/src/widgets/framework.dart';
import 'package:flutter/src/widgets/placeholder.dart'; import 'package:flutter/src/widgets/placeholder.dart';
import 'package:unit2/model/profile/other_information/non_acedimic_recognition.dart'; import 'package:unit2/model/profile/other_information/non_acedimic_recognition.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/global.dart'; import 'package:unit2/utils/global.dart';
import 'package:unit2/utils/text_container.dart';
class NonAcademicRecognitionScreen extends StatefulWidget { class NonAcademicRecognitionScreen extends StatefulWidget {
final List<NonAcademicRecognition> nonAcademicRecognitions; final List<NonAcademicRecognition> nonAcademicRecognitions;
@ -17,8 +19,9 @@ class _NonAcademicRecognitionScreenState extends State<NonAcademicRecognitionScr
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
appBar: AppBar(title: const Text("Non Academic Recognition"), centerTitle: true, backgroundColor: primary,), appBar: AppBar(title: const Text(nonAcademicRecTitle), centerTitle: true, backgroundColor: primary,),
body: ListView.builder( body: ListView.builder(
padding: const EdgeInsets.symmetric(vertical: 8,horizontal: 10),
itemCount: widget.nonAcademicRecognitions.length, itemCount: widget.nonAcademicRecognitions.length,
itemBuilder: (BuildContext context, int index){ itemBuilder: (BuildContext context, int index){
String award = widget.nonAcademicRecognitions[index].title!; String award = widget.nonAcademicRecognitions[index].title!;
@ -27,9 +30,7 @@ class _NonAcademicRecognitionScreenState extends State<NonAcademicRecognitionScr
children: [ children: [
Container( Container(
width: screenWidth, width: screenWidth,
decoration: BoxDecoration( decoration: box1(),
color: Colors.grey[200],
borderRadius: const BorderRadius.all(Radius.circular(12))),
padding: const EdgeInsets.symmetric(horizontal: 12,vertical: 8), padding: const EdgeInsets.symmetric(horizontal: 12,vertical: 8),
child: Row( child: Row(
children: [ children: [
@ -37,11 +38,12 @@ class _NonAcademicRecognitionScreenState extends State<NonAcademicRecognitionScr
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text(award), Text(award,style: Theme.of(context).textTheme.titleMedium!.copyWith(fontWeight: FontWeight.w500),),
const Divider(),
Text(presenter), Text(presenter),
],)), ],)),
IconButton(onPressed: (){}, icon: const Icon(Icons.more_vert)) IconButton(onPressed: (){}, icon: const Icon(Icons.more_vert,color: Colors.grey,))
], ],
), ),
), ),

View File

@ -2,7 +2,9 @@ import 'package:flutter/material.dart';
import 'package:flutter/src/widgets/framework.dart'; import 'package:flutter/src/widgets/framework.dart';
import 'package:flutter/src/widgets/placeholder.dart'; import 'package:flutter/src/widgets/placeholder.dart';
import 'package:unit2/model/profile/other_information/organization_memberships.dart'; import 'package:unit2/model/profile/other_information/organization_memberships.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 '../../../../utils/global.dart'; import '../../../../utils/global.dart';
@ -19,26 +21,24 @@ class _OrgMembershipsScreenState extends State<OrgMembershipsScreen> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppBar(
title: const Text("Organization Memberships"), title: const Text(orgMembershipTitle),
backgroundColor: primary, backgroundColor: primary,
centerTitle: true, centerTitle: true,
), ),
body: ListView.builder( body: ListView.builder(
itemCount: widget.orgMemberships.length, itemCount: widget.orgMemberships.length,
padding: const EdgeInsets.symmetric(vertical: 8,horizontal: 10),
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
String entity = String entity =
widget.orgMemberships[index].agency!.privateEntity == false widget.orgMemberships[index].agency!.privateEntity == false
? "Government" ? governmentText.toUpperCase()
: "Private"; : privateText.toUpperCase();
String agencyName = widget.orgMemberships[index].agency!.name!; String agencyName = widget.orgMemberships[index].agency!.name!;
return Column( return Column(
children: [ children: [
Container( Container(
width: screenWidth, width: screenWidth,
decoration: BoxDecoration( decoration: box1(),
color: Colors.grey[200],
borderRadius:
const BorderRadius.all(Radius.circular(12))),
padding: padding:
const EdgeInsets.symmetric(horizontal: 12, vertical: 8), const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
child: Row(children: [ child: Row(children: [
@ -47,14 +47,17 @@ class _OrgMembershipsScreenState extends State<OrgMembershipsScreen> {
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ 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( IconButton(
onPressed: () {}, icon: const Icon(Icons.more_vert)) onPressed: () {}, icon: const Icon(Icons.more_vert,color: Colors.grey,))
]), ]),
) ),
const SizedBox(height: 5,),
], ],
); );
}), }),

View File

@ -3,6 +3,8 @@ import 'package:flutter/src/widgets/framework.dart';
import 'package:flutter/src/widgets/placeholder.dart'; import 'package:flutter/src/widgets/placeholder.dart';
import 'package:unit2/model/profile/other_information/skills_and_hobbies.dart'; 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/text_container.dart';
class SkillHobbiesScreen extends StatefulWidget { class SkillHobbiesScreen extends StatefulWidget {
final List<SkillsHobbies>skillsHobbies; final List<SkillsHobbies>skillsHobbies;
@ -16,21 +18,23 @@ class _SkillHobbiesScreenState extends State<SkillHobbiesScreen> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
appBar: AppBar(title: const Text("Skills and Hobbies"), appBar: AppBar(title: const Text(skillAndHobbiesTitle),
backgroundColor: primary, backgroundColor: primary,
centerTitle: true, centerTitle: true,
), ),
body: Wrap( body: Padding(
spacing: 5, padding: const EdgeInsets.all(16),
runSpacing: 5, child: Wrap(
spacing: 8,
runSpacing: 8,
alignment: WrapAlignment.start,
clipBehavior: Clip.none, clipBehavior: Clip.none,
verticalDirection: VerticalDirection.down, verticalDirection: VerticalDirection.up,
crossAxisAlignment: WrapCrossAlignment.start,
direction: Axis.horizontal,
children:widget.skillsHobbies.map((SkillsHobbies sh){ children:widget.skillsHobbies.map((SkillsHobbies sh){
return Badge( return FittedBox(
padding: const EdgeInsets.all(8),
alignment: AlignmentDirectional.topStart,
backgroundColor: Colors.grey.shade300,
child: Row( child: Row(
children: [ children: [
Text(sh.name!), Text(sh.name!),
@ -39,11 +43,11 @@ class _SkillHobbiesScreenState extends State<SkillHobbiesScreen> {
icon: const Icon(Icons.close)), icon: const Icon(Icons.close)),
], ],
), ),
); );
}).toList() }).toList()
), ),
),
); );
} }
} }

View File

@ -2,7 +2,9 @@ import 'package:flutter/material.dart';
import 'package:flutter/src/widgets/framework.dart'; import 'package:flutter/src/widgets/framework.dart';
import 'package:flutter/src/widgets/placeholder.dart'; import 'package:flutter/src/widgets/placeholder.dart';
import 'package:unit2/model/profile/references.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/theme-data.dart/colors.dart';
import 'package:unit2/utils/text_container.dart';
class ReferencesScreen extends StatefulWidget { class ReferencesScreen extends StatefulWidget {
final List<PersonalReference> references; final List<PersonalReference> references;
@ -17,19 +19,18 @@ class _ReferencesScreenState extends State<ReferencesScreen> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( 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( body: ListView.builder(
padding: const EdgeInsets.symmetric(vertical: 8,horizontal: 10),
itemCount: widget.references.length, itemCount: widget.references.length,
itemBuilder: (BuildContext context, int index){ itemBuilder: (BuildContext context, int index){
String fullname = "${widget.references[0].firstName} ${widget.references[0].middleName} ${widget.references[0].lastName}"; String fullname = "${widget.references[index].firstName} ${widget.references[index].middleName} ${widget.references[index].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 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[0].contactNo.toString(); String mobile = widget.references[index].contactNo.toString();
return Column(children: [ return Column(children: [
Container( Container(
padding: const EdgeInsets.symmetric(horizontal: 12,vertical: 8), padding: const EdgeInsets.symmetric(horizontal: 12,vertical: 8),
decoration: BoxDecoration( decoration:box1(),
color: Colors.grey[200],
borderRadius: const BorderRadius.all(Radius.circular(12))),
child: Row( child: Row(
children: [ children: [
Expanded( Expanded(
@ -38,18 +39,19 @@ class _ReferencesScreenState extends State<ReferencesScreen> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ 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,), 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,), 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,),
],); ],);
}) , }) ,
); );

View File

@ -1,9 +1,9 @@
import 'package:flutter/material.dart'; 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:intl/intl.dart';
import 'package:unit2/model/profile/voluntary_works.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/theme-data.dart/colors.dart';
import 'package:unit2/utils/text_container.dart';
class VolunataryWorkScreen extends StatefulWidget { class VolunataryWorkScreen extends StatefulWidget {
final List<VoluntaryWork> voluntaryWorks; final List<VoluntaryWork> voluntaryWorks;
@ -18,9 +18,10 @@ class _VolunataryWorkScreenState extends State<VolunataryWorkScreen> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
appBar: AppBar(title: const Text("Volunatary Work & Civic Services"),backgroundColor: primary,), appBar: AppBar(title: const Text(voluntaryScreenTitle),backgroundColor: primary,),
body: ListView.builder( body: ListView.builder(
itemCount:widget.voluntaryWorks.length , itemCount:widget.voluntaryWorks.length ,
padding: const EdgeInsets.symmetric(vertical: 8,horizontal: 10),
itemBuilder: (BuildContext context, int index){ itemBuilder: (BuildContext context, int index){
String position = widget.voluntaryWorks[index].position!.title!; String position = widget.voluntaryWorks[index].position!.title!;
String agency = widget.voluntaryWorks[index].agency!.name!; String agency = widget.voluntaryWorks[index].agency!.name!;
@ -30,9 +31,7 @@ class _VolunataryWorkScreenState extends State<VolunataryWorkScreen> {
return Column( return Column(
children: [ children: [
Container( Container(
decoration: BoxDecoration( decoration:box1(),
color: Colors.grey[200],
borderRadius: const BorderRadius.all(Radius.circular(12))),
padding: const EdgeInsets.symmetric(horizontal: 12,vertical: 8), padding: const EdgeInsets.symmetric(horizontal: 12,vertical: 8),
child: Row( child: Row(
children: [ children: [
@ -41,10 +40,14 @@ class _VolunataryWorkScreenState extends State<VolunataryWorkScreen> {
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text(position), Text(position,style: Theme.of(context).textTheme.titleMedium!.copyWith(fontWeight: FontWeight.w500),),
Text(agency), const SizedBox(height: 5,),
Text("$from to $to"), Text(agency,style: Theme.of(context).textTheme.titleSmall,),
Text("Worked/Involved for: $hours hours"), 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)) IconButton(onPressed: (){}, icon: const Icon(Icons.more_vert))

View File

@ -1,9 +1,9 @@
import 'package:flutter/material.dart'; 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:intl/intl.dart';
import 'package:unit2/model/profile/work_history.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/theme-data.dart/colors.dart';
import 'package:unit2/utils/text_container.dart';
import '../../../utils/global.dart'; import '../../../utils/global.dart';
@ -20,37 +20,49 @@ class _WorkHistoryScreenState extends State<WorkHistoryScreen> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( 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( body: ListView.builder(
padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 10),
itemCount: widget.workExperiences.length, itemCount: widget.workExperiences.length,
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
String position = widget.workExperiences[index].position!.title!; String position = widget.workExperiences[index].position!.title!;
String agency = widget.workExperiences[index].agency!.name!; String agency = widget.workExperiences[index].agency!.name!;
String from = dteFormat2.format(widget.workExperiences[index].fromDate!); String from =
String? to = widget.workExperiences[index].toDate == null? "Present" : dteFormat2.format(widget.workExperiences[index].toDate!); dteFormat2.format(widget.workExperiences[index].fromDate!);
String? to = widget.workExperiences[index].toDate == null
? present.toUpperCase()
: dteFormat2.format(widget.workExperiences[index].toDate!);
return Column( return Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Container( Container(
width: screenWidth, width: screenWidth,
decoration: BoxDecoration( decoration: box1(),
color: Colors.grey[200],
borderRadius: const BorderRadius.all(Radius.circular(12))),
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8), padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
child: Row(children: [ child: Row(children: [
Expanded(child: Column( Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text(position), Text(position,style: Theme.of(context).textTheme.titleMedium!.copyWith(fontWeight: FontWeight.w600),),
Text(agency), const Divider(),
Text("$from to $to"), const SizedBox(height: 8,),
],)), Text(agency,style: Theme.of(context).textTheme.titleSmall!.copyWith(fontWeight: FontWeight.w500),),
IconButton(onPressed: (){}, icon: const Icon(Icons.more_vert)) 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,
),
], ],
); );
}), }),

View File

@ -10,20 +10,20 @@ import 'package:fluttericon/modern_pictograms_icons.dart';
import 'package:unit2/bloc/profile/profile_bloc.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/address_screen.dart';
import 'package:unit2/screens/profile/components/basic_information/citizenship_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/contact_information_screen.dart';
import 'package:unit2/screens/profile/components/basic_information/identification_information.dart'; import 'package:unit2/screens/profile/components/basic_information/identification_information_screen.dart';
import 'package:unit2/screens/profile/components/basic_information/primary_information.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/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/family_background_screen.dart';
import 'package:unit2/screens/profile/components/learning_and_development_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/loading_screen.dart';
import 'package:unit2/screens/profile/components/other_information/non_academic_recognition.dart'; import 'package:unit2/screens/profile/components/other_information/non_academic_recognition_screen.dart';
import 'package:unit2/screens/profile/components/other_information/org_membership.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/other_information/skills_and_hobbies_screen.dart';
import 'package:unit2/screens/profile/components/references_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/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 'package:unit2/theme-data.dart/colors.dart';
import '../../bloc/user/user_bloc.dart'; import '../../bloc/user/user_bloc.dart';
import 'components/main_menu.dart'; import 'components/main_menu.dart';
@ -39,8 +39,7 @@ class ProfileInfo extends StatefulWidget {
class _ProfileInfoState extends State<ProfileInfo> { class _ProfileInfoState extends State<ProfileInfo> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return SafeArea( return Scaffold(
child: Scaffold(
appBar: AppBar( appBar: AppBar(
backgroundColor: primary, backgroundColor: primary,
centerTitle: true, centerTitle: true,
@ -71,8 +70,9 @@ class _ProfileInfoState extends State<ProfileInfo> {
vertical: 12, horizontal: 12), vertical: 12, horizontal: 12),
child: ListView( child: ListView(
children: [ children: [
const Text( Text(
"View and Update your Profile Information"), "View and Update your Profile Information",textAlign: TextAlign.center
,style: Theme.of(context).textTheme.bodyLarge,),
ExpandableGroup( ExpandableGroup(
collapsedIcon: collapsedIcon:
const Icon(Icons.keyboard_arrow_down), const Icon(Icons.keyboard_arrow_down),
@ -104,13 +104,13 @@ class _ProfileInfoState extends State<ProfileInfo> {
subMenu( subMenu(
Icons.contact_mail, "Identifications",(){ Icons.contact_mail, "Identifications",(){
Navigator.push(context, MaterialPageRoute(builder: (BuildContext context){ Navigator.push(context, MaterialPageRoute(builder: (BuildContext context){
return IdentificationInformations(identities: state.profileInformation.basicInfo.identifications); return IdentificationsScreen(identities: state.profileInformation.basicInfo.identifications);
})); }));
}), }),
subMenu( subMenu(
Icons.contact_phone, "Contact Info",(){ Icons.contact_phone, "Contact Info",(){
Navigator.push(context, MaterialPageRoute(builder: (BuildContext context){ Navigator.push(context, MaterialPageRoute(builder: (BuildContext context){
return ContactInformation(contacts: state.profileInformation.basicInfo.contactInformation,); return ContactInformationScreen(contacts: state.profileInformation.basicInfo.contactInformation,);
})); }));
}), }),
subMenu(Icons.flag, "Citizenships",(){ subMenu(Icons.flag, "Citizenships",(){
@ -260,6 +260,6 @@ class _ProfileInfoState extends State<ProfileInfo> {
} }
return Container(); return Container();
}), }),
))); ));
} }
} }

View File

@ -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)));
}

View File

@ -69,6 +69,50 @@ const String timeoutError = "Internet timeout! Please Check your connection";
const String formatError = "Invalid Error"; const String formatError = "Invalid Error";
const String httpError = "Error getting requested data"; const String httpError = "Error getting requested data";
const String onError = "Something went wrong! Please try again."; 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";
// //