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, await baseAppClient.post(WEATHER_INDICATOR,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
weatherIndicatorData = [];
response['GetCityInfo_List'].forEach((data) { response['GetCityInfo_List'].forEach((data) {
weatherIndicatorData.add(GetCityInfoList.fromJson(data)); weatherIndicatorData.add(GetCityInfoList.fromJson(data));
}); });

@ -516,14 +516,15 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
// ); // );
// themeNotifier.setTheme(defaultTheme); // themeNotifier.setTheme(defaultTheme);
} }
void checkUserStatus(token) async { void checkUserStatus(token, {isLoader}) async {
//GifLoaderDialogUtils.showMyDialog(context); if (isLoader)
authService //GifLoaderDialogUtils.showMyDialog(context);
.selectDeviceImei(token) authService
.then((SelectDeviceIMEIRES value) => setUserValues(value)) .selectDeviceImei(token)
.catchError((err) { .then((SelectDeviceIMEIRES value) => setUserValues(value))
//GifLoaderDialogUtils.hideDialog(context); .catchError((err) {
}); //GifLoaderDialogUtils.hideDialog(context);
});
} }
static Future<dynamic> myBackgroundMessageHandler( static Future<dynamic> myBackgroundMessageHandler(
@ -560,9 +561,25 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
if (data != null) { if (data != null) {
Navigator.of(context).pushNamed(CONFIRM_LOGIN); Navigator.of(context).pushNamed(CONFIRM_LOGIN);
} else { } else {
Navigator.of(context).pushNamed( GifLoaderDialogUtils.showMyDialog(context);
WELCOME_LOGIN, 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) { .catchError((err) {
print(err); print(err);
GifLoaderDialogUtils.hideDialog(context); 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']); sharedPref.setString(BLOOD_TYPE, localRes['PatientBloodType']);
return Future.value(localRes); return Future.value(localRes);
} catch (error) { } catch (error) {
throw error; throw localRes;
//return Future.value(error); //return Future.value(error);
} }
} }

@ -370,7 +370,7 @@ class _AppDrawerState extends State<AppDrawer> {
"https://apps.apple.com/sa/app/dr-suliaman-alhabib/id733503978"); "https://apps.apple.com/sa/app/dr-suliaman-alhabib/id733503978");
} else { } else {
launch( 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, textInputAction: TextInputAction.next,
style: buildTextStyle(), style: buildTextStyle(),
autofocus: true, autofocus: true,
// maxLength: 1, maxLength: 1,
controller: digit1, controller: digit1,
textAlign: TextAlign.center, textAlign: TextAlign.center,
keyboardType: TextInputType.number, keyboardType: TextInputType.number,
@ -141,7 +141,7 @@ class SMSOTP {
child: TextFormField( child: TextFormField(
focusNode: focusD2, focusNode: focusD2,
textInputAction: TextInputAction.next, textInputAction: TextInputAction.next,
// maxLength: 1, maxLength: 1,
controller: digit2, controller: digit2,
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: buildTextStyle(), style: buildTextStyle(),
@ -168,7 +168,7 @@ class SMSOTP {
child: TextFormField( child: TextFormField(
focusNode: focusD3, focusNode: focusD3,
textInputAction: TextInputAction.next, textInputAction: TextInputAction.next,
// maxLength: 1, maxLength: 1,
controller: digit3, controller: digit3,
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: buildTextStyle(), style: buildTextStyle(),
@ -194,7 +194,7 @@ class SMSOTP {
width: SizeConfig.realScreenWidth * 0.15, width: SizeConfig.realScreenWidth * 0.15,
child: TextFormField( child: TextFormField(
focusNode: focusD4, focusNode: focusD4,
// maxLength: 1, maxLength: 1,
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: buildTextStyle(), style: buildTextStyle(),
controller: digit4, controller: digit4,
@ -242,8 +242,9 @@ class SMSOTP {
InputDecoration buildInputDecoration(BuildContext context) { InputDecoration buildInputDecoration(BuildContext context) {
return InputDecoration( return InputDecoration(
counterText: " ",
// ts/images/password_icon.png // ts/images/password_icon.png
contentPadding: EdgeInsets.only(top: 20, bottom: 20), // contentPadding: EdgeInsets.only(top: 20, bottom: 20),
enabledBorder: OutlineInputBorder( enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(10)), borderRadius: BorderRadius.all(Radius.circular(10)),
borderSide: BorderSide(color: Colors.black), borderSide: BorderSide(color: Colors.black),

Loading…
Cancel
Save