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

Sultan

See merge request Cloud_Solution/diplomatic-quarter!215
merge-requests/216/merge
Mohammad Aljammal 4 years ago
commit 2553b032dd

@ -154,7 +154,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
_firebaseMessaging.getToken().then((String token) async {
sharedPref.setString(PUSH_TOKEN, token);
if (token != null && await sharedPref.getObject(USER_PROFILE) == null) {
if (token != null && projectViewModel.isLogin == false) {
DEVICE_TOKEN = token;
checkUserStatus(token);
} else if (projectViewModel.isLogin) {

@ -99,6 +99,7 @@ class _Login extends State<Login> {
textDirection: TextDirection.ltr,
child: Container(
child: TextFields(
keyboardType: TextInputType.number,
fontWeight: FontWeight.normal,
controller: nationalIDorFile,
onChanged: (value) => {validateForm()},
@ -240,7 +241,7 @@ class _Login extends State<Login> {
request['PatientID'] = int.parse(nationalIDorFile.text);
}
// request.isRegister = false;
this.authService.checkActivationCode(request, code).then((result) async{
this.authService.checkActivationCode(request, code).then((result) async {
sharedPref.remove(FAMILY_FILE);
result = CheckActivationCode.fromJson(result);
result.list.isFamily = false;
@ -282,7 +283,6 @@ class _Login extends State<Login> {
print(err);
GifLoaderDialogUtils.hideDialog(context);
});
});
}

@ -51,8 +51,7 @@ class _Register extends State<Register> {
isShowDecPage: false,
body: SingleChildScrollView(
child: Container(
padding:
EdgeInsets.only(top: 10, left: 20, right: 20, bottom: 30),
padding: EdgeInsets.only(top: 10, left: 20, right: 20, bottom: 30),
height: SizeConfig.realScreenHeight * .9,
width: SizeConfig.realScreenWidth,
child: Column(children: <Widget>[
@ -73,12 +72,14 @@ class _Register extends State<Register> {
{mobileNo = value, validateForm()},
onCountryChange: (value) => countryCode = value),
Directionality(
textDirection:TextDirection.ltr,child:Container(
textDirection: TextDirection.ltr,
child: Container(
child: TextFields(
controller: nationalIDorFile,
onChanged: (value) => validateForm(),
prefixIcon:
Icon(Icons.chrome_reader_mode, color: Color(0xFF40ACC9)),
keyboardType: TextInputType.number,
prefixIcon: Icon(Icons.chrome_reader_mode,
color: Color(0xFF40ACC9)),
padding: EdgeInsets.only(
top: 20, bottom: 20, left: 10, right: 10),
hintText: TranslationBase.of(context).nationalID,
@ -115,8 +116,7 @@ class _Register extends State<Register> {
validateForm();
},
),
Text(TranslationBase.of(context)
.gregorianDate),
Text(TranslationBase.of(context).gregorianDate),
],
),
),
@ -127,7 +127,7 @@ class _Register extends State<Register> {
children: <Widget>[
Container(
width: SizeConfig.realScreenWidth * .9,
height:60,
height: 60,
child: isHijri == 1
? TextFields(
onChanged: (value) => {dob = value},
@ -137,9 +137,8 @@ class _Register extends State<Register> {
: RaisedButton.icon(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(15.0),
),
color:Colors.white,
color: Colors.white,
onPressed: () => {
if (isHijri != null)
_selectDate(context)
@ -162,7 +161,9 @@ class _Register extends State<Register> {
color: Colors.grey,
height: 2,
),
SizedBox(height: 10,),
SizedBox(
height: 10,
),
Row(
children: <Widget>[
Expanded(
@ -216,7 +217,8 @@ class _Register extends State<Register> {
this
.authService
.checkPatientForRegisteration(request)
.then((response) => {checkUserStatus(response, request)}).catchError((err) {
.then((response) => {checkUserStatus(response, request)})
.catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
ConfirmDialog dialog = new ConfirmDialog(
context: context,
@ -228,11 +230,9 @@ class _Register extends State<Register> {
Navigator.of(context).pushNamed(
REGISTER,
),
},
cancelFunction: () => {ConfirmDialog.closeAlertDialog(context)});
dialog.showAlertDialog(context);
});
}

@ -114,6 +114,8 @@ class _AppDrawerState extends State<AppDrawer> {
padding: EdgeInsets.only(
left: 30, right: 10),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
AppText(
TranslationBase.of(
@ -182,7 +184,7 @@ class _AppDrawerState extends State<AppDrawer> {
case ConnectionState.waiting:
return Padding(
padding: EdgeInsets.all(10),
child: Text('Loading....'));
child: Text(''));
default:
if (snapshot.hasError)
return Padding(

Loading…
Cancel
Save