updates & fixes

mohemm_HMG_flutter_upgrade
haroon amjad 11 months ago
parent 5d0091fe5b
commit c1503cc236

@ -7,7 +7,7 @@ class ApiConsts {
// static String baseUrl = "https://uat.hmgwebservices.com"; // UAT ser343622ver
// static String baseUrl = "http://10.201.204.101:2024";
// static String baseUrl = "https://webservices.hmg.com"; // PreProd
// static String baseUrl = "https://hmgwebservices.com"; // Live server
// static String baseUrl = "https://hmgwebservices.com"; // Live server
static String baseUrl = "https://mohemm.hmg.com"; // New Live server

@ -197,7 +197,7 @@ class _ITGAdsScreenState extends State<ITGAdsScreen> {
valueListenable: hasTimerEnded,
builder: (context, val, child) {
// if (hasTimerEndedBool) {
return GridView.builder(
return ListView.builder(
padding: EdgeInsets.zero,
itemCount: advertisementData?.actionButtonsColl!.length,
shrinkWrap: true,
@ -205,7 +205,8 @@ class _ITGAdsScreenState extends State<ITGAdsScreen> {
itemBuilder: (context, index) {
String? btnText = AppState().isArabic(context) ? advertisementData?.actionButtonsColl![index].btnTextAr : advertisementData?.actionButtonsColl![index].btnTextEn;
bool isAcknowledge = advertisementData?.actionButtonsColl![index].actionButtonId == 11;
// bool isAcknowledge = advertisementData?.actionButtonsColl![index].actionButtonId == 11;
bool isAcknowledge = advertisementData?.actionButtonsColl![index].actionButtonId == 17;
if (isAcknowledge) {
return Stack(
alignment: Alignment.center,
@ -243,10 +244,10 @@ class _ITGAdsScreenState extends State<ITGAdsScreen> {
},
).paddingOnly(left: 60.0, right: 60.0, top: 8, bottom: 8);
},
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 1,
childAspectRatio: (7.0),
),
// gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
// crossAxisCount: 1,
// childAspectRatio: (7.0),
// ),
);
// Row(
// mainAxisAlignment: MainAxisAlignment.center,

@ -57,14 +57,10 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
@override
Widget build(BuildContext context) {
if(ModalRoute.of(context)!.settings.arguments != null) {
mobileLoginInfoListModel ??= ModalRoute
.of(context)!
.settings
.arguments as GetMobileLoginInfoListModel;
if (ModalRoute.of(context)!.settings.arguments != null) {
mobileLoginInfoListModel ??= ModalRoute.of(context)!.settings.arguments as GetMobileLoginInfoListModel;
// String empName = AppState().isArabic(context) ? AppState().memberInformationList!.eMPLOYEEDISPLAYNAMEAr! : AppState().memberInformationList!.eMPLOYEEDISPLAYNAMEEn!;
String empName = mobileLoginInfoListModel!.employeeName!;
}
return Scaffold(
@ -140,7 +136,7 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
LocaleKeys.pleaseVerify.tr().toText16(),
if (isNeedVerifyWithFaceIDAndBiometrics) LocaleKeys.pleaseVerifyForBio.tr().toText12(),
GridView(
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2, crossAxisSpacing: 13, mainAxisSpacing: 9),
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: MediaQuery.of(context).size.width > 400 ? 3 : 2, crossAxisSpacing: 8.5, mainAxisSpacing: 9),
physics: const NeverScrollableScrollPhysics(),
padding: const EdgeInsets.only(top: 9),
shrinkWrap: true,
@ -295,7 +291,7 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
width: 38,
color: isDisable ? MyColors.darkTextColor.withOpacity(0.7) : null,
),
_title.toText16(height: 20/16)
_title.toText16(height: 20 / 16)
],
),
),
@ -397,12 +393,10 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
Utils.hideLoading(context);
Utils.handleException(ex, context, null);
dynamic errorCode = ex;
if(errorCode.error.errorStatusCode ==699){
Future.delayed(const Duration(seconds: 2), ()
{
if (errorCode.error.errorStatusCode == 699) {
Future.delayed(const Duration(seconds: 2), () {
Navigator.pop(context);
Navigator.pushNamedAndRemoveUntil(
context, AppRoutes.login, (Route<dynamic> route) => false);
Navigator.pushNamedAndRemoveUntil(context, AppRoutes.login, (Route<dynamic> route) => false);
});
}
}
@ -419,5 +413,4 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
// // isLoading = isTrue;
// });
// }
}

Loading…
Cancel
Save