Merge branch 'fix_design' into 'development'

Fix design

See merge request Cloud_Solution/diplomatic-quarter!235
merge-update-with-lab-changes
Mohammad Aljammal 5 years ago
commit b01e718ae3

@ -27,7 +27,7 @@ apply plugin: 'com.google.gms.google-services'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android { android {
compileSdkVersion 28 compileSdkVersion 30
sourceSets { sourceSets {
main.java.srcDirs += 'src/main/kotlin' main.java.srcDirs += 'src/main/kotlin'
@ -41,7 +41,7 @@ android {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.cloud.diplomaticquarterapp" applicationId "com.cloud.diplomaticquarterapp"
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 28 targetSdkVersion 30
versionCode flutterVersionCode.toInteger() versionCode flutterVersionCode.toInteger()
versionName flutterVersionName versionName flutterVersionName
multiDexEnabled true multiDexEnabled true

@ -68,12 +68,12 @@ class HMGUtils {
} }
} }
fun getGeoZonesFromPreference(context: Context):List<GeoZoneModel>{ fun getGeoZonesFromPreference(context: Context): List<GeoZoneModel> {
val pref = context.getSharedPreferences(PREFS_STORAGE, Context.MODE_PRIVATE) val pref = context.getSharedPreferences(PREFS_STORAGE, Context.MODE_PRIVATE)
val json = pref.getString(PREF_KEY_HMG_ZONES,"[]") val json = pref.getString(PREF_KEY_HMG_ZONES,"[]")
val geoZones = GeoZoneModel().listFrom(json) val geoZones = json?.let { GeoZoneModel().listFrom(it) }
return geoZones return geoZones!!
} }
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

@ -78,11 +78,19 @@ class _LandingPagePharmacyState extends State<LandingPagePharmacy> {
), ),
leading: Builder( leading: Builder(
builder: (BuildContext context) { builder: (BuildContext context) {
return Container( return InkWell(
height: 2.0, onTap: (){
width: 10.0, setState(() {
child: Image.asset( currentTab = 0;
'assets/images/pharmacy_logo.png', pageController.jumpToPage(0);
});
},
child: Container(
height: 2.0,
width: 10.0,
child: Image.asset(
'assets/images/pharmacy_logo.png',
),
), ),
); );
}, },
@ -135,6 +143,7 @@ class _LandingPagePharmacyState extends State<LandingPagePharmacy> {
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
controller: pageController, controller: pageController,
children: [ children: [
// TODO mosa_comeback
PharmacyPage(), PharmacyPage(),
PharmacyCategorisePage(), PharmacyCategorisePage(),
// OffersCategorisePage(), // OffersCategorisePage(),

@ -32,7 +32,7 @@ class LoginType extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Image.asset( Image.asset(
'assets/images/DQ/dq_logo_icon.png', 'assets/images/DQ/logo.png',
height: 90, height: 90,
width: 90, width: 90,
), ),

@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -36,7 +37,7 @@ class _WelcomeLogin extends State<WelcomeLogin> {
mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Image.asset('assets/images/DQ/dq_logo_icon.png', Image.asset('assets/images/DQ/logo.png',
height: 90, width: 90), height: 90, width: 90),
Text( Text(
TranslationBase.of(context).welcome, TranslationBase.of(context).welcome,
@ -75,7 +76,7 @@ class _WelcomeLogin extends State<WelcomeLogin> {
LOGIN_TYPE, LOGIN_TYPE,
), ),
}, },
color: Color(0xFF40ACC9), color: Color(0xFFc5272c),
textColor: Colors.white, textColor: Colors.white,
)) ))
], ],

@ -19,26 +19,21 @@ class CartOrderPage extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
final mediaQuery = MediaQuery.of(context); final mediaQuery = MediaQuery.of(context);
PreferredSizeWidget appBarWidget = final height = mediaQuery.size.height - 60 - mediaQuery.padding.top;
AppBarWidget(TranslationBase.of(context).shoppingCart, null, true);
final height = mediaQuery.size.height -
appBarWidget.preferredSize.height -
mediaQuery.padding.top;
return BaseView<OrderPreviewViewModel>( return BaseView<OrderPreviewViewModel>(
onModelReady: (model) => model.getOrderPreviewData(), onModelReady: (model) => model.getOrderPreviewData(),
builder: (_, model, wi) => ChangeNotifierProvider.value( builder: (_, model, wi) => ChangeNotifierProvider.value(
value: model.cartResponse, value: model.cartResponse,
child: AppScaffold( child: AppScaffold(
title: TranslationBase.of(context).shoppingCart, appBarTitle: TranslationBase.of(context).shoppingCart,
isShowAppBar: true, isShowAppBar: true,
isShowDecPage: false, isShowDecPage: false,
isPharmacy: true, isPharmacy: true,
baseViewModel: model, baseViewModel: model,
appBarWidget: appBarWidget,
backgroundColor: Colors.white, backgroundColor: Colors.white,
body: !(model.cartResponse.shoppingCarts == null || body: !(model.cartResponse.shoppingCarts == null ||
model.cartResponse.shoppingCarts.length == 0) model.cartResponse.shoppingCarts.length == 0)
? Container( ? Container(
height: height * 0.85, height: height * 0.85,
width: double.infinity, width: double.infinity,
@ -179,7 +174,29 @@ class CartOrderPage extends StatelessWidget {
), ),
), ),
) )
: Container(), : Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Padding(
padding: const EdgeInsets.all(8.0),
child: Image.asset(
'assets/images/new-design/empty_box.png',
width: 100,
height: 100,
fit: BoxFit.cover,
),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
'There is no data',
style: TextStyle(fontSize: 30),
),
)
],
),
),
bottomSheet: Container( bottomSheet: Container(
height: !(model.cartResponse.shoppingCarts == null || height: !(model.cartResponse.shoppingCarts == null ||
model.cartResponse.shoppingCarts.length == 0) model.cartResponse.shoppingCarts.length == 0)

@ -24,11 +24,9 @@ class OrderPreviewPage extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
PreferredSizeWidget appBarWidget =
AppBarWidget("${TranslationBase.of(context).checkOut}", null, true);
final mediaQuery = MediaQuery.of(context); final mediaQuery = MediaQuery.of(context);
final height = mediaQuery.size.height - final height = mediaQuery.size.height -
appBarWidget.preferredSize.height - 60 -
mediaQuery.padding.top; mediaQuery.padding.top;
return BaseView<OrderPreviewViewModel>( return BaseView<OrderPreviewViewModel>(
@ -36,11 +34,10 @@ class OrderPreviewPage extends StatelessWidget {
builder: (_, model, wi) => ChangeNotifierProvider.value( builder: (_, model, wi) => ChangeNotifierProvider.value(
value: model.paymentCheckoutData, value: model.paymentCheckoutData,
child: AppScaffold( child: AppScaffold(
title: "${TranslationBase.of(context).checkOut}", appBarTitle: "${TranslationBase.of(context).checkOut}",
isShowAppBar: true, isShowAppBar: true,
isPharmacy: true, isPharmacy: true,
isShowDecPage: false, isShowDecPage: false,
appBarWidget: appBarWidget,
backgroundColor: Colors.white, backgroundColor: Colors.white,
baseViewModel: model, baseViewModel: model,
body: Container( body: Container(

@ -34,7 +34,6 @@ class _LakumRegistrationPageState extends State<LakumRegistrationPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final mediaQuery = MediaQuery.of(context); final mediaQuery = MediaQuery.of(context);
PreferredSizeWidget appBarWidget = AppBarWidget("Lakum", null, true);
languages.clear(); languages.clear();
languages.add(IdNamePair(1, TranslationBase.of(context).arabic)); languages.add(IdNamePair(1, TranslationBase.of(context).arabic));
languages.add(IdNamePair(2, TranslationBase.of(context).english)); languages.add(IdNamePair(2, TranslationBase.of(context).english));
@ -49,19 +48,18 @@ class _LakumRegistrationPageState extends State<LakumRegistrationPage> {
return BaseView<LacumRegistrationViewModel>( return BaseView<LacumRegistrationViewModel>(
builder: (_, model, wi) => AppScaffold( builder: (_, model, wi) => AppScaffold(
title: "Register Lakum", appBarTitle:
"${TranslationBase.of(context).register} ${TranslationBase.of(context).lakum}",
isShowAppBar: true, isShowAppBar: true,
isShowDecPage: false, isShowDecPage: false,
backgroundColor: Colors.white, backgroundColor: Colors.white,
appBarWidget: appBarWidget,
baseViewModel: model, baseViewModel: model,
body: Container( body: Container(
width: double.infinity, width: double.infinity,
child: SingleChildScrollView( child: SingleChildScrollView(
child: SizedBox( child: SizedBox(
height: mediaQuery.size.height - height:
appBarWidget.preferredSize.height - mediaQuery.size.height - 60 - mediaQuery.padding.top,
mediaQuery.padding.top,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch, crossAxisAlignment: CrossAxisAlignment.stretch,
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,

@ -36,24 +36,22 @@ class _LakumSettingPageState extends State<LakumSettingPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final mediaQuery = MediaQuery.of(context); final mediaQuery = MediaQuery.of(context);
PreferredSizeWidget appBarWidget = AppBarWidget("Lakum", null, true);
return BaseView<LacumViewModel>( return BaseView<LacumViewModel>(
onModelReady: (model) => model.setLakumData( onModelReady: (model) => model.setLakumData(
widget.lacumInformation, widget.lacumGroupInformation), widget.lacumInformation, widget.lacumGroupInformation),
builder: (_, model, wi) => AppScaffold( builder: (_, model, wi) => AppScaffold(
title: "Lakum", appBarTitle: "${TranslationBase.of(context).lakum}",
isShowAppBar: true, isShowAppBar: true,
isShowDecPage: false, isShowDecPage: false,
backgroundColor: Colors.white, backgroundColor: Colors.white,
appBarWidget: appBarWidget,
baseViewModel: model, baseViewModel: model,
body: Container( body: Container(
width: double.infinity, width: double.infinity,
child: SingleChildScrollView( child: SingleChildScrollView(
child: SizedBox( child: SizedBox(
height: mediaQuery.size.height - height: mediaQuery.size.height -
appBarWidget.preferredSize.height - 60 -
mediaQuery.padding.top, mediaQuery.padding.top,
child: _buildSettingScreen(mediaQuery, model), child: _buildSettingScreen(mediaQuery, model),
), ),

@ -32,17 +32,15 @@ class _LacumTransferPageState extends State<LacumTransferPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final mediaQuery = MediaQuery.of(context); final mediaQuery = MediaQuery.of(context);
PreferredSizeWidget appBarWidget = AppBarWidget("Lakum", null, true);
return BaseView<LacumTranferViewModel>( return BaseView<LacumTranferViewModel>(
onModelReady: (model) => model.setLakumData( onModelReady: (model) => model.setLakumData(
widget.lacumInformation, widget.lacumGroupInformation), widget.lacumInformation, widget.lacumGroupInformation),
builder: (_, model, wi) => AppScaffold( builder: (_, model, wi) => AppScaffold(
title: "Lakum", appBarTitle: "${TranslationBase.of(context).lakum}",
isShowAppBar: true, isShowAppBar: true,
isShowDecPage: false, isShowDecPage: false,
backgroundColor: Colors.white, backgroundColor: Colors.white,
appBarWidget: appBarWidget,
baseViewModel: model, baseViewModel: model,
body: Container( body: Container(
width: double.infinity, width: double.infinity,

@ -19,21 +19,14 @@ class LakumTermsConditions extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectProvider = Provider.of(context); ProjectViewModel projectProvider = Provider.of(context);
final mediaQuery = MediaQuery.of(context);
PreferredSizeWidget appBarWidget = AppBarWidget("Lakum", null, true);
double height = mediaQuery.size.height -
appBarWidget.preferredSize.height -
mediaQuery.padding.top;
return BaseView<LacumRegistrationViewModel>( return BaseView<LacumRegistrationViewModel>(
onModelReady: (model) => model.getUserTermsAndConditionsForEPharmcy(), onModelReady: (model) => model.getUserTermsAndConditionsForEPharmcy(),
builder: (_, model, wi) => AppScaffold( builder: (_, model, wi) => AppScaffold(
appBarTitle: "Register Lakum", appBarTitle: "${TranslationBase.of(context).register} ${TranslationBase.of(context).lakum}",
isShowAppBar: true, isShowAppBar: true,
isShowDecPage: false, isShowDecPage: false,
backgroundColor: Colors.white, backgroundColor: Colors.white,
baseViewModel: model, baseViewModel: model,
appBarWidget: appBarWidget,
body: Container( body: Container(
margin: EdgeInsets.all(8), margin: EdgeInsets.all(8),
width: double.infinity, width: double.infinity,

@ -49,11 +49,9 @@ class _AddAddressPageState extends State<AddAddressPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
PreferredSizeWidget appBarWidget = AppBarWidget(
"${TranslationBase.of(context).changeAddress}", null, true);
final mediaQuery = MediaQuery.of(context); final mediaQuery = MediaQuery.of(context);
final height = mediaQuery.size.height - final height = mediaQuery.size.height -
appBarWidget.preferredSize.height - 60 -
mediaQuery.padding.top; mediaQuery.padding.top;
return BaseView<PharmacyAddressesViewModel>( return BaseView<PharmacyAddressesViewModel>(
@ -62,7 +60,6 @@ class _AddAddressPageState extends State<AddAddressPage> {
isShowAppBar: true, isShowAppBar: true,
isPharmacy: true, isPharmacy: true,
backgroundColor: Colors.white, backgroundColor: Colors.white,
appBarWidget: appBarWidget,
body: Container( body: Container(
height: height * 1, height: height * 1,
child: PickupLocationFromMap( child: PickupLocationFromMap(

@ -12,14 +12,12 @@ import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/pages/pharmacy/pharmacyAddresses/AddAddress.dart'; import 'package:diplomaticquarterapp/pages/pharmacy/pharmacyAddresses/AddAddress.dart';
class PharmacyAddressesPage extends StatefulWidget { class PharmacyAddressesPage extends StatefulWidget {
@override @override
_PharmacyAddressesState createState() => _PharmacyAddressesState(); _PharmacyAddressesState createState() => _PharmacyAddressesState();
} }
class _PharmacyAddressesState extends State<PharmacyAddressesPage> { class _PharmacyAddressesState extends State<PharmacyAddressesPage> {
void navigateToAddressPage( void navigateToAddressPage(
BuildContext ctx, PharmacyAddressesViewModel model, Addresses address) { BuildContext ctx, PharmacyAddressesViewModel model, Addresses address) {
Navigator.push( Navigator.push(
@ -31,12 +29,8 @@ class _PharmacyAddressesState extends State<PharmacyAddressesPage> {
} }
Widget build(BuildContext context) { Widget build(BuildContext context) {
PreferredSizeWidget appBarWidget = AppBarWidget(
"${TranslationBase.of(context).changeAddress}", null, true);
final mediaQuery = MediaQuery.of(context); final mediaQuery = MediaQuery.of(context);
final height = mediaQuery.size.height - final height = mediaQuery.size.height - 60 - mediaQuery.padding.top;
appBarWidget.preferredSize.height -
mediaQuery.padding.top;
return BaseView<PharmacyAddressesViewModel>( return BaseView<PharmacyAddressesViewModel>(
onModelReady: (model) => model.getAddressesList(), onModelReady: (model) => model.getAddressesList(),
@ -46,7 +40,6 @@ class _PharmacyAddressesState extends State<PharmacyAddressesPage> {
isPharmacy: true, isPharmacy: true,
baseViewModel: model, baseViewModel: model,
backgroundColor: Colors.white, backgroundColor: Colors.white,
appBarWidget: appBarWidget,
body: Container( body: Container(
height: height * 0.90, height: height * 0.90,
child: SingleChildScrollView( child: SingleChildScrollView(
@ -115,8 +108,8 @@ class _PharmacyAddressesState extends State<PharmacyAddressesPage> {
handler: () { handler: () {
model.saveSelectedAddressLocally( model.saveSelectedAddressLocally(
model.addresses[model.selectedAddressIndex]); model.addresses[model.selectedAddressIndex]);
Navigator.pop(context, Navigator.pop(
model.addresses[model.selectedAddressIndex]); context, model.addresses[model.selectedAddressIndex]);
}, },
), ),
), ),

@ -94,7 +94,7 @@ class _ProfilePageState extends State<PharmacyProfilePage> {
isShowAppBar:false, isShowAppBar:false,
isShowDecPage: false, isShowDecPage: false,
isPharmacy: true, isPharmacy: true,
body: Container( body: user != null ? Container(
child: SingleChildScrollView( child: SingleChildScrollView(
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
@ -125,499 +125,499 @@ class _ProfilePageState extends State<PharmacyProfilePage> {
), ),
Text( Text(
languageID == "ar" languageID == "ar"
? user.firstNameN.toString()+ " " + user.lastNameN.toString() ? user.firstNameN.toString()+ " " + user.lastNameN.toString()
: user.firstName.toString()+ " " + user.lastName.toString(), : user.firstName.toString()+ " " + user.lastName.toString(),
style: TextStyle( style: TextStyle(
fontSize: 14.0, fontWeight: FontWeight.bold), fontSize: 14.0, fontWeight: FontWeight.bold),
), ),
], ],
), ),
) )
], ],
),
), ),
), Divider(
Divider( color: Colors.grey[350],
color: Colors.grey[350], height: 20,
height: 20, thickness: 5,
thickness: 5, indent: 0,
indent: 0, endIndent: 0,
endIndent: 0, ),
), SizedBox(
SizedBox( height: 15,
height: 15, ),
), Container(
Container( child: Row(
child: Row( children: <Widget>[
children: <Widget>[ Expanded(
Expanded( child: InkWell(
child: InkWell( onTap: () {
onTap: () { if(customerId == null){
if(customerId == null){ AppToast.showErrorToast(message: "Customer not found");
AppToast.showErrorToast(message: "Customer not found"); return;
return; }
} Navigator.push(
Navigator.push( context,
context, MaterialPageRoute(
MaterialPageRoute( builder: (context) => OrderPage(customerID: customerId)));
builder: (context) => OrderPage(customerID: customerId))); },
}, child: Column(
child: Column( children: <Widget>[
children: <Widget>[
// Image(image: AssetImage('assets/images/pharmacy/orders_icon.svg')), // Image(image: AssetImage('assets/images/pharmacy/orders_icon.svg')),
SvgPicture.asset( SvgPicture.asset(
'assets/images/pharmacy/orders_icon.svg', 'assets/images/pharmacy/orders_icon.svg',
width: 50, width: 50,
height: 50, height: 50,
), ),
SizedBox( SizedBox(
height: 5, height: 5,
),
Text(
TranslationBase.of(context).orders,
style: TextStyle(
fontSize: 13.0,
fontWeight: FontWeight.bold,
),
),
],
),
), ),
Text( ),
TranslationBase.of(context).orders, Expanded(
style: TextStyle( child: InkWell(
fontSize: 13.0, onTap: () {
fontWeight: FontWeight.bold, Navigator.push(
context,
MaterialPageRoute(
builder: (context) => LakumMainPage()));
},
child: Column(
children: <Widget>[
SvgPicture.asset(
'assets/images/pharmacy/lakum_icon.svg',
width: 50,
height: 50,
),
SizedBox(
height: 5,
),
Text(
TranslationBase.of(context).lakum,
style: TextStyle(
fontSize: 13.0, fontWeight: FontWeight.bold),
),
],
), ),
), ),
], ),
), Expanded(
), child: InkWell(
), onTap: () {
Expanded( Navigator.push(
child: InkWell( context,
onTap: () { MaterialPageRoute(
Navigator.push( builder: (context) => WishlistPage()));
context, },
MaterialPageRoute( child: Column(
builder: (context) => LakumMainPage())); children: <Widget>[
}, SvgPicture.asset(
child: Column( 'assets/images/pharmacy/wishlist_icon.svg',
children: <Widget>[ width: 50,
SvgPicture.asset( height: 50,
'assets/images/pharmacy/lakum_icon.svg',
width: 50, ),SizedBox(
height: 50, height: 5,
),
Text(
TranslationBase.of(context).wishlist,
style: TextStyle(
fontSize: 13.0,
fontWeight: FontWeight.bold,
),
),
],
),
), ),
SizedBox( ),
height: 5, Expanded(
child: InkWell(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => MyReviewsPage()));
},child: Column(
children: <Widget>[
SvgPicture.asset(
'assets/images/pharmacy/review_icon.svg',
width: 50,
height: 50,
),
SizedBox(
height: 5,
),
Text(
TranslationBase.of(context).reviews,
style: TextStyle(
fontSize: 13.0,
fontWeight: FontWeight.bold,
),
),
],
), ),
Text(
TranslationBase.of(context).lakum,
style: TextStyle(
fontSize: 13.0, fontWeight: FontWeight.bold),
), ),
], ),
],
)),
SizedBox(
height: 15,
),
Divider(
color: Colors.grey[350],
height: 20,
thickness: 5,
indent: 0,
endIndent: 0,
),
SizedBox(
height: 10,
),
Container(
padding: EdgeInsets.only(left: 10.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
TranslationBase.of(context).myAccount,
style: TextStyle(
fontSize: 16.0, fontWeight: FontWeight.bold),
), ),
), SizedBox(
), height: 10,
Expanded(
child: InkWell(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => WishlistPage()));
},
child: Column(
children: <Widget>[
SvgPicture.asset(
'assets/images/pharmacy/wishlist_icon.svg',
width: 50,
height: 50,
),SizedBox(
height: 5,
),
Text(
TranslationBase.of(context).wishlist,
style: TextStyle(
fontSize: 13.0,
fontWeight: FontWeight.bold,
),
),
],
), ),
), Divider(
), color: Colors.grey,
Expanded( height: 20,
child: InkWell( ),
onTap: () { InkWell(
onTap: () {
Navigator.push( Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
builder: (context) => MyReviewsPage())); builder: (context) => HomePrescriptionsPage()));
},child: Column( },
children: <Widget>[ child: Row(
SvgPicture.asset( children: <Widget>[
'assets/images/pharmacy/review_icon.svg', SvgPicture.asset(
width: 50, 'assets/images/pharmacy/my_prescription_icon.svg',
height: 50, width: 28,
height: 28,
), ),
SizedBox( SizedBox(
height: 5, width: 15,
),
Text(
TranslationBase.of(context).reviews,
style: TextStyle(
fontSize: 13.0,
fontWeight: FontWeight.bold,
), ),
), Text(
], TranslationBase.of(context).myPrescription,
), style: TextStyle(
), fontSize: 13.0,
), ),
],
)),
SizedBox(
height: 15,
),
Divider(
color: Colors.grey[350],
height: 20,
thickness: 5,
indent: 0,
endIndent: 0,
),
SizedBox(
height: 10,
),
Container(
padding: EdgeInsets.only(left: 10.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
TranslationBase.of(context).myAccount,
style: TextStyle(
fontSize: 16.0, fontWeight: FontWeight.bold),
),
SizedBox(
height: 10,
),
Divider(
color: Colors.grey,
height: 20,
),
InkWell(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => HomePrescriptionsPage()));
},
child: Row(
children: <Widget>[
SvgPicture.asset(
'assets/images/pharmacy/my_prescription_icon.svg',
width: 28,
height: 28,
),
SizedBox(
width: 15,
),
Text(
TranslationBase.of(context).myPrescription,
style: TextStyle(
fontSize: 13.0,
), ),
), ],
], ),
), ),
), SizedBox(
SizedBox( height: 5,
height: 5, ),
), Divider(
Divider( color: Colors.grey,
color: Colors.grey, height: 20,
height: 20, ),
), InkWell(
InkWell( onTap: () {
onTap: () { Navigator.push(
Navigator.push( context,
context, MaterialPageRoute(
MaterialPageRoute( builder: (context) => ComparePage()));
builder: (context) => ComparePage())); },
}, child: Row(
child: Row( children: <Widget>[
children: <Widget>[ Image.asset('assets/images/pharmacy/compare.png',
Image.asset('assets/images/pharmacy/compare.png', width: 35, height: 35),
width: 35, height: 35), SizedBox(
SizedBox( width: 15,
width: 15,
),
Text(
TranslationBase.of(context).compare,
style: TextStyle(
fontSize: 13.0,
), ),
), Text(
], TranslationBase.of(context).compare,
style: TextStyle(
fontSize: 13.0,
),
),
],
),
), ),
), SizedBox(
SizedBox( height: 5,
height: 5, ),
), Divider(
Divider( color: Colors.grey,
color: Colors.grey, height: 20,
height: 20, ),
), InkWell(
InkWell( onTap: () {
onTap: () { Navigator.push(
Navigator.push( context,
context, MaterialPageRoute(
MaterialPageRoute( builder: (context) => HomePrescriptionsPage()));
builder: (context) => HomePrescriptionsPage())); },
}, child: Row(
child: Row( children: <Widget>[
children: <Widget>[ SvgPicture.asset(
SvgPicture.asset( 'assets/images/pharmacy/medication_refill_icon.svg',
'assets/images/pharmacy/medication_refill_icon.svg', width: 30,
width: 30, height: 30,
height: 30,
),
SizedBox(
width: 20,
),
Text(
TranslationBase.of(context).medicationsRefill,
style: TextStyle(
fontSize: 13.0,
), ),
), SizedBox(
], width: 20,
),
Text(
TranslationBase.of(context).medicationsRefill,
style: TextStyle(
fontSize: 13.0,
),
),
],
),
), ),
), SizedBox(
SizedBox( height: 5,
height: 5, ),
), Divider(
Divider( color: Colors.grey,
color: Colors.grey, height: 20,
height: 20, ),
), InkWell(
InkWell( onTap: () {
onTap: () { Navigator.push(
Navigator.push( context,
context, MaterialPageRoute(
MaterialPageRoute( builder: (context) => MyFamily()));
builder: (context) => MyFamily())); },
}, child: Row(
child: Row( children: <Widget>[
children: <Widget>[ SvgPicture.asset(
SvgPicture.asset( 'assets/images/pharmacy/my_family_icon.svg',
'assets/images/pharmacy/my_family_icon.svg', width: 20,
width: 20, height: 20,
height: 20,
),
SizedBox(
width: 20,
),
Text(
TranslationBase.of(context).family,
style: TextStyle(
fontSize: 13.0,
), ),
), SizedBox(
], width: 20,
),
Text(
TranslationBase.of(context).family,
style: TextStyle(
fontSize: 13.0,
),
),
],
),
),
SizedBox(
height: 5,
),
Divider(
color: Colors.grey,
height: 20,
), ),
), InkWell(
SizedBox( onTap: () {
height: 5, Navigator.push(
), context,
Divider( MaterialPageRoute(
color: Colors.grey, builder: (context) => PharmacyAddressesPage()));
height: 20, },
), child: Row(
InkWell( children: <Widget>[
onTap: () { SvgPicture.asset(
Navigator.push( 'assets/images/pharmacy/shipping_addresses_icon.svg',
context, width: 30,
MaterialPageRoute( height: 30,
builder: (context) => PharmacyAddressesPage()));
},
child: Row(
children: <Widget>[
SvgPicture.asset(
'assets/images/pharmacy/shipping_addresses_icon.svg',
width: 30,
height: 30,
), ),
SizedBox( SizedBox(
width: 20, width: 20,
),
Text(
TranslationBase.of(context).shippingAddresses,
style: TextStyle(
fontSize: 13.0,
), ),
), Text(
], TranslationBase.of(context).shippingAddresses,
style: TextStyle(
fontSize: 13.0,
),
),
],
),
), ),
), SizedBox(
SizedBox( height: 5,
height: 5, ),
), Divider(
Divider( color: Colors.grey,
color: Colors.grey, height: 20,
height: 20, ),
), InkWell(
InkWell( onTap: () {
onTap: () { Navigator.push(
Navigator.push( context,
context, MaterialPageRoute(
MaterialPageRoute( builder: (context) => PharmacyTermsConditions()));
builder: (context) => PharmacyTermsConditions())); },
}, child: Row(
child: Row( children: <Widget>[
children: <Widget>[ Image.asset('assets/images/pharmacy/terms.png',
Image.asset('assets/images/pharmacy/terms.png', width: 25,
width: 25, height: 25,
height: 25, ),
),
SizedBox( SizedBox(
width: 10, width: 10,
),
Text(
TranslationBase.of(context).conditionsHMG,
style: TextStyle(
fontSize: 13.0,
), ),
), Text(
], TranslationBase.of(context).conditionsHMG,
style: TextStyle(
fontSize: 13.0,
),
),
],
),
), ),
), SizedBox(
SizedBox( height: 5,
height: 5, ),
), Divider(
Divider( color: Colors.grey,
color: Colors.grey, height: 20,
height: 20, ),
), InkWell(
InkWell( onTap: () {
onTap: () { Navigator.push(
Navigator.push( context,
context, MaterialPageRoute(
MaterialPageRoute( builder: (context) => LakumTermsConditions(this.identificationNo, this.firstName, this.lastName,
builder: (context) => LakumTermsConditions(this.identificationNo, this.firstName, this.lastName, this.mobileNo, this.languageId)));
this.mobileNo, this.languageId))); },
}, child: Row(
child: Row( children: <Widget>[
children: <Widget>[ Image.asset('assets/images/pharmacy/terms.png',
Image.asset('assets/images/pharmacy/terms.png', width: 25,
width: 25, height: 25,
height: 25, ),
),
// IconButton(icon: Icon(Icons.error_outline), iconSize: 30, // IconButton(icon: Icon(Icons.error_outline), iconSize: 30,
// color: Colors.black,), // color: Colors.black,),
SizedBox( SizedBox(
width: 10, width: 10,
),
Text(
TranslationBase.of(context).conditions,
style: TextStyle(
fontSize: 13.0,
), ),
), Text(
], TranslationBase.of(context).conditions,
style: TextStyle(
fontSize: 13.0,
),
),
],
),
), ),
), ],
], ),
), ),
), SizedBox(
SizedBox( height: 10,
height: 10, ),
), Divider(
Divider( color: Colors.grey[350],
color: Colors.grey[350], height: 20,
height: 20, thickness: 5,
thickness: 5, indent: 0,
indent: 0, endIndent: 0,
endIndent: 0, ),
), SizedBox(
SizedBox( height: 10,
height: 10, ),
), Container(
Container( padding: EdgeInsets.only(left: 10.0),
padding: EdgeInsets.only(left: 10.0), child: Column(
child: Column( crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[
children: <Widget>[ Text(
Text( TranslationBase.of(context).reachUs,
TranslationBase.of(context).reachUs, style: TextStyle(
style: TextStyle( fontSize: 16.0, fontWeight: FontWeight.bold),
fontSize: 16.0, fontWeight: FontWeight.bold),
),
SizedBox(
height: 5,
),
Divider(
color: Colors.grey,
height: 20,
),
InkWell(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => LiveChatPage()));
},
child: Row(
children: <Widget>[
SvgPicture.asset(
'assets/images/pharmacy/contact_us_icon.svg',
width: 20,
height: 20,
),
SizedBox(
width: 20,
),
Text(
TranslationBase.of(context).contactUs,
style: TextStyle(fontSize: 13.0),
),
],
), ),
), SizedBox(
SizedBox( height: 5,
height: 5,
),
Divider(
color: Colors.grey,
height: 20,
),
InkWell(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => FindUsPage()));
},
child: Row(
children: <Widget>[
SvgPicture.asset(
'assets/images/pharmacy/our_locations_icon.svg',
width: 30,
height: 30,
),
SizedBox(
width: 20,
),
Text(
TranslationBase.of(context).ourLocations,
style: TextStyle(fontSize: 13.0),
),
],
), ),
) Divider(
], color: Colors.grey,
), height: 20,
) ),
], InkWell(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => LiveChatPage()));
},
child: Row(
children: <Widget>[
SvgPicture.asset(
'assets/images/pharmacy/contact_us_icon.svg',
width: 20,
height: 20,
),
SizedBox(
width: 20,
),
Text(
TranslationBase.of(context).contactUs,
style: TextStyle(fontSize: 13.0),
),
],
),
),
SizedBox(
height: 5,
),
Divider(
color: Colors.grey,
height: 20,
),
InkWell(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => FindUsPage()));
},
child: Row(
children: <Widget>[
SvgPicture.asset(
'assets/images/pharmacy/our_locations_icon.svg',
width: 30,
height: 30,
),
SizedBox(
width: 20,
),
Text(
TranslationBase.of(context).ourLocations,
style: TextStyle(fontSize: 13.0),
),
],
),
)
],
),
)
],
),
), ),
), ) : Container(),
),
)); ));
}} }}

@ -168,20 +168,28 @@ class LineChartCurvedState extends State<LineChartCurved> {
double getMaxY() { double getMaxY() {
double max = 0; double max = 0;
widget.labResult.forEach((element) { widget.labResult.forEach((element) {
try{
double resultValueDouble = double.parse(element.resultValue); double resultValueDouble = double.parse(element.resultValue);
if (resultValueDouble > max) max = resultValueDouble; if (resultValueDouble > max) max = resultValueDouble;}
catch(e){
print(e);
}
}); });
return max.roundToDouble(); return max.roundToDouble();
} }
double getMinY() { double getMinY() {
double min = double.parse(widget.labResult[0].resultValue); double min = 0;
try{
min = double.parse(widget.labResult[0].resultValue);
widget.labResult.forEach((element) { widget.labResult.forEach((element) {
double resultValueDouble = double.parse(element.resultValue); double resultValueDouble = double.parse(element.resultValue);
if (resultValueDouble < min) min = resultValueDouble; if (resultValueDouble < min) min = resultValueDouble;
}); });}catch(e){
print(e);
}
int value = min.toInt(); int value = min.toInt();
return value.toDouble(); return value.toDouble();
@ -190,8 +198,14 @@ class LineChartCurvedState extends State<LineChartCurved> {
List<LineChartBarData> getData() { List<LineChartBarData> getData() {
List<FlSpot> spots = List(); List<FlSpot> spots = List();
for (int index = 0; index < widget.labResult.length; index++) { for (int index = 0; index < widget.labResult.length; index++) {
try{
var resultValueDouble = double.parse(widget.labResult[index].resultValue); var resultValueDouble = double.parse(widget.labResult[index].resultValue);
spots.add(FlSpot(index.toDouble(), resultValueDouble)); spots.add(FlSpot(index.toDouble(), resultValueDouble));
}catch(e){
print(e);
spots.add(FlSpot(index.toDouble(), 0.0));
}
} }
final LineChartBarData lineChartBarData1 = LineChartBarData( final LineChartBarData lineChartBarData1 = LineChartBarData(

@ -77,7 +77,7 @@ class _AppDrawerState extends State<AppDrawer> {
children: <Widget>[ children: <Widget>[
Container( Container(
child: child:
Image.asset('assets/images/DQ/DQ_logo.png'), Image.asset('assets/images/DQ/logo_big.png'),
margin: EdgeInsets.all( margin: EdgeInsets.all(
SizeConfig.imageSizeMultiplier * 4), SizeConfig.imageSizeMultiplier * 4),
), ),
@ -95,7 +95,7 @@ class _AppDrawerState extends State<AppDrawer> {
EdgeInsets.only(right: 0), EdgeInsets.only(right: 0),
child: Icon( child: Icon(
Icons.account_circle, Icons.account_circle,
color: Color(0xFF40ACC9), color: Color(0xFFc5272c),
size: 28, size: 28,
)), )),
Padding( Padding(
@ -105,7 +105,7 @@ class _AppDrawerState extends State<AppDrawer> {
user.firstName + user.firstName +
' ' + ' ' +
user.lastName, user.lastName,
color: Color(0xFF40ACC9), color: Color(0xFFc5272c),
)) ))
], ],
), ),
@ -124,7 +124,7 @@ class _AppDrawerState extends State<AppDrawer> {
": " + ": " +
user.patientID user.patientID
.toString(), .toString(),
color: Color(0xFF40ACC9), color: Color(0xFFc5272c),
fontSize: SizeConfig fontSize: SizeConfig
.textMultiplier * .textMultiplier *
1.5, 1.5,
@ -161,8 +161,8 @@ class _AppDrawerState extends State<AppDrawer> {
child: DrawerItem( child: DrawerItem(
TranslationBase.of(context).family, TranslationBase.of(context).family,
Icons.group, Icons.group,
textColor: Color(0xFF40ACC9), textColor: Color(0xFFc5272c),
iconColor: Color(0xFF40ACC9), iconColor: Color(0xFFc5272c),
bottomLine: false, bottomLine: false,
sideArrow: true, sideArrow: true,
), ),
@ -225,7 +225,7 @@ class _AppDrawerState extends State<AppDrawer> {
Icons Icons
.account_circle, .account_circle,
color: Color( color: Color(
0xFF40ACC9), 0xFFc5272c),
size: size:
24, 24,
), ),
@ -273,15 +273,15 @@ class _AppDrawerState extends State<AppDrawer> {
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
child: Icon(Icons.account_circle, color: result.responseID == user.patientID ? Color(0xFF40ACC9) : Colors.black), child: Icon(Icons.account_circle, color: result.responseID == user.patientID ? Color(0xFFc5272c) : Colors.black),
), ),
Expanded( Expanded(
flex: 7, flex: 7,
child: Padding( child: Padding(
padding: EdgeInsets.only(left: 5, right: 5), padding: EdgeInsets.only(left: 5, right: 5),
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[ child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[
AppText(result.patientName, color: result.responseID == user.patientID ? Color(0xFF40ACC9) : Colors.black), AppText(result.patientName, color: result.responseID == user.patientID ? Color(0xFFc5272c) : Colors.black),
AppText(TranslationBase.of(context).fileno + ": " + result.responseID.toString(), color: result.responseID == user.patientID ? Color(0xFF40ACC9) : Colors.black), AppText(TranslationBase.of(context).fileno + ": " + result.responseID.toString(), color: result.responseID == user.patientID ? Color(0xFFc5272c) : Colors.black),
]))), ]))),
], ],
)))) ))))

@ -46,7 +46,6 @@ class AppScaffold extends StatelessWidget {
final Color backgroundColor; final Color backgroundColor;
final double preferredSize; final double preferredSize;
final List<Widget> appBarIcons; final List<Widget> appBarIcons;
final PreferredSizeWidget appBarWidget;
final List<ImagesInfo> imagesInfo; final List<ImagesInfo> imagesInfo;
AuthenticatedUserObject authenticatedUserObject = AuthenticatedUserObject authenticatedUserObject =
@ -69,25 +68,18 @@ class AppScaffold extends StatelessWidget {
this.backgroundColor, this.backgroundColor,
this.preferredSize = 0.0, this.preferredSize = 0.0,
this.appBarIcons, this.appBarIcons,
this.appBarWidget,
this.image, this.image,
this.infoList, this.imagesInfo}); this.infoList, this.imagesInfo});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
AppGlobal.context = context; AppGlobal.context = context;
ProjectViewModel projectViewModel = Provider.of<ProjectViewModel>(context);
AppGlobal.context = context;
PreferredSizeWidget appBar;
return Scaffold( return Scaffold(
backgroundColor: backgroundColor:
backgroundColor ?? Theme.of(context).scaffoldBackgroundColor, backgroundColor ?? Theme.of(context).scaffoldBackgroundColor,
appBar: isShowAppBar? AppBarWidget( appBar: isShowAppBar? AppBarWidget(
appBarTitle, appBarTitle:appBarTitle,
appBarIcons, appBarIcons:appBarIcons,
isShowAppBar,
isPharmacy: isPharmacy, isPharmacy: isPharmacy,
isShowDecPage: isShowDecPage, isShowDecPage: isShowDecPage,
image: image, image: image,
@ -95,22 +87,17 @@ class AppScaffold extends StatelessWidget {
body: (!Provider.of<ProjectViewModel>(context, listen: false).isLogin && body: (!Provider.of<ProjectViewModel>(context, listen: false).isLogin &&
isShowDecPage) isShowDecPage)
? NotAutPage( ? NotAutPage(
title: appBarTitle, title: title ?? appBarTitle,
description: description, description: description,
infoList: infoList, infoList: infoList,
imagesInfo: imagesInfo, imagesInfo: imagesInfo,
) )
: baseViewModel != null : baseViewModel != null
? NetworkBaseView( ? NetworkBaseView(
child: buildBodyWidget(), child: body,
baseViewModel: baseViewModel, baseViewModel: baseViewModel,
) )
: buildBodyWidget(), : body,
bottomSheet: bottomSheet,
//floatingActionButton: floatingActionButton ?? floatingActionButton,
// bottomNavigationBar:
// this.isBottomBar == true ? BottomBarSearch() : SizedBox()
// floatingActionButton: FloatingSearchButton(),
); );
} }
@ -118,12 +105,6 @@ class AppScaffold extends StatelessWidget {
return isLoading ? AppLoaderWidget() : Container(); return isLoading ? AppLoaderWidget() : Container();
} }
buildBodyWidget() {
// return body; //Stack(children: <Widget>[body, buildAppLoaderWidget(isLoading)]);
return Stack(children: <Widget>[
body, /*FloatingSearchButton()*/
]);
}
} }
class AppBarWidget extends StatelessWidget with PreferredSizeWidget { class AppBarWidget extends StatelessWidget with PreferredSizeWidget {
@ -132,13 +113,12 @@ class AppBarWidget extends StatelessWidget with PreferredSizeWidget {
final String appBarTitle; final String appBarTitle;
final List<Widget> appBarIcons; final List<Widget> appBarIcons;
final bool isShowAppBar;
final bool isPharmacy; final bool isPharmacy;
final bool isShowDecPage; final bool isShowDecPage;
final String image; final String image;
AppBarWidget(this.appBarTitle, this.appBarIcons, this.isShowAppBar, AppBarWidget({this.appBarTitle, this.appBarIcons,
{this.isPharmacy = true, this.isShowDecPage = true, this.image}); this.isPharmacy = true, this.isShowDecPage = true, this.image});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -147,8 +127,7 @@ class AppBarWidget extends StatelessWidget with PreferredSizeWidget {
Widget buildAppBar(BuildContext context) { Widget buildAppBar(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
return isShowAppBar return AppBar(
? AppBar(
elevation: 0, elevation: 0,
backgroundColor: backgroundColor:
isPharmacy ? Colors.green : Theme.of(context).appBarTheme.color, isPharmacy ? Colors.green : Theme.of(context).appBarTheme.color,
@ -194,10 +173,7 @@ class AppBarWidget extends StatelessWidget with PreferredSizeWidget {
), ),
if (appBarIcons != null) ...appBarIcons if (appBarIcons != null) ...appBarIcons
], ],
)
: Container(
height: 0,
width: 0,
); );
} }

Loading…
Cancel
Save