Merge branch 'sultan' into 'diplomatic-quarter-live'

Sultan

See merge request Cloud_Solution/diplomatic-quarter!205
merge-requests/215/merge
Mohammad Aljammal 4 years ago
commit adfeabb411

@ -21,6 +21,7 @@ class WeatherService extends BaseService {
await baseAppClient.post(WEATHER_INDICATOR,
onSuccess: (dynamic response, int statusCode) {
weatherIndicatorData = [];
response['GetCityInfo_List'].forEach((data) {
weatherIndicatorData.add(GetCityInfoList.fromJson(data));
});

@ -516,14 +516,15 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
// );
// themeNotifier.setTheme(defaultTheme);
}
void checkUserStatus(token) async {
//GifLoaderDialogUtils.showMyDialog(context);
authService
.selectDeviceImei(token)
.then((SelectDeviceIMEIRES value) => setUserValues(value))
.catchError((err) {
//GifLoaderDialogUtils.hideDialog(context);
});
void checkUserStatus(token, {isLoader}) async {
if (isLoader)
//GifLoaderDialogUtils.showMyDialog(context);
authService
.selectDeviceImei(token)
.then((SelectDeviceIMEIRES value) => setUserValues(value))
.catchError((err) {
//GifLoaderDialogUtils.hideDialog(context);
});
}
static Future<dynamic> myBackgroundMessageHandler(
@ -560,9 +561,25 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
if (data != null) {
Navigator.of(context).pushNamed(CONFIRM_LOGIN);
} else {
Navigator.of(context).pushNamed(
WELCOME_LOGIN,
);
GifLoaderDialogUtils.showMyDialog(context);
authService
.selectDeviceImei(DEVICE_TOKEN)
.then((SelectDeviceIMEIRES value) {
GifLoaderDialogUtils.hideDialog(context);
if (value != null) {
setUserValues(value);
Navigator.of(context).pushNamed(CONFIRM_LOGIN);
} else {
Navigator.of(context).pushNamed(
WELCOME_LOGIN,
);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
Navigator.of(context).pushNamed(
WELCOME_LOGIN,
);
});
}
}

@ -540,6 +540,9 @@ class _ConfirmLogin extends State<ConfirmLogin> {
.catchError((err) {
print(err);
GifLoaderDialogUtils.hideDialog(context);
Future.delayed(Duration(seconds: 1), () {
AppToast.showErrorToast(message: err);
});
});
}

@ -258,7 +258,7 @@ class AuthProvider with ChangeNotifier {
sharedPref.setString(BLOOD_TYPE, localRes['PatientBloodType']);
return Future.value(localRes);
} catch (error) {
throw error;
throw localRes;
//return Future.value(error);
}
}

@ -370,7 +370,7 @@ class _AppDrawerState extends State<AppDrawer> {
"https://apps.apple.com/sa/app/dr-suliaman-alhabib/id733503978");
} else {
launch(
"https://play.google.com/store/apps/details?id=com.ejada.hmg&hl=en");
"https://play.google.com/store/apps/details?id=com.cloud.diplomaticquarterapp&hl=en");
}
},
),

@ -114,7 +114,7 @@ class SMSOTP {
textInputAction: TextInputAction.next,
style: buildTextStyle(),
autofocus: true,
// maxLength: 1,
maxLength: 1,
controller: digit1,
textAlign: TextAlign.center,
keyboardType: TextInputType.number,
@ -141,7 +141,7 @@ class SMSOTP {
child: TextFormField(
focusNode: focusD2,
textInputAction: TextInputAction.next,
// maxLength: 1,
maxLength: 1,
controller: digit2,
textAlign: TextAlign.center,
style: buildTextStyle(),
@ -168,7 +168,7 @@ class SMSOTP {
child: TextFormField(
focusNode: focusD3,
textInputAction: TextInputAction.next,
// maxLength: 1,
maxLength: 1,
controller: digit3,
textAlign: TextAlign.center,
style: buildTextStyle(),
@ -194,7 +194,7 @@ class SMSOTP {
width: SizeConfig.realScreenWidth * 0.15,
child: TextFormField(
focusNode: focusD4,
// maxLength: 1,
maxLength: 1,
textAlign: TextAlign.center,
style: buildTextStyle(),
controller: digit4,
@ -242,8 +242,9 @@ class SMSOTP {
InputDecoration buildInputDecoration(BuildContext context) {
return InputDecoration(
counterText: " ",
// ts/images/password_icon.png
contentPadding: EdgeInsets.only(top: 20, bottom: 20),
// contentPadding: EdgeInsets.only(top: 20, bottom: 20),
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(10)),
borderSide: BorderSide(color: Colors.black),

Loading…
Cancel
Save