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 ExamAddress? examAddress;
final DateTime? validityDate;
final DateTime? licenseNumber;
final String? licenseNumber;
factory EligibityCert.fromJson(Map<String, dynamic> json) => EligibityCert(
id: json["id"],

View File

@ -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<MainAdress> addresses;
@ -16,33 +18,41 @@ class _AddressScreenState extends State<AddressScreen> {
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: [
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),
decoration: box1(),
padding: const EdgeInsets.fromLTRB(8,16,0,16),
child: Row(children: [
Expanded(child: Column(children: [
Row(children: [Text(subdivision), const SizedBox(width: 5,), Text(category)],),
Text("$barangay $cityMunicipality $province $region"),
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))
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/theme-data.dart/colors.dart';
import 'package:unit2/utils/global.dart';
import 'package:unit2/utils/text_container.dart';
class CitizenShipScreen extends StatefulWidget {
final List<Citizenship> citizenships;
@ -18,7 +19,7 @@ class _CitizenShipScreenState extends State<CitizenShipScreen> {
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?

View File

@ -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<ContactInfo> contacts;
const ContactInformation({super.key, required this.contacts});
const ContactInformationScreen({super.key, required this.contacts});
@override
State<ContactInformation> createState() => _ContactInformationState();
State<ContactInformationScreen> createState() => _ContactInformationScreenState();
}
class _ContactInformationState extends State<ContactInformation> {
class _ContactInformationScreenState extends State<ContactInformationScreen> {
@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<ContactInformation> {
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<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/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<EducationalBackground> educationBackgrounds;
@ -17,52 +18,109 @@ class _EducationScreenState extends State<EducationScreen> {
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<Honor>? 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<Honor>? 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: [
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Text(level),
Text("$periodFrom $periodTo"),
Expanded(
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(
child: honors.isNotEmpty? Column(
children: honors.map((Honor honor) => Text(honor.name!)).toList(),
):const SizedBox()
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,
),
],
);
}),

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/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> familyBackground;
@ -23,31 +21,41 @@ class _FamilyBackgroundScreenState extends State<FamilyBackgroundScreen> {
List<FamilyBackground> 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
appBar: AppBar(
title: const Text(familyBackgroundScreenTitle),
centerTitle: true,
backgroundColor: primary,
),
body: ListView(children: [
//Father----------------------------------------------
Container(
decoration: BoxDecoration(
color: Colors.grey[200],
borderRadius: const BorderRadius.all(Radius.circular(12))),
padding: const EdgeInsets.symmetric(horizontal: 12,vertical: 8),
decoration: box1(),
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
width: screenWidth,
child: Row(
children: [
@ -56,83 +64,36 @@ class _FamilyBackgroundScreenState extends State<FamilyBackgroundScreen> {
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")
],)
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))
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(),
const SizedBox(height: 5,),
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),
//Mother-----------------------------------------------------
Container(
decoration: box1(),
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
width: screenWidth,
child: Row(
children: [
@ -141,48 +102,193 @@ class _FamilyBackgroundScreenState extends State<FamilyBackgroundScreen> {
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")
],)
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))
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(
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),
// 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: 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")
],)
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))
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: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<LearningDevelopement> learningDevelopments;
@ -19,23 +21,24 @@ class _LearningAndDevelopmentScreenState extends State<LearningAndDevelopmentScr
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text("Learning and Development"),
appBar: AppBar(title: const Text(learningAndDevelopmentScreenTitle),
centerTitle: true,
backgroundColor: primary,
),
body: ListView.builder(
padding: const EdgeInsets.symmetric(vertical: 8,horizontal: 10),
itemCount: widget.learningDevelopments.length,
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 end = dteFormat2.format(widget.learningDevelopments[index].conductedTraining!.toDate!);
String type = widget.learningDevelopments[index].conductedTraining!.learningDevelopmentType!.title!;
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),
width: screenWidth,
child: Row(
@ -45,13 +48,14 @@ class _LearningAndDevelopmentScreenState extends State<LearningAndDevelopmentScr
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
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,),
Text(widget.learningDevelopments[index].conductedTraining!.conductedBy!.name!),
Text(provider,style: Theme.of(context).textTheme.titleSmall,),
const SizedBox(height: 5,),
Text("$start TO $end"),
Text("$duration : $start TO $end",style: Theme.of(context).textTheme.labelMedium,),
const SizedBox(height: 5,),
Text("TYPE : $type"),
Text("$type : $type",style: Theme.of(context).textTheme.labelMedium,),
]),
),
IconButton(onPressed: (){}, icon: const Icon(Icons.more_vert)),

View File

@ -25,7 +25,7 @@ class LoadingScreen extends StatelessWidget {
child: ListView(
children: [
const Text(
"View and Update your Profile Information"),
"View and Update your Profile Information",textAlign: TextAlign.center,),
ExpandableGroup(
collapsedIcon:
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/placeholder.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/utils/global.dart';
import 'package:unit2/utils/text_container.dart';
class NonAcademicRecognitionScreen extends StatefulWidget {
final List<NonAcademicRecognition> nonAcademicRecognitions;
@ -17,8 +19,9 @@ class _NonAcademicRecognitionScreenState extends State<NonAcademicRecognitionScr
@override
Widget build(BuildContext context) {
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(
padding: const EdgeInsets.symmetric(vertical: 8,horizontal: 10),
itemCount: widget.nonAcademicRecognitions.length,
itemBuilder: (BuildContext context, int index){
String award = widget.nonAcademicRecognitions[index].title!;
@ -27,9 +30,7 @@ class _NonAcademicRecognitionScreenState extends State<NonAcademicRecognitionScr
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: [
@ -37,11 +38,12 @@ class _NonAcademicRecognitionScreenState extends State<NonAcademicRecognitionScr
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(award),
Text(award,style: Theme.of(context).textTheme.titleMedium!.copyWith(fontWeight: FontWeight.w500),),
const Divider(),
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/placeholder.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/utils/text_container.dart';
import '../../../../utils/global.dart';
@ -19,26 +21,24 @@ class _OrgMembershipsScreenState extends State<OrgMembershipsScreen> {
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<OrgMembershipsScreen> {
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,),
],
);
}),

View File

@ -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 List<SkillsHobbies>skillsHobbies;
@ -16,21 +18,23 @@ class _SkillHobbiesScreenState extends State<SkillHobbiesScreen> {
@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,
body: Padding(
padding: const EdgeInsets.all(16),
child: Wrap(
spacing: 8,
runSpacing: 8,
alignment: WrapAlignment.start,
clipBehavior: Clip.none,
verticalDirection: VerticalDirection.down,
verticalDirection: VerticalDirection.up,
crossAxisAlignment: WrapCrossAlignment.start,
direction: Axis.horizontal,
children:widget.skillsHobbies.map((SkillsHobbies sh){
return Badge(
padding: const EdgeInsets.all(8),
alignment: AlignmentDirectional.topStart,
backgroundColor: Colors.grey.shade300,
return FittedBox(
child: Row(
children: [
Text(sh.name!),
@ -39,11 +43,11 @@ class _SkillHobbiesScreenState extends State<SkillHobbiesScreen> {
icon: const Icon(Icons.close)),
],
),
);
}).toList()
),
),
);
}
}

View File

@ -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<PersonalReference> references;
@ -17,19 +19,18 @@ class _ReferencesScreenState extends State<ReferencesScreen> {
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<ReferencesScreen> {
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,),
],);
}) ,
);

View File

@ -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<VoluntaryWork> voluntaryWorks;
@ -18,9 +18,10 @@ class _VolunataryWorkScreenState extends State<VolunataryWorkScreen> {
@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<VolunataryWorkScreen> {
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<VolunataryWorkScreen> {
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))

View File

@ -1,15 +1,15 @@
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 List<WorkHistory>workExperiences;
const WorkHistoryScreen({super.key,required this.workExperiences});
final List<WorkHistory> workExperiences;
const WorkHistoryScreen({super.key, required this.workExperiences});
@override
State<WorkHistoryScreen> createState() => _WorkHistoryScreenState();
@ -20,37 +20,49 @@ class _WorkHistoryScreenState extends State<WorkHistoryScreen> {
@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(
padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 10),
itemCount: widget.workExperiences.length,
itemBuilder: (BuildContext context, int index){
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!);
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(
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),
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,
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,
),
],
);
}),

View File

@ -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,8 +39,7 @@ class ProfileInfo extends StatefulWidget {
class _ProfileInfoState extends State<ProfileInfo> {
@override
Widget build(BuildContext context) {
return SafeArea(
child: Scaffold(
return Scaffold(
appBar: AppBar(
backgroundColor: primary,
centerTitle: true,
@ -71,8 +70,9 @@ class _ProfileInfoState extends State<ProfileInfo> {
vertical: 12, horizontal: 12),
child: ListView(
children: [
const Text(
"View and Update your Profile Information"),
Text(
"View and Update your Profile Information",textAlign: TextAlign.center
,style: Theme.of(context).textTheme.bodyLarge,),
ExpandableGroup(
collapsedIcon:
const Icon(Icons.keyboard_arrow_down),
@ -104,13 +104,13 @@ class _ProfileInfoState extends State<ProfileInfo> {
subMenu(
Icons.contact_mail, "Identifications",(){
Navigator.push(context, MaterialPageRoute(builder: (BuildContext context){
return IdentificationInformations(identities: state.profileInformation.basicInfo.identifications);
return IdentificationsScreen(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,);
return ContactInformationScreen(contacts: state.profileInformation.basicInfo.contactInformation,);
}));
}),
subMenu(Icons.flag, "Citizenships",(){
@ -260,6 +260,6 @@ class _ProfileInfoState extends State<ProfileInfo> {
}
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 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";
//