You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
132 lines
4.8 KiB
Dart
132 lines
4.8 KiB
Dart
|
|
import 'package:easy_localization/src/public_ext.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:mohem_flutter_app/api/profile_api_client.dart';
|
|
import 'package:mohem_flutter_app/app_state/app_state.dart';
|
|
import 'package:mohem_flutter_app/classes/colors.dart';
|
|
import 'package:mohem_flutter_app/classes/utils.dart';
|
|
import 'package:mohem_flutter_app/extensions/int_extensions.dart';
|
|
import 'package:mohem_flutter_app/extensions/string_extensions.dart';
|
|
import 'package:mohem_flutter_app/extensions/widget_extensions.dart';
|
|
import 'package:mohem_flutter_app/models/get_employee_basic_details.model.dart';
|
|
import 'package:mohem_flutter_app/models/member_information_list_model.dart';
|
|
import 'package:mohem_flutter_app/ui/profile/profile.dart';
|
|
import 'package:mohem_flutter_app/widgets/button/default_button.dart';
|
|
|
|
class PesonalInfo extends StatefulWidget {
|
|
const PesonalInfo({Key? key}) : super(key: key);
|
|
|
|
@override
|
|
_PesonalInfoState createState() => _PesonalInfoState();
|
|
}
|
|
|
|
class _PesonalInfoState extends State<PesonalInfo> {
|
|
String? fullName = "";
|
|
String? maritalStatus = "";
|
|
String? birthDate = "";
|
|
String? civilIdentityNumber = "";
|
|
String? emailAddress = "";
|
|
String? employeeNo = "";
|
|
|
|
// List<GetEmployeeBasicDetailsList> getEmployeeBasicDetailsList = [];
|
|
// MemberInformationListModel? _memberInformationList;
|
|
|
|
late MemberInformationListModel memberInformationList;
|
|
|
|
List<GetEmployeeBasicDetailsList> getEmployeeBasicDetailsList = [];
|
|
|
|
|
|
@override
|
|
void initState() {
|
|
super.initState();
|
|
memberInformationList = AppState().memberInformationList!;
|
|
|
|
}
|
|
|
|
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
appBar: AppBar(
|
|
backgroundColor: MyColors.white,
|
|
leading: Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
IconButton(
|
|
icon: const Icon(
|
|
Icons.arrow_back_ios,
|
|
color: MyColors.backgroundBlackColor,
|
|
),
|
|
onPressed: () => Navigator.pop(context),
|
|
),
|
|
"Personal Information".toText24(isBold: true, color: MyColors.blackColor),
|
|
],
|
|
),
|
|
),
|
|
backgroundColor: MyColors.backgroundColor,
|
|
bottomSheet:footer(),
|
|
body: Column(
|
|
children: [
|
|
Container(
|
|
width: double.infinity,
|
|
margin: EdgeInsets.only(top: 28, left: 26, right: 26,),
|
|
padding: EdgeInsets.only(left: 14, right: 14,top: 13, bottom: 20),
|
|
height: 350,
|
|
decoration: BoxDecoration(
|
|
boxShadow: [
|
|
BoxShadow(
|
|
color: Colors.grey.withOpacity(0.5),
|
|
spreadRadius: 5,
|
|
blurRadius: 26,
|
|
offset: Offset(0, 3),
|
|
),
|
|
],
|
|
color: Colors.white,
|
|
borderRadius: BorderRadius.circular(10.0),
|
|
),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
"Category".toText13(color: MyColors.lightGrayColor),
|
|
"${memberInformationList!.eMPLOYMENTCATEGORYMEANING}".toText16(isBold: true, color: MyColors.blackColor),
|
|
SizedBox(
|
|
height: 20,),
|
|
"Address".toText13(color: MyColors.lightGrayColor),
|
|
"${memberInformationList!.lOCATIONNAME}".toText16(isBold: true, color: MyColors.blackColor),
|
|
SizedBox(
|
|
height: 20,),
|
|
"Phone Number".toText13(color: MyColors.lightGrayColor),
|
|
"${memberInformationList!.eMPLOYEEMOBILENUMBER}".toText16(isBold: true, color: MyColors.blackColor),
|
|
SizedBox(
|
|
height: 20,),
|
|
"Business Group".toText13(color: MyColors.lightGrayColor),
|
|
"${memberInformationList!.bUSINESSGROUPNAME}".toText16(isBold: true, color: MyColors.blackColor),
|
|
SizedBox(
|
|
height: 20,),
|
|
"Payroll".toText13(color: MyColors.lightGrayColor),
|
|
"${memberInformationList!.pAYROLLNAME}".toText16(isBold: true, color: MyColors.blackColor),
|
|
]
|
|
),
|
|
),
|
|
],
|
|
)
|
|
|
|
);
|
|
}
|
|
|
|
footer(){
|
|
return Container(
|
|
decoration: BoxDecoration(
|
|
// borderRadius: BorderRadius.circular(10),
|
|
color: MyColors.white,
|
|
boxShadow: [
|
|
BoxShadow(color: MyColors.lightGreyEFColor, spreadRadius: 3),
|
|
],
|
|
),
|
|
child: DefaultButton("Update", () async {
|
|
// context.setLocale(const Locale("en", "US")); // to change Loacle
|
|
Profile();
|
|
}).insideContainer,
|
|
);
|
|
}
|
|
}
|