From 37a3c36b701c32a2ad3bed046c9e7ce778cc79a6 Mon Sep 17 00:00:00 2001 From: Mohammad Aljammal Date: Tue, 31 Aug 2021 16:39:06 +0300 Subject: [PATCH] fix login issue --- lib/config/config.dart | 4 +- .../auth/verification_methods_screen.dart | 6 +- .../dashboard/dashboard_item_icons_texts.dart | 81 ------------------- 3 files changed, 5 insertions(+), 86 deletions(-) delete mode 100644 lib/widgets/dashboard/dashboard_item_icons_texts.dart diff --git a/lib/config/config.dart b/lib/config/config.dart index 9ce4d462..42f73d91 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -5,8 +5,8 @@ const ONLY_NUMBERS = "[0-9]"; const ONLY_LETTERS = "[a-zA-Z &'\"]"; const ONLY_DATE = "[0-9/]"; const BASE_URL_LIVE_CARE = 'https://livecare.hmg.com/'; -// const BASE_URL = 'https://hmgwebservices.com/'; -const BASE_URL = 'https://uat.hmgwebservices.com/'; +const BASE_URL = 'https://hmgwebservices.com/'; +// const BASE_URL = 'https://uat.hmgwebservices.com/'; const PHARMACY_ITEMS_URL = "Services/Lists.svc/REST/GetPharmcyItems_Region_enh"; const PHARMACY_LIST_URL = "Services/Patients.svc/REST/GetPharmcyList"; const PATIENT_PROGRESS_NOTE_URL = "Services/DoctorApplication.svc/REST/GetProgressNoteForInPatient"; diff --git a/lib/screens/auth/verification_methods_screen.dart b/lib/screens/auth/verification_methods_screen.dart index f5893836..6a1826c7 100644 --- a/lib/screens/auth/verification_methods_screen.dart +++ b/lib/screens/auth/verification_methods_screen.dart @@ -460,7 +460,7 @@ class _VerificationMethodsScreenState extends State { if (authMethodType == AuthMethodTypes.SMS || authMethodType == AuthMethodTypes.WhatsApp) { GifLoaderDialogUtils.hideDialog(context); - this.startSMSService(authMethodType); + this.startSMSService(authMethodType,isSilentLogin:true); } else { checkActivationCode(isSilentLogin: true); } @@ -503,7 +503,7 @@ class _VerificationMethodsScreenState extends State { } } - startSMSService(AuthMethodTypes type) { + startSMSService(AuthMethodTypes type,{bool isSilentLogin = false}) { new SMSOTP( context, type, @@ -515,7 +515,7 @@ class _VerificationMethodsScreenState extends State { return AppLoaderWidget(); }); - this.checkActivationCode(value: value,isSilentLogin: false); + this.checkActivationCode(value: value,isSilentLogin: isSilentLogin); }, () => { diff --git a/lib/widgets/dashboard/dashboard_item_icons_texts.dart b/lib/widgets/dashboard/dashboard_item_icons_texts.dart deleted file mode 100644 index 740ebb66..00000000 --- a/lib/widgets/dashboard/dashboard_item_icons_texts.dart +++ /dev/null @@ -1,81 +0,0 @@ - -import 'package:doctor_app_flutter/config/size_config.dart'; -import 'package:flutter/material.dart'; - -import '../shared/app_texts_widget.dart'; -import '../shared/rounded_container_widget.dart'; - -class DashboardItemIconText extends StatefulWidget { - final IconData icon; - final String value; - final String label; - final Color backgroundColor; - final bool showBorder; - final Color borderColor; - final double titleFontSize; - final Color titleFontColor; - final Color valueFontColor; - final double valueFontSize; - final Color iconColor; -// OWNER : Ibrahim albitar -// DATE : 05-04-2020 -// DESCRIPTION : Custom widget for dashboard items has texts and icons widgets - - DashboardItemIconText(this.icon, this.value, this.label, - {this.backgroundColor = Colors.white, - this.showBorder = false, - this.titleFontSize = 12, - this.valueFontSize = 26, - this.valueFontColor = Colors.white, - this.titleFontColor = Colors.white, - this.iconColor = Colors.white, - this.borderColor = Colors.white}); - @override - _DashboardItemTextsState createState() => _DashboardItemTextsState(); -} - -class _DashboardItemTextsState extends State { - @override - Widget build(BuildContext context) { - return new RoundedContainer( - margin: EdgeInsets.all(10), - child: Stack( - children: [ - Align( - alignment: FractionalOffset.topLeft, - child: Container( - padding: EdgeInsets.all(10), - child: Icon( - widget.icon, - size: SizeConfig.textMultiplier * 2.8, - color: widget.iconColor, - ), - )), - Align( - alignment: FractionalOffset.bottomRight, - child: Container( - padding: EdgeInsets.all(10), - child: Column( - mainAxisAlignment: MainAxisAlignment.end, - crossAxisAlignment: CrossAxisAlignment.end, - children: [ - AppText( - widget.value, - color: widget.valueFontColor, - fontSize: widget.valueFontSize, - ), - AppText( - widget.label, - color: widget.titleFontColor, - fontSize: widget.titleFontSize, - ), - ], - ))), - ], - ), - backgroundColor: widget.backgroundColor, - showBorder: widget.showBorder, - borderColor: widget.borderColor, - ); - } -}