Merge branch 'diplomatic-quarter-live' of https://gitlab.com/Cloud_Solution/diplomatic-quarter into diplomatic-quarter-haroon

# Conflicts:
#	lib/config/localized_values.dart
#	lib/pages/medical/radiology/radiology_details_page.dart
#	lib/uitl/translations_delegate_base.dart
dq_and_master
haroon amjad 4 years ago
commit d14e7e5223

@ -1179,5 +1179,21 @@ const Map localizedValues = {
"age": { "age": {
"en": "Age", "en": "Age",
"ar": "العمر" "ar": "العمر"
} },
"active-insurence": {
"en": "Active",
"ar": "نشطة"
},
"not-active": {
"en": "Not Active",
"ar": "غير نشط"
},
"card-detail": {
"en": "Insurance Details",
"ar": "منافعك التامينية"
},
"Dr": {
"en": "Dr. ",
"ar": "الدكتور."
},
}; };

@ -157,9 +157,13 @@ class BaseAppClient {
onFailure('Please Check The Internet Connection', -1); onFailure('Please Check The Internet Connection', -1);
} }
} catch (e) { } catch (e) {
print(e); //print(e);
//
if (e is String) {
onFailure(e.toString(), -1);
} else {
onFailure('Failed to connect to the server', -1); onFailure('Failed to connect to the server', -1);
// onFailure(e.toString(), -1); }
} }
} }

@ -20,18 +20,23 @@ import '../base/base_view.dart';
class InsuranceCard extends StatefulWidget { class InsuranceCard extends StatefulWidget {
int appointmentNo; int appointmentNo;
InsuranceCard({this.appointmentNo}); InsuranceCard({this.appointmentNo});
@override @override
_InsuranceCardState createState() => _InsuranceCardState(); _InsuranceCardState createState() => _InsuranceCardState();
} }
class _InsuranceCardState extends State<InsuranceCard> { class _InsuranceCardState extends State<InsuranceCard> {
InsuranceCardService _insuranceCardService = locator<InsuranceCardService>(); InsuranceCardService _insuranceCardService = locator<InsuranceCardService>();
List<ImagesInfo> imagesInfo = List(); List<ImagesInfo> imagesInfo = List();
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/insurance-card/en/0.png',imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/insurance-card/ar/0.png')); imagesInfo.add(ImagesInfo(
imageEn:
'https://hmgwebservices.com/Images/MobileApp/imges-info/insurance-card/en/0.png',
imageAr:
'https://hmgwebservices.com/Images/MobileApp/imges-info/insurance-card/ar/0.png'));
return BaseView<InsuranceViewModel>( return BaseView<InsuranceViewModel>(
onModelReady: (model) => model.getInsurance(), onModelReady: (model) => model.getInsurance(),
@ -80,15 +85,15 @@ class _InsuranceCardState extends State<InsuranceCard> {
width: double.infinity, width: double.infinity,
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
border: Border.all(color: Colors.grey,width: 0.2), border: Border.all(
borderRadius: BorderRadius.all(Radius.circular(2)), color: Colors.grey, width: 0.2),
borderRadius:
BorderRadius.all(Radius.circular(2)),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colors.white70, color: Colors.white70,
), ),
]),
]
),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
@ -103,28 +108,34 @@ class _InsuranceCardState extends State<InsuranceCard> {
thickness: 0.5, thickness: 0.5,
), ),
Column( Column(
crossAxisAlignment: CrossAxisAlignment.stretch, crossAxisAlignment:
CrossAxisAlignment.stretch,
children: <Widget>[ children: <Widget>[
Text( Text(
TranslationBase.of(context).category + TranslationBase.of(context).category +
model.insurance[index].subCategoryDesc, model.insurance[index]
.subCategoryDesc,
style: TextStyle(fontSize: 18.5), style: TextStyle(fontSize: 18.5),
), ),
Text( Text(
TranslationBase.of(context).expirationDate + TranslationBase.of(context)
convertDateFormat( .expirationDate +
model.insurance[index].cardValidTo), convertDateFormat(model
.insurance[index].cardValidTo),
style: TextStyle(fontSize: 18.5), style: TextStyle(fontSize: 18.5),
), ),
Text( Text(
TranslationBase.of(context).patientCard + TranslationBase.of(context)
model.insurance[index].patientCardID, .patientCard +
model
.insurance[index].patientCardID,
style: TextStyle(fontSize: 18.5), style: TextStyle(fontSize: 18.5),
), ),
Text( Text(
TranslationBase.of(context).policyNumber + TranslationBase.of(context)
model .policyNumber +
.insurance[index].insurancePolicyNumber, model.insurance[index]
.insurancePolicyNumber,
style: TextStyle(fontSize: 18.5), style: TextStyle(fontSize: 18.5),
), ),
], ],
@ -132,16 +143,18 @@ class _InsuranceCardState extends State<InsuranceCard> {
Column( Column(
children: <Widget>[ children: <Widget>[
model.insurance[index].isActive == true model.insurance[index].isActive == true
? Text('Active', ? Texts(
style: TextStyle( TranslationBase.of(context)
.activeInsurence,
color: Colors.green, color: Colors.green,
fontWeight: FontWeight.w900, fontWeight: FontWeight.w900,
fontSize: 17.9)) fontSize: 17.9)
: Text('Not Active', : Texts(
style: TextStyle( TranslationBase.of(context)
.notActive,
color: Colors.red, color: Colors.red,
fontWeight: FontWeight.w900, fontWeight: FontWeight.w900,
fontSize: 17.9)) fontSize: 17.9)
], ],
), ),
SizedBox( SizedBox(
@ -151,7 +164,9 @@ class _InsuranceCardState extends State<InsuranceCard> {
Container( Container(
color: Colors.transparent, color: Colors.transparent,
child: SecondaryButton( child: SecondaryButton(
onTap:()=>{ getDetails(model.insurance[index])}, onTap: () => {
getDetails(model.insurance[index])
},
label: TranslationBase.of(context).seeDetails, label: TranslationBase.of(context).seeDetails,
textColor: Colors.white, textColor: Colors.white,
), ),
@ -160,8 +175,6 @@ class _InsuranceCardState extends State<InsuranceCard> {
], ],
), ),
), ),
], ],
), ),
], ],
@ -191,13 +204,13 @@ class _InsuranceCardState extends State<InsuranceCard> {
return newDate.toString(); return newDate.toString();
} }
getDetails(data){
getDetails(data) {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
_insuranceCardService.getInsuranceDetails(data).then((value) => { _insuranceCardService.getInsuranceDetails(data).then((value) => {
GifLoaderDialogUtils.hideDialog(context), GifLoaderDialogUtils.hideDialog(context),
Navigator.push(context, Navigator.push(context,
FadePage(page: InsuranceCardDetails(data:value[0]['CheckList']))) FadePage(page: InsuranceCardDetails(data: value[0]['CheckList'])))
}); });
} }
} }

@ -1,35 +1,29 @@
import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter_html/flutter_html.dart'; import 'package:flutter_html/flutter_html.dart';
import 'package:html/dom.dart' as dom; import 'package:html/dom.dart' as dom;
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class InsuranceCardDetails extends StatefulWidget { class InsuranceCardDetails extends StatelessWidget {
final String data; final String data;
InsuranceCardDetails({this.data}); InsuranceCardDetails({this.data});
@override
_InsuranceCardInsuranceCardDetailsState createState() => _InsuranceCardInsuranceCardDetailsState();
}
//TODO fix it
class _InsuranceCardInsuranceCardDetailsState extends State<InsuranceCardDetails> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return return AppScaffold(
AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarTitle: TranslationBase.of(context).cardDetail,
body: Center( body: Center(
child: SingleChildScrollView( child: SingleChildScrollView(
child: Html( child: Html(
data:widget.data, data: data,
) ),
) ),
), ),
); );
} }
} }

@ -27,7 +27,7 @@ import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
import '../../locator.dart'; import '../../locator.dart';
class HomePage extends StatefulWidget { class HomePage extends StatefulWidget {
@ -49,8 +49,8 @@ class _HomePageState extends State<HomePage> {
// }); // });
// super.initState(); // super.initState();
// } // }
AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>(); AuthenticatedUserObject authenticatedUserObject =
locator<AuthenticatedUserObject>();
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -93,9 +93,10 @@ class _HomePageState extends State<HomePage> {
) )
], ],
), ),
), ),
Container(width: double.infinity, height:projectViewModel.isArabic ? 120:110), Container(
width: double.infinity,
height: projectViewModel.isArabic ? 120 : 110),
], ],
), ),
Positioned( Positioned(
@ -110,7 +111,7 @@ class _HomePageState extends State<HomePage> {
Orientation.landscape Orientation.landscape
? 0.02 ? 0.02
: 0.03), : 0.03),
child: (!model.isLogin ) child: (!model.isLogin)
? Container( ? Container(
width: double.infinity, width: double.infinity,
height: 160, height: 160,
@ -179,7 +180,6 @@ class _HomePageState extends State<HomePage> {
color: Theme.of(context) color: Theme.of(context)
.primaryColor, .primaryColor,
fontSize: 14, fontSize: 14,
), ),
), ),
), ),
@ -307,7 +307,9 @@ class _HomePageState extends State<HomePage> {
bold: true, bold: true,
), ),
Texts( Texts(
TranslationBase.of(context).height, TranslationBase.of(
context)
.height,
color: Colors.white, color: Colors.white,
fontSize: 10, fontSize: 10,
), ),
@ -339,7 +341,9 @@ class _HomePageState extends State<HomePage> {
bold: true, bold: true,
), ),
Texts( Texts(
TranslationBase.of(context).weight, TranslationBase.of(
context)
.weight,
color: Colors.white, color: Colors.white,
fontSize: 10, fontSize: 10,
) )
@ -353,8 +357,10 @@ class _HomePageState extends State<HomePage> {
), ),
Expanded( Expanded(
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment:
crossAxisAlignment: CrossAxisAlignment.center, MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.center,
children: <Widget>[ children: <Widget>[
Image.asset( Image.asset(
'assets/images/blood-drop.png', 'assets/images/blood-drop.png',
@ -368,7 +374,9 @@ class _HomePageState extends State<HomePage> {
color: Colors.white, color: Colors.white,
), ),
Texts( Texts(
TranslationBase.of(context).bloodType, TranslationBase.of(
context)
.bloodType,
color: Colors.white, color: Colors.white,
fontSize: 10, fontSize: 10,
) )
@ -407,28 +415,35 @@ class _HomePageState extends State<HomePage> {
padding: const EdgeInsets.all(15.0), padding: const EdgeInsets.all(15.0),
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
SizedBox(height: 15,), SizedBox(
height: 15,
),
Container( Container(
width: 60, width: 60,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(12) borderRadius:
), BorderRadius.circular(12)),
child: Center(child: Image.asset('assets/images/vital_sign_icon.png', child: Center(
child: Image.asset(
'assets/images/vital_sign_icon.png',
width: 80, width: 80,
height: 50, height: 50,
fit: BoxFit.contain,)), fit: BoxFit.contain,
)),
),
SizedBox(
height: 20,
), ),
SizedBox(height: 20,),
Texts( Texts(
TranslationBase.of(context) TranslationBase.of(context).vitalSigns,
.vitalSigns,
textAlign: TextAlign.center, textAlign: TextAlign.center,
color: Colors.white, color: Colors.white,
bold: true, bold: true,
fontSize: projectViewModel.isArabic? SizeConfig.textMultiplier * 1.5 :SizeConfig.textMultiplier * 1.7, fontSize: projectViewModel.isArabic
? SizeConfig.textMultiplier * 1.5
: SizeConfig.textMultiplier * 1.7,
) )
], ],
), ),
@ -456,26 +471,35 @@ class _HomePageState extends State<HomePage> {
padding: const EdgeInsets.all(15.0), padding: const EdgeInsets.all(15.0),
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
SizedBox(height: 15,), SizedBox(
height: 15,
),
Container( Container(
width: 50, width: 50,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(12) borderRadius:
), BorderRadius.circular(12)),
child: Center(child: Image.asset('assets/images/search_medicine_icon.png', child: Center(
child: Image.asset(
'assets/images/search_medicine_icon.png',
width: 50, width: 50,
height: 50, height: 50,
fit: BoxFit.contain,)), fit: BoxFit.contain,
)),
),
SizedBox(
height: 20,
), ),
SizedBox(height: 20,),
Texts( Texts(
TranslationBase.of(context).searchMedicine, TranslationBase.of(context).searchMedicine,
textAlign: TextAlign.center, textAlign: TextAlign.center,
color: Colors.white, color: Colors.white,
bold: true, bold: true,
fontSize: projectViewModel.isArabic? SizeConfig.textMultiplier * 1.5 :SizeConfig.textMultiplier * 1.7, fontSize: projectViewModel.isArabic
? SizeConfig.textMultiplier * 1.5
: SizeConfig.textMultiplier * 1.7,
) )
], ],
), ),
@ -487,8 +511,9 @@ class _HomePageState extends State<HomePage> {
), ),
), ),
Expanded( Expanded(
child: DashboardItem(opacity: 1.0, child: DashboardItem(
onTap: (){ opacity: 1.0,
onTap: () {
Navigator.push( Navigator.push(
context, context,
FadePage( FadePage(
@ -501,25 +526,35 @@ class _HomePageState extends State<HomePage> {
padding: const EdgeInsets.all(15.0), padding: const EdgeInsets.all(15.0),
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
SizedBox(height: 15,), SizedBox(
height: 15,
),
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(12) borderRadius:
), BorderRadius.circular(12)),
child: Center(child: Image.asset('assets/images/online_payment_icon.png', child: Center(
child: Image.asset(
'assets/images/online_payment_icon.png',
width: 80, width: 80,
height: 50, height: 50,
fit: BoxFit.contain,)), fit: BoxFit.contain,
)),
),
SizedBox(
height: 15,
), ),
SizedBox(height: 15,),
Texts( Texts(
TranslationBase.of(context).onlinePaymentService, TranslationBase.of(context)
.onlinePaymentService,
textAlign: TextAlign.center, textAlign: TextAlign.center,
color: Colors.white, color: Colors.white,
bold: true, bold: true,
fontSize: projectViewModel.isArabic? SizeConfig.textMultiplier * 1.5 :SizeConfig.textMultiplier * 1.7, fontSize: projectViewModel.isArabic
? SizeConfig.textMultiplier * 1.5
: SizeConfig.textMultiplier * 1.7,
) )
], ],
), ),
@ -555,34 +590,33 @@ class _HomePageState extends State<HomePage> {
); );
}, },
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context) title:
.myAppointments, TranslationBase.of(context).myAppointments,
imagePath: 'my_appointment_icon.png', imagePath: 'my_appointment_icon.png',
subTitle: TranslationBase.of(context).myAppointmentsList, subTitle: TranslationBase.of(context)
.myAppointmentsList,
), ),
), ),
), ),
Expanded( Expanded(
flex: 1, flex: 1,
child: InkWell( child: InkWell(
onTap: () => Navigator.push(context, onTap: () => Navigator.push(
FadePage(page: LabsHomePage())), context, FadePage(page: LabsHomePage())),
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).lab, title: TranslationBase.of(context).lab,
imagePath: 'lab_result_icon.png', imagePath: 'lab_result_icon.png',
subTitle: subTitle: TranslationBase.of(context).lab,
TranslationBase.of(context).lab,
), ),
), ),
), ),
Expanded( Expanded(
flex: 1, flex: 1,
child: InkWell( child: InkWell(
onTap: () => Navigator.push(context, onTap: () => Navigator.push(
FadePage(page: RadiologyHomePage())), context, FadePage(page: RadiologyHomePage())),
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context) title: TranslationBase.of(context).radiology,
.radiology,
imagePath: 'radiology_icon.png', imagePath: 'radiology_icon.png',
subTitle: TranslationBase.of(context) subTitle: TranslationBase.of(context)
.radiologySubtitle, .radiologySubtitle,
@ -605,8 +639,7 @@ class _HomePageState extends State<HomePage> {
); );
}, },
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context) title: TranslationBase.of(context).medicines,
.medicines,
imagePath: 'prescription_icon.png', imagePath: 'prescription_icon.png',
subTitle: TranslationBase.of(context) subTitle: TranslationBase.of(context)
.medicinesSubtitle, .medicinesSubtitle,
@ -625,8 +658,7 @@ class _HomePageState extends State<HomePage> {
); );
}, },
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context) title: TranslationBase.of(context).myDoctor,
.myDoctor,
imagePath: 'doctor_icon.png', imagePath: 'doctor_icon.png',
subTitle: TranslationBase.of(context) subTitle: TranslationBase.of(context)
.myDoctorSubtitle, .myDoctorSubtitle,
@ -637,12 +669,11 @@ class _HomePageState extends State<HomePage> {
flex: 1, flex: 1,
child: InkWell( child: InkWell(
onTap: () { onTap: () {
Navigator.push(context, Navigator.push(
FadePage(page: InsuranceCard())); context, FadePage(page: InsuranceCard()));
}, },
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context) title: TranslationBase.of(context).insurance,
.insurance,
imagePath: 'insurance_card_icon.png', imagePath: 'insurance_card_icon.png',
subTitle: TranslationBase.of(context) subTitle: TranslationBase.of(context)
.insuranceSubtitle, .insuranceSubtitle,
@ -651,7 +682,6 @@ class _HomePageState extends State<HomePage> {
), ),
], ],
), ),
], ],
), ),
), ),
@ -664,7 +694,7 @@ class _HomePageState extends State<HomePage> {
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[ children: <Widget>[
DashboardItem( DashboardItem(
opacity:1.0, opacity: 1.0,
child: Container( child: Container(
width: double.infinity, width: double.infinity,
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
@ -677,31 +707,38 @@ class _HomePageState extends State<HomePage> {
bold: true, bold: true,
), ),
Texts( Texts(
TranslationBase.of(context).viewAllHabibMedicalService, TranslationBase.of(context)
.viewAllHabibMedicalService,
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
fontSize: 10, fontSize: 10,
), ),
Expanded( // Expanded(
child: Container(), // child: Container(),
), // ),
Texts( Text(
TranslationBase.of(context).viewAll, TranslationBase.of(context).viewAll,
style: TextStyle(
color: Colors.white, color: Colors.white,
bold: true, fontWeight: FontWeight.bold),
overflow: TextOverflow.ellipsis,
) )
], ],
), ),
), ),
height: 100, height: 106,
imageName: 'ask_doctor_bg.png', imageName: 'ask_doctor_bg.png',
//color: Colors.grey[700], //color: Colors.grey[700],
width: MediaQuery.of(context).size.width * 0.45, width: MediaQuery.of(context).size.width * 0.45,
onTap: () => Navigator.push( onTap: () => Navigator.push(
context, FadePage(page: AllHabibMedicalService(goToMyProfile: widget.goToMyProfile,))), context,
FadePage(
page: AllHabibMedicalService(
goToMyProfile: widget.goToMyProfile,
))),
), ),
DashboardItem( DashboardItem(
opacity:1.0, opacity: 1.0,
onTap: () { onTap: () {
Navigator.push( Navigator.push(
context, FadePage(page: ContactUsPage())); context, FadePage(page: ContactUsPage()));
@ -721,7 +758,7 @@ class _HomePageState extends State<HomePage> {
TranslationBase.of(context).viewAllWaysReachUs, TranslationBase.of(context).viewAllWaysReachUs,
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
fontSize: SizeConfig.textMultiplier * 1.0 , fontSize: SizeConfig.textMultiplier * 1.0,
), ),
Expanded( Expanded(
child: Container(), child: Container(),
@ -786,7 +823,9 @@ class DashboardItem extends StatelessWidget {
this.width, this.width,
this.height, this.height,
this.color, this.color,
this.opacity = 1.0,this.icon,this.margin=0}) this.opacity = 1.0,
this.icon,
this.margin = 0})
: super(key: key); : super(key: key);
final bool hasBorder; final bool hasBorder;
final String imageName; final String imageName;

@ -17,8 +17,12 @@ class LoginType extends StatelessWidget {
appBarTitle: TranslationBase.of(context).login, appBarTitle: TranslationBase.of(context).login,
isShowAppBar: true, isShowAppBar: true,
isShowDecPage: false, isShowDecPage: false,
body: Padding( body: SingleChildScrollView(
padding: EdgeInsets.all(20), child: Container(
padding:
EdgeInsets.only(top: 10, left: 20, right: 20, bottom: 30),
height: SizeConfig.realScreenHeight * .9,
width: SizeConfig.realScreenWidth,
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
@ -74,8 +78,8 @@ class LoginType extends StatelessWidget {
AppText( AppText(
TranslationBase.of(context) TranslationBase.of(context)
.idNo, .idNo,
fontSize: fontSize: SizeConfig
SizeConfig.textMultiplier * .textMultiplier *
2, 2,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
) )
@ -112,8 +116,8 @@ class LoginType extends StatelessWidget {
AppText( AppText(
TranslationBase.of(context) TranslationBase.of(context)
.fileNo, .fileNo,
fontSize: fontSize: SizeConfig
SizeConfig.textMultiplier * .textMultiplier *
2, 2,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
) )
@ -122,7 +126,9 @@ class LoginType extends StatelessWidget {
)))) ))))
], ],
), ),
SizedBox(height: 25,), SizedBox(
height: 25,
),
Divider( Divider(
color: Colors.grey, color: Colors.grey,
height: 2, height: 2,
@ -134,8 +140,10 @@ class LoginType extends StatelessWidget {
.pushNamed(FORGOT_PASSWORD) .pushNamed(FORGOT_PASSWORD)
}, },
child: AppText( child: AppText(
TranslationBase.of(context).forgotPassword, TranslationBase.of(context)
fontSize: SizeConfig.textMultiplier * 2.5, .forgotPassword,
fontSize:
SizeConfig.textMultiplier * 2.5,
marginTop: 20.0, marginTop: 20.0,
underline: true))) underline: true)))
]), ]),
@ -149,10 +157,11 @@ class LoginType extends StatelessWidget {
color: Colors.grey, color: Colors.grey,
height: 2, height: 2,
), ),
SizedBox(height: 10,), SizedBox(
height: 10,
),
Row( Row(
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
child: DefaultButton( child: DefaultButton(
TranslationBase.of(context).registerNow, TranslationBase.of(context).registerNow,
@ -167,6 +176,6 @@ class LoginType extends StatelessWidget {
], ],
)) ))
], ],
))); ))));
} }
} }

@ -153,18 +153,14 @@ class _Login extends State<Login> {
} }
void validateForm() { void validateForm() {
//TODO fix login if (util.validateIDBox(nationalIDorFile.text, loginType) == true &&
if (util.validateIDBox(nationalIDorFile.text, loginType) ==
true /*&&
mobileNo.length >= 9 */
&&
util.isSAUDIIDValid(nationalIDorFile.text, loginType) == true) { util.isSAUDIIDValid(nationalIDorFile.text, loginType) == true) {
setState(() { setState(() {
isButtonDisabled = false; isButtonDisabled = false;
}); });
} else { } else {
setState(() { setState(() {
isButtonDisabled = false; isButtonDisabled = true;
}); });
} }
} }

@ -105,22 +105,29 @@ class PrescriptionDetailsPage extends StatelessWidget {
color: Colors.white, color: Colors.white,
height: 30, height: 30,
width: double.infinity, width: double.infinity,
child: Center(child: Texts(TranslationBase.of(context).way))), child: Center(
child: Texts(TranslationBase.of(context).way))),
Container( Container(
color: Colors.white, color: Colors.white,
height: 30, height: 30,
width: double.infinity, width: double.infinity,
child: Center(child: Texts(TranslationBase.of(context).average))), child: Center(
child:
Texts(TranslationBase.of(context).average))),
Container( Container(
color: Colors.white, color: Colors.white,
height: 30, height: 30,
width: double.infinity, width: double.infinity,
child: Center(child: Texts(TranslationBase.of(context).dailyDoses))), child: Center(
child: Texts(
TranslationBase.of(context).dailyDoses))),
Container( Container(
color: Colors.white, color: Colors.white,
height: 30, height: 30,
width: double.infinity, width: double.infinity,
child: Center(child: Texts(TranslationBase.of(context).period))), child: Center(
child:
Texts(TranslationBase.of(context).period))),
], ],
), ),
TableRow( TableRow(
@ -136,7 +143,8 @@ class PrescriptionDetailsPage extends StatelessWidget {
height: 50, height: 50,
width: double.infinity, width: double.infinity,
child: Center( child: Center(
child: Text(prescriptionReport.frequencyN?? ''))), child:
Text(prescriptionReport.frequencyN ?? ''))),
Container( Container(
color: Colors.white, color: Colors.white,
height: 50, height: 50,
@ -174,7 +182,7 @@ class PrescriptionDetailsPage extends StatelessWidget {
SizedBox( SizedBox(
height: 5, height: 5,
), ),
Texts(prescriptionReport.remarks), Texts(prescriptionReport.remarks ?? ''),
], ],
), ),
), ),

@ -83,7 +83,7 @@ class _HomePrescriptionsPageState extends State<HomePrescriptionsPage>
controller: _tabController, controller: _tabController,
indicatorWeight: 5.0, indicatorWeight: 5.0,
indicatorSize: TabBarIndicatorSize.label, indicatorSize: TabBarIndicatorSize.label,
indicatorColor: Colors.red[800], indicatorColor: Theme.of(context).primaryColor,
labelColor: Theme.of(context).primaryColor, labelColor: Theme.of(context).primaryColor,
labelPadding: labelPadding:
EdgeInsets.only(top: 4.0, left: 18.0, right: 18.0), EdgeInsets.only(top: 4.0, left: 18.0, right: 18.0),

@ -37,7 +37,7 @@ class PrescriptionsPage extends StatelessWidget {
leading: Radio( leading: Radio(
value: FilterType.Clinic, value: FilterType.Clinic,
groupValue: prescriptionsViewModel.filterType, groupValue: prescriptionsViewModel.filterType,
activeColor: Colors.red[800], activeColor: Theme.of(context).primaryColor,
onChanged: (FilterType value) { onChanged: (FilterType value) {
prescriptionsViewModel.setFilterType(value); prescriptionsViewModel.setFilterType(value);
}, },
@ -55,7 +55,7 @@ class PrescriptionsPage extends StatelessWidget {
leading: Radio( leading: Radio(
value: FilterType.Hospital, value: FilterType.Hospital,
groupValue: prescriptionsViewModel.filterType, groupValue: prescriptionsViewModel.filterType,
activeColor: Colors.red[800], activeColor: Theme.of(context).primaryColor,
onChanged: (FilterType value) { onChanged: (FilterType value) {
prescriptionsViewModel.setFilterType(value); prescriptionsViewModel.setFilterType(value);
}, },

@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/core/viewModels/medical/radiology_view_mode
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -30,9 +31,20 @@ class RadiologyDetailsPage extends StatelessWidget {
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[ children: <Widget>[
Text('${finalRadiology.reportData}',textAlign: TextAlign.center,), Text(
'${finalRadiology.reportData}',
textAlign: TextAlign.center,
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Texts(
'${finalRadiology.reportData}',
textAlign: TextAlign.start,
fontSize: 17,
),
),
SizedBox( SizedBox(
height: 160.0, height: MediaQuery.of(context).size.height * 0.2,
) )
], ],
), ),

@ -173,7 +173,7 @@ class AuthProvider with ChangeNotifier {
request.generalid = GENERAL_ID; request.generalid = GENERAL_ID;
request.languageID = LANGUAGE_ID; request.languageID = LANGUAGE_ID;
request.patientOutSA = request.zipCode == '966' ? 0 : 1; request.patientOutSA = request.zipCode == '966' ? 0 : 1;
try {
dynamic localRes; dynamic localRes;
await new BaseAppClient().post(CHECK_PATIENT_AUTH, await new BaseAppClient().post(CHECK_PATIENT_AUTH,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
@ -182,6 +182,10 @@ class AuthProvider with ChangeNotifier {
throw error; throw error;
}, body: request.toJson()); }, body: request.toJson());
return Future.value(localRes); return Future.value(localRes);
} catch (error) {
throw error;
//throw error;
}
} }
Future<dynamic> getLoginInfo(request) async { Future<dynamic> getLoginInfo(request) async {

@ -946,6 +946,12 @@ String get fileno => localizedValues['fileno'][locale.languageCode];
String get labResult => localizedValues['labResult'][locale.languageCode]; String get labResult => localizedValues['labResult'][locale.languageCode];
String get details => localizedValues['details'][locale.languageCode]; String get details => localizedValues['details'][locale.languageCode];
String get age => localizedValues['age'][locale.languageCode]; String get age => localizedValues['age'][locale.languageCode];
String get activeInsurence => localizedValues['active-insurence'][locale.languageCode];
String get notActive => localizedValues['not-active'][locale.languageCode];
String get cardDetail => localizedValues['card-detail'][locale.languageCode];
String get dr => localizedValues['Dr'][locale.languageCode];
} }
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -86,8 +86,7 @@ class _VitalSignDetailsWidgetState extends State<LabResultDetailsWidget> {
color: Colors.white, color: Colors.white,
child: Center( child: Center(
child: Texts( child: Texts(
// '${DateUtil.getWeekDay(vital.vitalSignDate.weekday)}, ${vital.vitalSignDate.day} ${DateUtil.getMonth(vital.vitalSignDate.month)}, ${vital.vitalSignDate.year} ', '${vital.verifiedOn}',
'${vital.sampleCollectedOn}',
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
), ),

@ -96,7 +96,7 @@ class DoctorCard extends StatelessWidget {
Expanded( Expanded(
flex: 1, flex: 1,
child: LargeAvatar( child: LargeAvatar(
name: name, name:name,
url: profileUrl, url: profileUrl,
), ),
), ),
@ -108,7 +108,7 @@ class DoctorCard extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Texts( Texts(
name, TranslationBase.of(context).dr+" "+ name,
bold: true, bold: true,
), ),
Texts( Texts(

@ -826,13 +826,13 @@ class _FloatingSearchButton extends State<FloatingSearchButton>
speak() async { speak() async {
if (_currentLocaleId == 'en' && results['ReturnMessage'] != null) { if (_currentLocaleId == 'en' && results['ReturnMessage'] != null) {
await flutterTts.setVoice("en-us-x-sfg#male_2-local"); //await flutterTts.setVoice("en-us-x-sfg#male_2-local");
await flutterTts.setLanguage("en-US"); await flutterTts.setLanguage("en-US");
await flutterTts.speak(results['ReturnMessage']); await flutterTts.speak(results['ReturnMessage']);
} else if (results['ReturnMessage_Ar'] != null) { } else if (results['ReturnMessage_Ar'] != null) {
await flutterTts.setLanguage("ar-SA"); await flutterTts.setLanguage("ar-SA");
await flutterTts.setVoice("ar-sa-x-sfg#male_1-local"); //await flutterTts.setVoice("ar-sa-x-sfg#male_1-local");
await flutterTts.speak(results['ReturnMessage_Ar']); await flutterTts.speak(results['ReturnMessage_Ar']);
} }
// Future.delayed(const Duration(seconds: 10), () { // Future.delayed(const Duration(seconds: 10), () {

Loading…
Cancel
Save