Merge branch 'fatima_v2' into 'development_v2.5'

Fatima v2

See merge request Cloud_Solution/diplomatic-quarter!575
merge-update-with-lab-changes
haroon amjad 4 years ago
commit 0ac937aa7d

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/Addresses.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/Addresses.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/LacumAccountInformation.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/LacumAccountInformation.dart';
@ -97,7 +98,7 @@ class OrderModelViewModel extends BaseViewModel {
return res; return res;
} }
Future makeReview(PharmacyProduct product, double rating, String reviewText, context) async { Future makeReview(PharmacyProduct product, double rating, String reviewText) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _orderDetailsService.makeReview(product, rating, reviewText); await _orderDetailsService.makeReview(product, rating, reviewText);
if (_orderDetailsService.hasError) { if (_orderDetailsService.hasError) {
@ -106,7 +107,7 @@ class OrderModelViewModel extends BaseViewModel {
AppToast.showErrorToast(message: error); AppToast.showErrorToast(message: error);
} else { } else {
setState(ViewState.Idle); setState(ViewState.Idle);
AppToast.showSuccessToast(message: TranslationBase.of(context).submitReview); AppToast.showSuccessToast(message: TranslationBase.of(AppGlobal.context).submitReview);
// AppToast.showSuccessToast( // AppToast.showSuccessToast(
// message: "Your review has been Submitted successfully"); // message: "Your review has been Submitted successfully");
} }

@ -421,7 +421,7 @@ class _FinalProductsPageState extends State<FinalProductsPage> {
Column( Column(
children: [ children: [
Container( Container(
width: model.finalProducts[index].rxMessage != null ? MediaQuery.of(context).size.width / 4.3 : 0, width: model.finalProducts[index].rxMessage != null ? MediaQuery.of(context).size.width / 3.70 : 0,
padding: EdgeInsets.all(4), padding: EdgeInsets.all(4),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Color(0xffb23838), color: Color(0xffb23838),
@ -462,7 +462,7 @@ class _FinalProductsPageState extends State<FinalProductsPage> {
height: 4.0, height: 4.0,
), ),
Container( Container(
width: MediaQuery.of(context).size.width * 0.64, width: MediaQuery.of(context).size.width * 0.55,
child: Texts(projectViewModel.isArabic ? model.finalProducts[index].namen : model.finalProducts[index].name, child: Texts(projectViewModel.isArabic ? model.finalProducts[index].namen : model.finalProducts[index].name,
// model.finalProducts[index].name, // model.finalProducts[index].name,
regular: true, regular: true,

@ -36,6 +36,7 @@ class _ProductReviewPageState extends State<ProductReviewPage> {
isPharmacy: true, isPharmacy: true,
showPharmacyCart: false, showPharmacyCart: false,
showHomeAppBarIcon: false, showHomeAppBarIcon: false,
isBottomBar: true,
body: Container( body: Container(
color: Colors.white, color: Colors.white,
child: !finishReview ? SingleChildScrollView( child: !finishReview ? SingleChildScrollView(
@ -118,7 +119,7 @@ class _ProductReviewPageState extends State<ProductReviewPage> {
child: RichText( child: RichText(
text: TextSpan( text: TextSpan(
text: text:
'(${widget.product.approvedTotalReviews} reviews)', '(${widget.product.approvedTotalReviews} ${TranslationBase.of(context).reviews})',
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Colors.grey, color: Colors.grey,
@ -203,7 +204,7 @@ class _ProductReviewPageState extends State<ProductReviewPage> {
? () { ? () {
model model
.makeReview( .makeReview(
widget.product, ratingValue, reviewText, context) widget.product, ratingValue, reviewText)
.then((value) { .then((value) {
setState(() { setState(() {
finishReview = true; finishReview = true;

@ -1,10 +1,12 @@
import 'dart:io' show Platform; import 'dart:io' show Platform;
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.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/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter_svg/flutter_svg.dart';
import 'package:maps_launcher/maps_launcher.dart'; import 'package:maps_launcher/maps_launcher.dart';
import 'package:provider/provider.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
import 'package:map_launcher/map_launcher.dart'; import 'package:map_launcher/map_launcher.dart';
import 'dart:io' show Platform; import 'dart:io' show Platform;
@ -17,6 +19,7 @@ class pharmacyContactsPage extends StatefulWidget {
class _pharmacyContactsPageState extends State<pharmacyContactsPage> { class _pharmacyContactsPageState extends State<pharmacyContactsPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
final latitude = "24.704016"; final latitude = "24.704016";
final longitude = "46.676691"; final longitude = "46.676691";
final phone = "+966112833400"; final phone = "+966112833400";
@ -48,7 +51,7 @@ class _pharmacyContactsPageState extends State<pharmacyContactsPage> {
), ),
child: Container( child: Container(
margin: EdgeInsets.all(10), margin: EdgeInsets.all(10),
padding: EdgeInsets.fromLTRB(5, 15, 5, 15), padding: EdgeInsets.fromLTRB(5, 15, 5, 5),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
Radius.circular(15), Radius.circular(15),
@ -58,17 +61,82 @@ class _pharmacyContactsPageState extends State<pharmacyContactsPage> {
children: [ children: [
Padding( Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Container( child: projectViewModel.isArabic ?
child: Text(TranslationBase.of(context).contactUsTime, Column(
style: TextStyle( crossAxisAlignment: CrossAxisAlignment.start,
color: Colors.grey[700], children: [
fontSize: 16, Text("أوقات عمل مركز الخدمات الصيدلانية:",
fontWeight: FontWeight.w600, //TranslationBase.of(context).contactUsTime,
letterSpacing: -0.68)), style: TextStyle(
), color: Colors.grey[700],
fontSize: 18,
fontWeight: FontWeight.bold,
letterSpacing: -0.68)),
SizedBox(height: 8),
Text(" السبت - الأربعاء : من 8 صباحاً إلى 10 مساءً ",
//TranslationBase.of(context).contactUsTime,
style: TextStyle(
color: Colors.grey[700],
fontSize: 16,
fontWeight: FontWeight.w600,
letterSpacing: -0.68)),
SizedBox(height: 5),
Text("الــــخـــمــــيـــس : من 8 صباحاً إلى 8 مساءً",
//TranslationBase.of(context).contactUsTime,
style: TextStyle(
color: Colors.grey[700],
fontSize: 16,
fontWeight: FontWeight.w600,
letterSpacing: -0.68)),
SizedBox(height: 5),
Text("الـــجــــمـــــعـــــة : من 2 ظـهـراً إلى 8 مساءً",
//TranslationBase.of(context).contactUsTime,
style: TextStyle(
color: Colors.grey[700],
fontSize: 16,
fontWeight: FontWeight.w600,
letterSpacing: -0.68)),
],
):Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("Pharmaceutical Service Center working hours: ",
//TranslationBase.of(context).contactUsTime,
style: TextStyle(
color: Colors.grey[700],
fontSize: 16,
fontWeight: FontWeight.bold,
letterSpacing: -0.68)),
SizedBox(height: 8),
Text("Sat Wed: from 8 AM to 10 PM",
//TranslationBase.of(context).contactUsTime,
style: TextStyle(
color: Colors.grey[700],
fontSize: 16,
fontWeight: FontWeight.w600,
letterSpacing: -0.68)),
SizedBox(height: 5),
Text("Thursday: from 8 AM to 8 PM",
//TranslationBase.of(context).contactUsTime,
style: TextStyle(
color: Colors.grey[700],
fontSize: 16,
fontWeight: FontWeight.w600,
letterSpacing: -0.68)),
SizedBox(height: 5),
Text("Friday : from 2 PM to 8 PM",
//TranslationBase.of(context).contactUsTime,
style: TextStyle(
color: Colors.grey[700],
fontSize: 16,
fontWeight: FontWeight.w600,
letterSpacing: -0.68)),
],
),
), ),
SizedBox( SizedBox(
height: 35, height: 20,
), ),
Row( Row(
children: <Widget>[ children: <Widget>[
@ -94,7 +162,7 @@ class _pharmacyContactsPageState extends State<pharmacyContactsPage> {
SizedBox( SizedBox(
width: 30, width: 30,
), ),
Text("+966 " + " -11- 2833400", Text(projectViewModel.isArabic ? "2833400 " + " -11- 966+": "+966 " + " -11- 2833400",
style: TextStyle( style: TextStyle(
color: Colors.grey[700], color: Colors.grey[700],
fontSize: 16, fontSize: 16,
@ -130,7 +198,7 @@ class _pharmacyContactsPageState extends State<pharmacyContactsPage> {
SizedBox( SizedBox(
width: 30, width: 30,
), ),
Text("+966 " + " 558434444", Text(projectViewModel.isArabic ? "558434444 " + " 966+" :"+966 " + " 558434444",
style: TextStyle( style: TextStyle(
color: Colors.grey[700], color: Colors.grey[700],
fontSize: 16, fontSize: 16,

@ -70,7 +70,7 @@ class TextFields extends StatefulWidget {
this.onTap, this.onTap,
this.fontSize = 16.0, this.fontSize = 16.0,
this.fontWeight = FontWeight.w700, this.fontWeight = FontWeight.w700,
this.fillColor, this.fillColor,
this.hintColor}) this.hintColor})
: super(key: key); : super(key: key);
@ -209,7 +209,6 @@ class _TextFieldsState extends State<TextFields> {
blurRadius: focus ? 34.0 : 12.0) blurRadius: focus ? 34.0 : 12.0)
]), ]),
child: TextFormField( child: TextFormField(
keyboardAppearance: Theme.of(context).brightness, keyboardAppearance: Theme.of(context).brightness,
scrollPhysics: BouncingScrollPhysics(), scrollPhysics: BouncingScrollPhysics(),
textCapitalization: widget.textCapitalization, textCapitalization: widget.textCapitalization,
@ -239,23 +238,19 @@ class _TextFieldsState extends State<TextFields> {
.textTheme .textTheme
.bodyText1 .bodyText1
.copyWith(fontSize: widget.fontSize, fontWeight: widget.fontWeight), .copyWith(fontSize: widget.fontSize, fontWeight: widget.fontWeight),
inputFormatters: widget.keyboardType == TextInputType.phone inputFormatters: widget.keyboardType == TextInputType.phone
? <TextInputFormatter>[ ? <TextInputFormatter>[
FilteringTextInputFormatter.digitsOnly, FilteringTextInputFormatter.digitsOnly,
_mobileFormatter, _mobileFormatter,
] ]
: widget.inputFormatters, : widget.inputFormatters,
decoration: InputDecoration( decoration: InputDecoration(
counterText: "", counterText: "",
hintText: widget.hintText, hintText: widget.hintText,
hintStyle: TextStyle( hintStyle: TextStyle(
fontSize: widget.fontSize, fontSize: widget.fontSize,
fontWeight: widget.fontWeight, fontWeight: widget.fontWeight,
color: widget.hintColor ?? Theme.of(context).hintColor, color: widget.hintColor ?? Theme.of(context).hintColor,
), ),
contentPadding: widget.padding != null contentPadding: widget.padding != null
? widget.padding ? widget.padding

Loading…
Cancel
Save