Login Issue Fix's

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

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

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

@ -9,8 +9,6 @@ extension WidgetExtensions on Widget {
Widget get center => Center(child: this);
Widget get expanded => Expanded(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}) =>

@ -53,6 +53,7 @@ abstract class LocaleKeys {
static const confirm = 'confirm';
static const passwordChangedSuccessfully = 'passwordChangedSuccessfully';
static const itemsForSale = 'itemsForSale';
static const attendanceDetails = 'attendanceDetails';
static const doNotUseRecentPassword = 'doNotUseRecentPassword';
static const atLeastOneLowercase = 'atLeastOneLowercase';
static const atLeastOneUppercase = 'atLeastOneUppercase';
@ -65,14 +66,14 @@ abstract class LocaleKeys {
static const fingerPrint = 'fingerPrint';
static const face = 'face';
static const whatsapp = 'whatsapp';
static const reject = 'reject';
static const approve = 'approve';
static const msg = 'msg';
static const msg_named = 'msg_named';
static const clickMe = 'clickMe';
static const human = 'human';
static const resources = 'resources';
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_username = 'profile.reset_password.username';
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 = 'gender';
static const reset_locale = 'reset_locale';
}

@ -231,7 +231,7 @@ class _MonthlyAttendanceState extends State<MonthlyAttendance> {
),
child: Column(
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;

@ -68,7 +68,9 @@ class _DashboardState extends State<Dashboard> {
return Scaffold(
body: Column(
children: [
Row(
Container(
color: Colors.red,
child: Row(
children: [
Row(
mainAxisSize: MainAxisSize.min,
@ -118,6 +120,7 @@ class _DashboardState extends State<Dashboard> {
)
],
).paddingOnly(left: 21, right: 21, top: 48, bottom: 7),
),
Expanded(
child: ListView(
padding: EdgeInsets.zero,

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

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

@ -118,9 +118,9 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
shrinkWrap: true,
children: [
getButton(3),
getButton(4),
getButton(2),
getButton(1),
getButton(4),
],
)
],
@ -225,7 +225,7 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
});
} else {
Utils.showLoading(context);
if (_flag == 2 || _flag == 3) {
if (_flag == 4 || _flag == 3) {
bool authenticateWithFaceAndTouchID = await loginWithFaceIDAndBiometrics();
if (authenticateWithFaceAndTouchID) {
Navigator.pushNamedAndRemoveUntil(context, AppRoutes.dashboard, (Route<dynamic> route) => false);
@ -305,11 +305,11 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
Widget getButton(int flag) {
switch (flag) {
case 4:
case 2:
return _loginOptionButton(LocaleKeys.verifyThroughWhatsapp.tr(), 'assets/images/login/verify_whatsapp.svg', flag, null);
case 1:
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);
case 3:
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,
children: [
getButton(3),
getButton(4),
getButton(2),
getButton(1),
getButton(4),
],
)
],
@ -648,7 +648,7 @@ class _VerifyLoginScreenState extends State<VerifyLoginScreen> {
} else {
try {
Utils.showLoading(context);
if (_flag == 2 || _flag == 3) {
if (_flag == 4 || _flag == 3) {
bool authenticateWithFaceAndTouchID = await loginWithFaceIDAndBiometrics();
if (!authenticateWithFaceAndTouchID) {
return;
@ -735,11 +735,11 @@ class _VerifyLoginScreenState extends State<VerifyLoginScreen> {
Widget getButton(int flag) {
switch (flag) {
case 4:
case 2:
return _loginOptionButton(LocaleKeys.verifyThroughWhatsapp.tr(), 'assets/images/login/verify_whatsapp.svg', flag, null);
case 1:
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);
case 3:
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),
),
4.width,
title.toText24(color: MyColors.darkTextColor, isBold: true, considerHeight: false).expanded,
title.toText24(color: MyColors.darkTextColor, isBold: true).expanded,
],
),
centerTitle: false,

Loading…
Cancel
Save