Login Issue Fix's

merge-requests/1/merge
devmirza121 3 years ago
parent b898481cf7
commit ec845756be

@ -67,6 +67,7 @@
"whatsapp": "واتس اب", "whatsapp": "واتس اب",
"reject": "يرفض", "reject": "يرفض",
"approve": "يوافق", "approve": "يوافق",
"attendanceDetails": "تفاصيل الحضور",
"msg": "Hello {} in the {} world ", "msg": "Hello {} in the {} world ",
"msg_named": "{} are written in the {lang} language", "msg_named": "{} are written in the {lang} language",
"clickMe": "Click me", "clickMe": "Click me",

@ -1,7 +1,7 @@
class ApiConsts { class ApiConsts {
//static String baseUrl = "http://10.200.204.20:2801/"; // Local server //static String baseUrl = "http://10.200.204.20:2801/"; // Local server
static String baseUrl = "https://uat.hmgwebservices.com"; // UAT server // static String baseUrl = "https://uat.hmgwebservices.com"; // UAT server
// static String baseUrl = "https://hmgwebservices.com"; // Live server static String baseUrl = "https://hmgwebservices.com"; // Live server
static String baseUrlServices = baseUrl + "/Services/"; // server static String baseUrlServices = baseUrl + "/Services/"; // server
// static String baseUrlServices = "https://api.cssynapses.com/tangheem/"; // Live server // static String baseUrlServices = "https://api.cssynapses.com/tangheem/"; // Live server
static String utilitiesRest = baseUrlServices + "Utilities.svc/REST/"; static String utilitiesRest = baseUrlServices + "Utilities.svc/REST/";

@ -9,8 +9,6 @@ extension WidgetExtensions on Widget {
Widget get center => Center(child: this); Widget get center => Center(child: this);
Widget get expanded => Expanded(child: this);
Widget paddingAll(double _value) => Padding(padding: EdgeInsets.all(_value), child: this); Widget paddingAll(double _value) => Padding(padding: EdgeInsets.all(_value), child: this);
Widget paddingOnly({double left = 0.0, double right = 0.0, double top = 0.0, double bottom = 0.0}) => Widget paddingOnly({double left = 0.0, double right = 0.0, double top = 0.0, double bottom = 0.0}) =>

@ -1,6 +1,6 @@
// DO NOT EDIT. This is code generated via package:easy_localization/generate.dart // DO NOT EDIT. This is code generated via package:easy_localization/generate.dart
abstract class LocaleKeys { abstract class LocaleKeys {
static const mohemm = 'mohemm'; static const mohemm = 'mohemm';
static const english = 'english'; static const english = 'english';
static const arabic = 'arabic'; static const arabic = 'arabic';
@ -53,6 +53,7 @@ abstract class LocaleKeys {
static const confirm = 'confirm'; static const confirm = 'confirm';
static const passwordChangedSuccessfully = 'passwordChangedSuccessfully'; static const passwordChangedSuccessfully = 'passwordChangedSuccessfully';
static const itemsForSale = 'itemsForSale'; static const itemsForSale = 'itemsForSale';
static const attendanceDetails = 'attendanceDetails';
static const doNotUseRecentPassword = 'doNotUseRecentPassword'; static const doNotUseRecentPassword = 'doNotUseRecentPassword';
static const atLeastOneLowercase = 'atLeastOneLowercase'; static const atLeastOneLowercase = 'atLeastOneLowercase';
static const atLeastOneUppercase = 'atLeastOneUppercase'; static const atLeastOneUppercase = 'atLeastOneUppercase';
@ -65,14 +66,14 @@ abstract class LocaleKeys {
static const fingerPrint = 'fingerPrint'; static const fingerPrint = 'fingerPrint';
static const face = 'face'; static const face = 'face';
static const whatsapp = 'whatsapp'; static const whatsapp = 'whatsapp';
static const reject = 'reject';
static const approve = 'approve';
static const msg = 'msg'; static const msg = 'msg';
static const msg_named = 'msg_named'; static const msg_named = 'msg_named';
static const clickMe = 'clickMe'; static const clickMe = 'clickMe';
static const human = 'human'; static const human = 'human';
static const resources = 'resources'; static const resources = 'resources';
static const details = 'details'; static const details = 'details';
static const reject = 'reject';
static const approve = 'approve';
static const profile_reset_password_label = 'profile.reset_password.label'; static const profile_reset_password_label = 'profile.reset_password.label';
static const profile_reset_password_username = 'profile.reset_password.username'; static const profile_reset_password_username = 'profile.reset_password.username';
static const profile_reset_password_password = 'profile.reset_password.password'; static const profile_reset_password_password = 'profile.reset_password.password';
@ -83,4 +84,5 @@ abstract class LocaleKeys {
static const gender_with_arg = 'gender.with_arg'; static const gender_with_arg = 'gender.with_arg';
static const gender = 'gender'; static const gender = 'gender';
static const reset_locale = 'reset_locale'; static const reset_locale = 'reset_locale';
} }

@ -231,7 +231,7 @@ class _MonthlyAttendanceState extends State<MonthlyAttendance> {
), ),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children:<Widget> [title.toText10(color: MyColors.darkTextColor).expanded, value.toText20(color: MyColors.darkTextColor)], children: <Widget>[title.toText10(color: MyColors.darkTextColor).expanded, value.toText16(color: MyColors.darkTextColor)],
), ),
), ),
).expanded; ).expanded;
@ -243,7 +243,7 @@ class _MonthlyAttendanceState extends State<MonthlyAttendance> {
headerHeight: 0, headerHeight: 0,
todayHighlightColor: MyColors.grey3AColor, todayHighlightColor: MyColors.grey3AColor,
viewHeaderStyle: const ViewHeaderStyle( viewHeaderStyle: const ViewHeaderStyle(
dayTextStyle: TextStyle(color: MyColors.grey3AColor, fontSize: 13, fontWeight: FontWeight.w600), dayTextStyle: TextStyle(color: MyColors.grey3AColor, fontSize: 13, fontWeight: FontWeight.w600),
), ),
monthCellBuilder: (cxt, build) { monthCellBuilder: (cxt, build) {
int val = build.date.day % 4; int val = build.date.day % 4;
@ -273,7 +273,7 @@ class _MonthlyAttendanceState extends State<MonthlyAttendance> {
alignment: Alignment.center, alignment: Alignment.center,
child: Text( child: Text(
"${build.date.day}", "${build.date.day}",
style: const TextStyle( style: const TextStyle(
fontSize: 13, fontSize: 13,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: MyColors.white, color: MyColors.white,
@ -297,7 +297,7 @@ class _MonthlyAttendanceState extends State<MonthlyAttendance> {
alignment: Alignment.center, alignment: Alignment.center,
child: Text( child: Text(
"${build.date.day}", "${build.date.day}",
style: const TextStyle( style: const TextStyle(
fontSize: 13, fontSize: 13,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: MyColors.white, color: MyColors.white,
@ -321,7 +321,7 @@ class _MonthlyAttendanceState extends State<MonthlyAttendance> {
alignment: Alignment.center, alignment: Alignment.center,
child: Text( child: Text(
"${build.date.day}", "${build.date.day}",
style: const TextStyle( style: const TextStyle(
fontSize: 13, fontSize: 13,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: Color(0xff1F2428), color: Color(0xff1F2428),
@ -338,7 +338,7 @@ class _MonthlyAttendanceState extends State<MonthlyAttendance> {
alignment: Alignment.center, alignment: Alignment.center,
child: Text( child: Text(
"${build.date.day}", "${build.date.day}",
style: const TextStyle( style: const TextStyle(
fontSize: 13, fontSize: 13,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: MyColors.greyA5Color, color: MyColors.greyA5Color,

@ -68,56 +68,59 @@ class _DashboardState extends State<Dashboard> {
return Scaffold( return Scaffold(
body: Column( body: Column(
children: [ children: [
Row( Container(
children: [ color: Colors.red,
Row( child: Row(
mainAxisSize: MainAxisSize.min, children: [
children: [ Row(
CircularAvatar(
width: 34,
height: 34,
url:
"https://cdn4.iconfinder.com/data/icons/professions-2-2/151/89-512.png",
),
8.width,
SvgPicture.asset("assets/images/side_nav.svg"),
],
).onPress(() {}),
Expanded(
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
//AppLogo(), CircularAvatar(
width: 34,
height: 34,
url:
"https://cdn4.iconfinder.com/data/icons/professions-2-2/151/89-512.png",
),
8.width, 8.width,
LocaleKeys.mohemm.tr().toText14() SvgPicture.asset("assets/images/side_nav.svg"),
],
),
),
SizedBox(
width: 36,
height: 36,
child: Stack(
alignment: Alignment.centerLeft,
children: [
SvgPicture.asset("assets/images/announcements.svg"),
Positioned(
right: 0,
top: 0,
child: Container(
padding: const EdgeInsets.only(left: 5, right: 5),
decoration: BoxDecoration(
color: MyColors.redColor,
borderRadius: BorderRadius.circular(17)),
child: "3".toText12(color: Colors.white),
),
)
], ],
).onPress(() {}),
Expanded(
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: [
//AppLogo(),
8.width,
LocaleKeys.mohemm.tr().toText14()
],
),
), ),
) SizedBox(
], width: 36,
).paddingOnly(left: 21, right: 21, top: 48, bottom: 7), height: 36,
child: Stack(
alignment: Alignment.centerLeft,
children: [
SvgPicture.asset("assets/images/announcements.svg"),
Positioned(
right: 0,
top: 0,
child: Container(
padding: const EdgeInsets.only(left: 5, right: 5),
decoration: BoxDecoration(
color: MyColors.redColor,
borderRadius: BorderRadius.circular(17)),
child: "3".toText12(color: Colors.white),
),
)
],
),
)
],
).paddingOnly(left: 21, right: 21, top: 48, bottom: 7),
),
Expanded( Expanded(
child: ListView( child: ListView(
padding: EdgeInsets.zero, padding: EdgeInsets.zero,

@ -96,7 +96,9 @@ class _DashboardScreenState extends State<DashboardScreen> {
], ],
), ),
).onPress(() { ).onPress(() {
data.update(); // data.update();
Navigator.pushNamed(
context, AppRoutes.monthlyAttendance);
}) })
], ],
).paddingOnly(left: 21, right: 21, top: 48, bottom: 7), ).paddingOnly(left: 21, right: 21, top: 48, bottom: 7),

@ -128,11 +128,11 @@ class _LoginScreenState extends State<LoginScreen> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
username.text = "15153"; // username.text = "15153";
password.text = "Xy12345@"; // password.text = "Xy12345@";
// username.text = "287742"; username.text = "287742";
// password.text = "509@Shafi"; password.text = "509@Shafi";
return Scaffold( return Scaffold(
body: Column( body: Column(
children: [ children: [

@ -118,9 +118,9 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
shrinkWrap: true, shrinkWrap: true,
children: [ children: [
getButton(3), getButton(3),
getButton(4),
getButton(2), getButton(2),
getButton(1), getButton(1),
getButton(4),
], ],
) )
], ],
@ -225,7 +225,7 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
}); });
} else { } else {
Utils.showLoading(context); Utils.showLoading(context);
if (_flag == 2 || _flag == 3) { if (_flag == 4 || _flag == 3) {
bool authenticateWithFaceAndTouchID = await loginWithFaceIDAndBiometrics(); bool authenticateWithFaceAndTouchID = await loginWithFaceIDAndBiometrics();
if (authenticateWithFaceAndTouchID) { if (authenticateWithFaceAndTouchID) {
Navigator.pushNamedAndRemoveUntil(context, AppRoutes.dashboard, (Route<dynamic> route) => false); Navigator.pushNamedAndRemoveUntil(context, AppRoutes.dashboard, (Route<dynamic> route) => false);
@ -305,11 +305,11 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
Widget getButton(int flag) { Widget getButton(int flag) {
switch (flag) { switch (flag) {
case 4: case 2:
return _loginOptionButton(LocaleKeys.verifyThroughWhatsapp.tr(), 'assets/images/login/verify_whatsapp.svg', flag, null); return _loginOptionButton(LocaleKeys.verifyThroughWhatsapp.tr(), 'assets/images/login/verify_whatsapp.svg', flag, null);
case 1: case 1:
return _loginOptionButton(LocaleKeys.verifyThroughSMS.tr(), 'assets/images/login/verify_sms.svg', flag, null); return _loginOptionButton(LocaleKeys.verifyThroughSMS.tr(), 'assets/images/login/verify_sms.svg', flag, null);
case 2: case 4:
return _loginOptionButton(LocaleKeys.verifyThroughFingerprint.tr(), 'assets/images/login/verify_thumb.svg', flag, BiometricType.fingerprint.index); return _loginOptionButton(LocaleKeys.verifyThroughFingerprint.tr(), 'assets/images/login/verify_thumb.svg', flag, BiometricType.fingerprint.index);
case 3: case 3:
return _loginOptionButton(LocaleKeys.verifyThroughFace.tr(), 'assets/images/login/verify_face.svg', flag, BiometricType.face.index); return _loginOptionButton(LocaleKeys.verifyThroughFace.tr(), 'assets/images/login/verify_face.svg', flag, BiometricType.face.index);

@ -140,9 +140,9 @@ class _VerifyLoginScreenState extends State<VerifyLoginScreen> {
shrinkWrap: true, shrinkWrap: true,
children: [ children: [
getButton(3), getButton(3),
getButton(4),
getButton(2), getButton(2),
getButton(1), getButton(1),
getButton(4),
], ],
) )
], ],
@ -648,7 +648,7 @@ class _VerifyLoginScreenState extends State<VerifyLoginScreen> {
} else { } else {
try { try {
Utils.showLoading(context); Utils.showLoading(context);
if (_flag == 2 || _flag == 3) { if (_flag == 4 || _flag == 3) {
bool authenticateWithFaceAndTouchID = await loginWithFaceIDAndBiometrics(); bool authenticateWithFaceAndTouchID = await loginWithFaceIDAndBiometrics();
if (!authenticateWithFaceAndTouchID) { if (!authenticateWithFaceAndTouchID) {
return; return;
@ -735,11 +735,11 @@ class _VerifyLoginScreenState extends State<VerifyLoginScreen> {
Widget getButton(int flag) { Widget getButton(int flag) {
switch (flag) { switch (flag) {
case 4: case 2:
return _loginOptionButton(LocaleKeys.verifyThroughWhatsapp.tr(), 'assets/images/login/verify_whatsapp.svg', flag, null); return _loginOptionButton(LocaleKeys.verifyThroughWhatsapp.tr(), 'assets/images/login/verify_whatsapp.svg', flag, null);
case 1: case 1:
return _loginOptionButton(LocaleKeys.verifyThroughSMS.tr(), 'assets/images/login/verify_sms.svg', flag, null); return _loginOptionButton(LocaleKeys.verifyThroughSMS.tr(), 'assets/images/login/verify_sms.svg', flag, null);
case 2: case 4:
return _loginOptionButton(LocaleKeys.verifyThroughFingerprint.tr(), 'assets/images/login/verify_thumb.svg', flag, BiometricType.fingerprint.index); return _loginOptionButton(LocaleKeys.verifyThroughFingerprint.tr(), 'assets/images/login/verify_thumb.svg', flag, BiometricType.fingerprint.index);
case 3: case 3:
return _loginOptionButton(LocaleKeys.verifyThroughFace.tr(), 'assets/images/login/verify_face.svg', flag, BiometricType.face.index); return _loginOptionButton(LocaleKeys.verifyThroughFace.tr(), 'assets/images/login/verify_face.svg', flag, BiometricType.face.index);

@ -21,7 +21,7 @@ AppBar AppBarWidget(BuildContext context, {required String title, bool showHomeB
child: const Icon(Icons.arrow_back_ios, color: MyColors.darkIconColor), child: const Icon(Icons.arrow_back_ios, color: MyColors.darkIconColor),
), ),
4.width, 4.width,
title.toText24(color: MyColors.darkTextColor, isBold: true, considerHeight: false).expanded, title.toText24(color: MyColors.darkTextColor, isBold: true).expanded,
], ],
), ),
centerTitle: false, centerTitle: false,

Loading…
Cancel
Save