|
|
|
@ -1,40 +1,47 @@
|
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:mohem_flutter_app/config/routes.dart';
|
|
|
|
|
import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
|
|
|
|
|
import 'package:mohem_flutter_app/models/member_information_list_model.dart';
|
|
|
|
|
import 'package:easy_localization/easy_localization.dart';
|
|
|
|
|
import 'package:mohem_flutter_app/models/profile_menu.model.dart';
|
|
|
|
|
|
|
|
|
|
class ProfileInFo extends StatelessWidget {
|
|
|
|
|
ProfileInFo(this.memberInfo);
|
|
|
|
|
MemberInformationListModel memberInfo;
|
|
|
|
|
String data = '.';
|
|
|
|
|
double sliderValue = 75;
|
|
|
|
|
List<ProfileMenu> menu = [
|
|
|
|
|
ProfileMenu(name: 'Personal information', icon: ''),
|
|
|
|
|
ProfileMenu(name: 'Basic Details', icon: ''),
|
|
|
|
|
ProfileMenu(name: 'Family Details', icon: ''),
|
|
|
|
|
ProfileMenu(name: LocaleKeys.profile_personalInformation.tr(), icon: Icons.info, route: AppRoutes.personalInfo),
|
|
|
|
|
ProfileMenu(name: LocaleKeys.profile_basicDetails.tr(), icon: Icons.contacts, route: AppRoutes.basicDetails),
|
|
|
|
|
ProfileMenu(name: LocaleKeys.profile_familyDetails.tr(), icon: Icons.reduce_capacity_sharp, route: AppRoutes.familyMembers),
|
|
|
|
|
];
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
return Container(
|
|
|
|
|
child: Column(crossAxisAlignment: CrossAxisAlignment.center, children: [
|
|
|
|
|
/// card header
|
|
|
|
|
customLabel('Sultan khan', 22, Colors.black, true),
|
|
|
|
|
customLabel(memberInfo.eMPLOYEENAME.toString(), 22, Colors.black, true),
|
|
|
|
|
|
|
|
|
|
customLabel('217869 | Software Developer', 14, Colors.grey, false),
|
|
|
|
|
customLabel(memberInfo.eMPLOYEENUMBER.toString() + ' | ' + memberInfo.jOBNAME.toString(), 14, Colors.grey, false),
|
|
|
|
|
|
|
|
|
|
customLabel('sultan.khan@cloudsolutions.com.sa', 13, Colors.black, true),
|
|
|
|
|
customLabel(memberInfo.eMPLOYEEEMAILADDRESS.toString(), 13, Colors.black, true),
|
|
|
|
|
|
|
|
|
|
Divider(height: 40, thickness: 8, color: const Color(0xffefefef)),
|
|
|
|
|
|
|
|
|
|
customLabel('We appreciates you for completing the service of', 10, Colors.black, true),
|
|
|
|
|
customLabel(LocaleKeys.completingYear.tr(), 10, Colors.black, true),
|
|
|
|
|
|
|
|
|
|
SizedBox(height: 10),
|
|
|
|
|
Container(
|
|
|
|
|
child: Row(mainAxisAlignment: MainAxisAlignment.spaceAround, crossAxisAlignment: CrossAxisAlignment.center, children: [
|
|
|
|
|
Column(
|
|
|
|
|
children: [customLabel('Years', 14, const Color(0xff808080), true), customLabel('03', 22, Color(0xff2BB8A6), true)],
|
|
|
|
|
children: [customLabel(LocaleKeys.year.tr(), 14, const Color(0xff808080), true), customLabel(memberInfo.sERVICEYEARS.toString().padLeft(2, '0'), 22, Color(0xff2BB8A6), true)],
|
|
|
|
|
),
|
|
|
|
|
Column(
|
|
|
|
|
children: [customLabel('Month', 14, const Color(0xff808080), true), customLabel('06', 22, Color(0xff2BB8A6), true)],
|
|
|
|
|
children: [customLabel(LocaleKeys.month.tr(), 14, const Color(0xff808080), true), customLabel(memberInfo.sERVICEMONTHS.toString().padLeft(2, '0'), 22, Color(0xff2BB8A6), true)],
|
|
|
|
|
),
|
|
|
|
|
Column(
|
|
|
|
|
children: [customLabel('Day', 14, const Color(0xff808080), true), customLabel('20', 22, Color(0xff2BB8A6), true)],
|
|
|
|
|
children: [customLabel(LocaleKeys.day.tr(), 14, const Color(0xff808080), true), customLabel(memberInfo.sERVICEDAYS.toString().padLeft(2, '0'), 22, Color(0xff2BB8A6), true)],
|
|
|
|
|
)
|
|
|
|
|
])),
|
|
|
|
|
|
|
|
|
@ -48,7 +55,7 @@ class ProfileInFo extends StatelessWidget {
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
customLabel('Profile Completion 75%', 18, Colors.black, true),
|
|
|
|
|
customLabel(LocaleKeys.profile_profileCompletionPer.tr() + ' 75%', 18, Colors.black, true),
|
|
|
|
|
const SizedBox(height: 10),
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
@ -58,7 +65,7 @@ class ProfileInFo extends StatelessWidget {
|
|
|
|
|
),
|
|
|
|
|
const SizedBox(height: 10),
|
|
|
|
|
Text(
|
|
|
|
|
'Complete Profile',
|
|
|
|
|
LocaleKeys.profile_completeProfile.tr(),
|
|
|
|
|
style: TextStyle(color: Color(0xff2BB8A6), fontWeight: FontWeight.bold, decoration: TextDecoration.underline),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
@ -92,14 +99,13 @@ class ProfileInFo extends StatelessWidget {
|
|
|
|
|
Widget rowItem(obj, context) {
|
|
|
|
|
return InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
// Navigator.pushNamed(
|
|
|
|
|
// context,
|
|
|
|
|
// AppRoutes.addEitScreen,
|
|
|
|
|
// arguments: obj,
|
|
|
|
|
// );
|
|
|
|
|
Navigator.pushNamed(context, obj.route);
|
|
|
|
|
},
|
|
|
|
|
child: ListTile(
|
|
|
|
|
leading: FlutterLogo(),
|
|
|
|
|
leading: Icon(
|
|
|
|
|
obj.icon,
|
|
|
|
|
color: Color(0xff2BB8A6),
|
|
|
|
|
),
|
|
|
|
|
title: Text(obj.name),
|
|
|
|
|
trailing: Icon(Icons.arrow_forward),
|
|
|
|
|
),
|
|
|
|
@ -114,9 +120,3 @@ class ProfileInFo extends StatelessWidget {
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
|
children: [Text(label, style: TextStyle(color: color, fontSize: size, fontWeight: isBold ? FontWeight.bold : FontWeight.normal))]));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class ProfileMenu {
|
|
|
|
|
final String name;
|
|
|
|
|
final String icon;
|
|
|
|
|
ProfileMenu({this.name = '', this.icon = ''});
|
|
|
|
|
}
|
|
|
|
|