diff --git a/android/app/build.gradle b/android/app/build.gradle index 54ea9373..d3e44cb9 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -72,9 +72,12 @@ flutter { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - implementation "com.google.firebase:firebase-messaging:20.3.0" + implementation "com.google.firebase:firebase-messaging:21.0.0" +// implementation ('com.google.firebase:firebase-inappmessaging-display:19.1.2',{ +// exclude group: 'com.google.protobuf',module: 'protobuf-javalite' +// exclude group: 'com.google.protobuf',module: 'protobuf-lite' +// }) implementation 'pub.devrel:easypermissions:0.4.0' - implementation 'com.google.firebase:firebase-inappmessaging-display:17.2.0' implementation 'com.google.guava:guava:27.0.1-android' // Dependency on local binaries implementation fileTree(dir: 'libs', include: ['*.jar']) diff --git a/android/build.gradle b/android/build.gradle index 8e56476b..433bc8ad 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -8,7 +8,7 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:4.0.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - classpath 'com.google.gms:google-services:4.3.2' + classpath 'com.google.gms:google-services:4.3.4' } } diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index 5660070d..c935be88 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip diff --git a/lib/config/config.dart b/lib/config/config.dart index d3fda732..3269962b 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -410,6 +410,7 @@ const GET_PATIENT_ALL_PRES_ORD = 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; const PATIENT_ER_INSERT_PRES_ORDER = 'Services/Patients.svc/REST/PatientER_InsertPresOrder'; +const PHARMACY_MAKE_REVIEW = 'epharmacy/api/insertreviews'; // External API const ADD_ADDRESS_INFO = diff --git a/lib/core/model/pharmacies/order_model.dart b/lib/core/model/pharmacies/order_model.dart index a82b8716..027d1f81 100644 --- a/lib/core/model/pharmacies/order_model.dart +++ b/lib/core/model/pharmacies/order_model.dart @@ -1,6 +1,8 @@ import 'dart:convert'; +import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyImageObject.dart'; + List orderModelFromJson(String str) => List.from(json.decode(str).map((x) => OrderModel.fromJson(x))); String orderModelToJson(List data) => json.encode(List.from(data.map((x) => x.toJson()))); @@ -855,7 +857,7 @@ class Product { dynamic storeIds; dynamic manufacturerIds; List reviews; - List images; + List images; dynamic attributes; dynamic specifications; dynamic associatedProductIds; @@ -968,7 +970,7 @@ class Product { storeIds: json["store_ids"], manufacturerIds: json["manufacturer_ids"], reviews: List.from(json["reviews"].map((x) => Review.fromJson(x))), - images: List.from(json["images"].map((x) => Image.fromJson(x))), + images: List.from(json["images"].map((x) => PharmacyImageObject.fromJson(x))), attributes: json["attributes"], specifications: json["specifications"], associatedProductIds: json["associated_product_ids"], @@ -1092,38 +1094,6 @@ class Product { }; } -class Image { - Image({ - this.id, - this.position, - this.src, - this.thumb, - this.attachment, - }); - - dynamic id; - dynamic position; - String src; - String thumb; - String attachment; - - factory Image.fromJson(Map json) => Image( - id: json["id"], - position: json["position"], - src: json["src"], - thumb: json["thumb"], - attachment: json["attachment"], - ); - - Map toJson() => { - "id": id, - "position": position, - "src": src, - "thumb": thumb, - "attachment": attachment, - }; -} - enum ProductType { SIMPLE_PRODUCT } final productTypeValues = EnumValues({ diff --git a/lib/core/viewModels/pharmacyModule/order_model_view_model.dart b/lib/core/viewModels/pharmacyModule/order_model_view_model.dart index 3ee6d0cf..b7ddb528 100644 --- a/lib/core/viewModels/pharmacyModule/order_model_view_model.dart +++ b/lib/core/viewModels/pharmacyModule/order_model_view_model.dart @@ -1,4 +1,3 @@ - import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/Addresses.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/LacumAccountInformation.dart'; @@ -17,14 +16,16 @@ import '../../../locator.dart'; import '../base_view_model.dart'; class OrderModelViewModel extends BaseViewModel { - OrderService _orderService = locator(); + List get order => _orderService.orderList; OrderDetailsService _orderDetailsService = locator(); + List get orderDetails => _orderDetailsService.orderDetails; CancelOrderService _cancelOrderService = locator(); + List get cancelOrder => _cancelOrderService.cancelOrderList; @@ -39,7 +40,7 @@ class OrderModelViewModel extends BaseViewModel { Future getOrder(customerId, pageID) async { - print("this is customer id"+ customerId); + print("this is customer id" + customerId); setState(ViewState.Busy); await _orderService.getOrder(customerId, pageID); if (_orderService.hasError) { @@ -49,7 +50,6 @@ class OrderModelViewModel extends BaseViewModel { //order = _orderService.orderList; setState(ViewState.Idle); } - } Future getOrderDetails(orderId) async { @@ -63,9 +63,20 @@ class OrderModelViewModel extends BaseViewModel { } } + Future getProductReview() async { + setState(ViewState.Busy); + // await _orderService.getProductReview(); + if (_orderService.hasError) { + error = _orderService.error; + setState(ViewState.Error); + } else { + //order = _orderService.orderList; + setState(ViewState.Idle); + } + } Future getCanceledOrder(order, context) async { - print("this is order id"+ order); + print("this is order id" + order); setState(ViewState.Busy); dynamic res; await _cancelOrderService.getCanceledOrder(order).then((value) { @@ -73,14 +84,13 @@ class OrderModelViewModel extends BaseViewModel { print(value['success']['SuccessEndUserMsg']); AppToast.showSuccessToast(message: "Request Sent Successfully"); // Navigator.pop(context); - }); if (_cancelOrderService.hasError) { error = _cancelOrderService.error; setState(ViewState.Error); AppToast.showErrorToast(message: error); } else { - setState(ViewState.Idle); + setState(ViewState.Idle); // AppToast.showSuccessToast(message: "Request Sent Successfully"); // Navigator.push(context, // MaterialPageRoute(builder: (context) => OrderPage())); @@ -88,9 +98,21 @@ class OrderModelViewModel extends BaseViewModel { } return res; - } + Future makeReview(Product product, double rating, String reviewText) async { + setState(ViewState.Busy); + await _orderDetailsService.makeReview(product, rating, reviewText); + if (_orderDetailsService.hasError) { + error = _orderDetailsService.error; + setState(ViewState.Error); + AppToast.showErrorToast(message: error); + } else { + setState(ViewState.Idle); + AppToast.showSuccessToast( + message: "Your review has been Submitted successfully"); + } + } Future makeOrder() async { setState(ViewState.Busy); await _orderServices.makeOrder(paymentCheckoutData, cartResponse.shoppingCarts); @@ -102,4 +124,4 @@ class OrderModelViewModel extends BaseViewModel { } } -} \ No newline at end of file +} diff --git a/lib/pages/pharmacy/order/OrderDetails.dart b/lib/pages/pharmacy/order/OrderDetails.dart index b7d92543..9119a21f 100644 --- a/lib/pages/pharmacy/order/OrderDetails.dart +++ b/lib/pages/pharmacy/order/OrderDetails.dart @@ -1,19 +1,18 @@ - import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/order_model_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/pharmacy/order/Order.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; -import 'package:flutter/material.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:diplomaticquarterapp/widgets//pharmacy/product_tile.dart'; -import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; -import 'package:diplomaticquarterapp/services/pharmacy_services/orderDetails_service.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/order_model.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:flutter/src/widgets/image.dart' as flutterImage; + import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:provider/provider.dart'; @@ -23,27 +22,29 @@ import 'package:provider/provider.dart'; dynamic languageID; class OrderDetailsPage extends StatefulWidget { + var languageID; + OrderModel orderModel; - OrderDetailsPage({ - @required this.orderModel -}); + + OrderDetailsPage({@required this.orderModel}); @override _OrderDetailsPageState createState() => _OrderDetailsPageState(); } class _OrderDetailsPageState extends State { - getLanguageID() async { languageID = await sharedPref.getString(APP_LANGUAGE); } // AppSharedPreferences sharedPref = AppSharedPreferences(); - String orderId=""; + String orderId = ""; String customerId; - List orderList = [] ; - List cancelledOrderList = []; + List orderList = []; + + List cancelledOrderList = []; + // String orderId="3516"; var model; var isCancel = false; @@ -51,11 +52,12 @@ class _OrderDetailsPageState extends State { var dataIsCancel; var dataIsRefund; - @override void initState() { getLanguageID(); super.initState(); + print(widget.orderModel.orderItems.length); + getLanguageID(); print(widget.orderModel.orderItems.length); getCancelOrder(widget.orderModel.id); // cancelOrderDetail(order) @@ -64,115 +66,137 @@ class _OrderDetailsPageState extends State { @override Widget build(BuildContext context) { return BaseView( - onModelReady:(model) => model.getOrderDetails(widget.orderModel.id), - builder: (_,model, wi )=> AppScaffold( + onModelReady: (model) => model.getOrderDetails(widget.orderModel.id), + builder: (_, model, wi) => AppScaffold( appBarTitle: TranslationBase.of(context).orderDetail, isShowAppBar: true, - isPharmacy:true , + isPharmacy: true, body: Container( color: Colors.white, child: SingleChildScrollView( child: Column( - children: [ + children: [ Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Container( - margin: EdgeInsets.fromLTRB(10.0, 15.0, 1.0, 5.0), - child: Row( - children: [ - SvgPicture.asset( - 'assets/images/pharmacy/shipping_mark_icon.svg', - width: 28, - height: 28,), - Text(TranslationBase.of(context).shippingAddress, - style: TextStyle(fontSize: 13.0, fontWeight: FontWeight.bold, - ), - ), - ], - ), - ), - Container( - - margin: EdgeInsets.only(top: 15.0, right: 10.0), - padding: EdgeInsets.only(left: 11.0, right: 11.0), - decoration: BoxDecoration( - border: Border.all( - color: getStatusBackgroundColor(), - style: BorderStyle.solid, - width: 5.0, + children: [ + Container( + margin: EdgeInsets.fromLTRB(10.0, 15.0, 1.0, 5.0), + child: Row( + children: [ + SvgPicture.asset( + 'assets/images/pharmacy/shipping_mark_icon.svg', + width: 28, + height: 28, + ), + Text( + TranslationBase.of(context).shippingAddress, + style: TextStyle( + fontSize: 13.0, + fontWeight: FontWeight.bold, ), + ), + ], + ), + ), + Container( + margin: EdgeInsets.only(top: 15.0, right: 10.0), + padding: EdgeInsets.only(left: 11.0, right: 11.0), + decoration: BoxDecoration( + border: Border.all( color: getStatusBackgroundColor(), - borderRadius: BorderRadius.circular(30.0) - ), - child: Text( + style: BorderStyle.solid, + width: 5.0, + ), + color: getStatusBackgroundColor(), + borderRadius: BorderRadius.circular(30.0)), + child: Text( // widget.orderModel.orderStatus.toString().substring(12), // languageID == "ar" // ? widget.orderModel.orderStatusn.toString(): - widget.orderModel.orderStatus.toString().substring(12) , + widget.orderModel.orderStatus.toString().substring(12) , // TranslationBase.of(context).delivered, - style: TextStyle( - color: Colors.white, - fontSize: 13.0, - fontWeight: FontWeight.bold, - ), + style: TextStyle( + color: Colors.white, + fontSize: 13.0, + fontWeight: FontWeight.bold, ), ), + ), ], ), Container( margin: EdgeInsets.only(left: 10.0, top: 13.0), child: Row( crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text(widget.orderModel.shippingAddress.firstName.toString().substring(10) + ' ' +model.order[0].shippingAddress.lastName.toString().substring(9), - style: TextStyle(fontSize: 15.0, fontWeight: FontWeight.bold, - ), - ), - ] - ), + children: [ + Text( + widget.orderModel.shippingAddress.firstName + .toString() + .substring(10) + + ' ' + + model.order[0].shippingAddress.lastName + .toString() + .substring(9), + style: TextStyle( + fontSize: 15.0, + fontWeight: FontWeight.bold, + ), + ), + ]), ), Container( margin: EdgeInsets.fromLTRB(11.0, 5.0, 1.0, 5.0), - child: Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text(widget.orderModel.shippingAddress.address1.toString().substring(9), - style: TextStyle(fontSize: 10.0, fontWeight: FontWeight.bold, - color: Colors.grey, - ), - ), - ], + child: Text( + widget.orderModel.shippingAddress.address1 + .toString() + .substring(9), + style: TextStyle( + fontSize: 10.0, + fontWeight: FontWeight.bold, + color: Colors.grey, + ), ), ), Container( margin: EdgeInsets.fromLTRB(10.0, 5.0, 1.0, 5.0), child: Row( crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text(widget.orderModel.shippingAddress.address2.toString().substring(9) - + ' ' + widget.orderModel.shippingAddress.country.toString() - + ' ' + widget.orderModel.shippingAddress.zipPostalCode.toString(), - style: TextStyle(fontSize: 10.0, fontWeight: FontWeight.bold, - color: Colors.grey, - ), - ), - ] - ), + children: [ + Text( + widget.orderModel.shippingAddress.address2 + .toString() + .substring(9) + + ' ' + + widget.orderModel.shippingAddress.country + .toString() + + ' ' + + widget.orderModel.shippingAddress.zipPostalCode + .toString(), + style: TextStyle( + fontSize: 10.0, + fontWeight: FontWeight.bold, + color: Colors.grey, + ), + ), + ]), ), Container( child: Row( - children: [ + children: [ Container( margin: EdgeInsets.fromLTRB(10.0, 5.0, 8.0, 5.0), child: SvgPicture.asset( 'assets/images/pharmacy/mobile_number_icon.svg', - height: 13,), + height: 13, + ), ), Container( margin: EdgeInsets.only(top: 5.0, bottom: 5.0), - child: Text(widget.orderModel.shippingAddress.phoneNumber.toString(), - style: TextStyle(fontSize: 15.0, + child: Text( + widget.orderModel.shippingAddress.phoneNumber + .toString(), + style: TextStyle( + fontSize: 15.0, ), ), ), @@ -187,38 +211,56 @@ class _OrderDetailsPageState extends State { endIndent: 0, ), Row( - children: [ + children: [ Container( margin: EdgeInsets.fromLTRB(10.0, 10.0, 5.0, 10.0), child: SvgPicture.asset( 'assets/images/pharmacy/shipping_truck_icon.svg', height: 20, - width: 20,), + width: 20, + ), ), Container( margin: EdgeInsets.all(10.0), - child:Text(TranslationBase.of(context).shippedMethod, - style: TextStyle(fontSize: 13.0, fontWeight: FontWeight.bold, + child: Text( + TranslationBase.of(context).shippedMethod, + style: TextStyle( + fontSize: 13.0, + fontWeight: FontWeight.bold, ), ), ), Container( - child: widget.orderModel.shippingRateComputationMethodSystemName == "Shipping.FixedOrByWeight" - ? Container( - margin: EdgeInsets.only(bottom: 10.0, top: 10.0), - child: SvgPicture.asset( - 'assets/images/pharmacy/hmg_shipping_logo.svg', - height: 25, - width: 25,), - ) - : Container( - margin: EdgeInsets.only(bottom: 10.0, top: 10.0), - child: SvgPicture.asset( - 'assets/images/pharmacy/aramex_shipping_logo.svg', - height: 25, - width: 25,), + child: flutterImage.Image.asset( + widget.orderModel + .shippingRateComputationMethodSystemName == + "Shipping.FixedOrByWeight" + ? "assets/images/pharmacy_module/payment/hmg_shipping_logo.png" + : "assets/images/pharmacy_module/payment/aramex_shipping_logo.png", + fit: BoxFit.contain, ), ), + Container( + child: widget.orderModel + .shippingRateComputationMethodSystemName == + "Shipping.FixedOrByWeight" + ? Container( + margin: EdgeInsets.only(bottom: 10.0, top: 10.0), + child: SvgPicture.asset( + 'assets/images/pharmacy_module/payment/hmg_shipping_logo.png', + height: 25, + width: 25, + ), + ) + : Container( + margin: EdgeInsets.only(bottom: 10.0, top: 10.0), + child: SvgPicture.asset( + 'assets/images/pharmacy_module/payment/aramex_shipping_logo.png', + height: 25, + width: 25, + ), + ), + ), ], ), Divider( @@ -229,25 +271,22 @@ class _OrderDetailsPageState extends State { endIndent: 0, ), Row( - children: [ - Container( - margin: EdgeInsets.fromLTRB(10.0, 10.0, 1.0, 10.0), - child: SvgPicture.asset( - 'assets/images/pharmacy/credit_card_icon.svg', - height: 20, - width: 20,), - ), + children: [ Container( margin: EdgeInsets.all(10.0), child: SvgPicture.asset( 'assets/images/pharmacy/credit_card_icon.svg', height: 20, - width: 20,), + width: 20, + ), ), Container( margin: EdgeInsets.only(bottom: 10.0, top: 10.0), - child:Text(widget.orderModel.paymentName.toString().substring(12), - style: TextStyle(fontSize: 13.0, fontWeight: FontWeight.bold, + child: Text( + widget.orderModel.paymentName.toString().substring(12), + style: TextStyle( + fontSize: 13.0, + fontWeight: FontWeight.bold, ), ), ), @@ -266,10 +305,13 @@ class _OrderDetailsPageState extends State { child: Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text(TranslationBase.of(context).orderDetail, - style: TextStyle(fontSize: 15.0, fontWeight: FontWeight.bold, - ), + Text( + TranslationBase.of(context).orderDetail, + style: TextStyle( + fontSize: 15.0, + fontWeight: FontWeight.bold, ), + ), ], ), ), @@ -291,10 +333,11 @@ class _OrderDetailsPageState extends State { widget.orderModel.orderItems[index].product.images.length != 0 ? widget.orderModel.orderItems[index].product.images [0].src.toString() : null, - status: widget.orderModel.orderStatusId,), - ); - } - ), + status: widget.orderModel.orderStatusId, + product: widget.orderModel.orderItems[index].product, + ), + ); + }), Container( padding: EdgeInsets.only(bottom: 10.0), @@ -302,19 +345,22 @@ class _OrderDetailsPageState extends State { child: Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text(TranslationBase.of(context).orderSummary, - style: TextStyle(fontSize: 15.0, fontWeight: FontWeight.bold, - ), + Text( + TranslationBase.of(context).orderSummary, + style: TextStyle( + fontSize: 15.0, + fontWeight: FontWeight.bold, ), + ), ], ), ), Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ + children: [ Container( padding: EdgeInsets.only(bottom: 10.0), - margin: EdgeInsets.only(top: 5.0, left: 10.0 ), + margin: EdgeInsets.only(top: 5.0, left: 10.0), child: Text( TranslationBase.of(context).subtotal, style: TextStyle( @@ -329,13 +375,17 @@ class _OrderDetailsPageState extends State { children: [ Container( margin: EdgeInsets.only(right: 5.0), - child: Text(TranslationBase.of(context).sar, - style: TextStyle(fontSize: 13.0, + child: Text( + TranslationBase.of(context).sar, + style: TextStyle( + fontSize: 13.0, ), ), ), - Text(widget.orderModel.orderSubtotalExclTax.toString(), - style: TextStyle(fontSize: 13.0, + Text( + widget.orderModel.orderSubtotalExclTax.toString(), + style: TextStyle( + fontSize: 13.0, ), ), ], @@ -345,10 +395,10 @@ class _OrderDetailsPageState extends State { ), Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ + children: [ Container( padding: EdgeInsets.only(bottom: 10.0), - margin: EdgeInsets.only(top: 5.0, left: 10.0 ), + margin: EdgeInsets.only(top: 5.0, left: 10.0), child: Text( TranslationBase.of(context).shipping, style: TextStyle( @@ -363,13 +413,17 @@ class _OrderDetailsPageState extends State { children: [ Container( margin: EdgeInsets.only(right: 5.0), - child: Text(TranslationBase.of(context).sar, - style: TextStyle(fontSize: 13.0, + child: Text( + TranslationBase.of(context).sar, + style: TextStyle( + fontSize: 13.0, ), ), ), - Text(widget.orderModel.orderShippingExclTax.toString(), - style: TextStyle(fontSize: 13.0, + Text( + widget.orderModel.orderShippingExclTax.toString(), + style: TextStyle( + fontSize: 13.0, ), ), ], @@ -379,10 +433,10 @@ class _OrderDetailsPageState extends State { ), Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ + children: [ Container( padding: EdgeInsets.only(bottom: 10.0), - margin: EdgeInsets.only(top: 5.0,left: 10.0 ), + margin: EdgeInsets.only(top: 5.0, left: 10.0), child: Text( TranslationBase.of(context).vat, style: TextStyle( @@ -397,13 +451,17 @@ class _OrderDetailsPageState extends State { children: [ Container( margin: EdgeInsets.only(right: 5.0), - child: Text(TranslationBase.of(context).sar, - style: TextStyle(fontSize: 13.0, + child: Text( + TranslationBase.of(context).sar, + style: TextStyle( + fontSize: 13.0, ), ), ), - Text(model.order[0].orderTax.toString(), - style: TextStyle(fontSize: 13.0, + Text( + model.order[0].orderTax.toString(), + style: TextStyle( + fontSize: 13.0, ), ), ], @@ -413,13 +471,14 @@ class _OrderDetailsPageState extends State { ), Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ + children: [ Container( - margin: EdgeInsets.only(top: 5.0,left: 10.0 ), + margin: EdgeInsets.only(top: 5.0, left: 10.0), child: Text( TranslationBase.of(context).total, style: TextStyle( - fontSize: 15.0,fontWeight: FontWeight.bold, + fontSize: 15.0, + fontWeight: FontWeight.bold, ), ), ), @@ -429,13 +488,19 @@ class _OrderDetailsPageState extends State { children: [ Container( margin: EdgeInsets.only(right: 5.0), - child: Text(TranslationBase.of(context).sar, - style: TextStyle(fontSize: 15.0,fontWeight: FontWeight.bold, + child: Text( + TranslationBase.of(context).sar, + style: TextStyle( + fontSize: 15.0, + fontWeight: FontWeight.bold, ), ), ), - Text(widget.orderModel.orderTotal.toString(), - style: TextStyle(fontSize: 15.0, fontWeight: FontWeight.bold, + Text( + widget.orderModel.orderTotal.toString(), + style: TextStyle( + fontSize: 15.0, + fontWeight: FontWeight.bold, ), ), ], @@ -443,59 +508,61 @@ class _OrderDetailsPageState extends State { ), ], ), - widget.orderModel.orderStatusId == 10 ? InkWell( - onTap: () { + widget.orderModel.orderStatusId == 10 + ? InkWell( + onTap: () { model.makeOrder(); - }, - child: Container( + }, + child: Container( // margin: EdgeInsets.only(top: 20.0), - height: 50.0, - color: Colors.transparent, - child: Container( - padding: EdgeInsets.only(left: 130.0, right: 130.0), - decoration: BoxDecoration( - border: Border.all( - color: Colors.green, - style: BorderStyle.solid, - width: 4.0 - ), - color: Colors.green, - borderRadius: BorderRadius.circular(5.0) - ), - child: Center( - child: Text( - TranslationBase.of(context).payOnline, - style: TextStyle( - color: Colors.white, - fontWeight: FontWeight.bold, + height: 50.0, + color: Colors.transparent, + child: Container( + padding: EdgeInsets.only(left: 130.0, right: 130.0), + decoration: BoxDecoration( + border: Border.all( + color: Colors.green, + style: BorderStyle.solid, + width: 4.0), + color: Colors.green, + borderRadius: BorderRadius.circular(5.0)), + child: Center( + child: Text( + TranslationBase.of(context).payOnline, + style: TextStyle( + color: Colors.white, + fontWeight: FontWeight.bold, + ), + ), + ), ), ), - ), - ), - ), - ) : Container(), + ) + : Container(), // getCancelOrder(canCancel, canRefund), - isCancel ? InkWell( - onTap: () { - presentConfirmDialog(model,widget.orderModel.id);//(widget.orderModel.id)); + isCancel + ? InkWell( + onTap: () { + presentConfirmDialog(model, + widget.orderModel.id); //(widget.orderModel.id)); // - }, - child: Container( + }, + child: Container( // padding: EdgeInsets.only(left: 13.0, right: 13.0, top: 5.0), - height: 50.0, - color: Colors.transparent, - child: Center( - child: Text( - TranslationBase.of(context).cancelOrder, - style: TextStyle( - color: Colors.red[900], - fontWeight: FontWeight.bold, - decoration: TextDecoration.underline + height: 50.0, + color: Colors.transparent, + child: Center( + child: Text( + TranslationBase.of(context).cancelOrder, + style: TextStyle( + color: Colors.red[900], + fontWeight: FontWeight.bold, + decoration: TextDecoration.underline), + ), + ), ), - ), - ), - ), - ) : Container(), + ) + : Container(), ], ), ), @@ -504,90 +571,80 @@ class _OrderDetailsPageState extends State { ); } - - Color getStatusBackgroundColor() { - print(widget.orderModel.orderStatusId); + print(widget.orderModel.orderStatusId); // if(orderStatus == 'delivered') - if(widget.orderModel.orderStatusId == 30 ||widget.orderModel.orderStatusId == 997 - ||widget.orderModel.orderStatusId == 994) + if (widget.orderModel.orderStatusId == 30 || + widget.orderModel.orderStatusId == 997 || + widget.orderModel.orderStatusId == 994) return Colors.blue[700]; - else if (widget.orderModel.orderStatusId == 20 ||widget.orderModel.orderStatusId == 995 - ||widget.orderModel.orderStatusId == 998 ||widget.orderModel.orderStatusId == 999) - return Colors.green; - else if (widget.orderModel.orderStatusId == 10) - return Colors.orange[300]; - else if (widget.orderModel.orderStatusId == 40 ||widget.orderModel.orderStatusId == 996 - ||widget.orderModel.orderStatusId == 200) - return Colors.red[900]; + else if (widget.orderModel.orderStatusId == 20 || + widget.orderModel.orderStatusId == 995 || + widget.orderModel.orderStatusId == 998 || + widget.orderModel.orderStatusId == 999) + return Colors.green; + else if (widget.orderModel.orderStatusId == 10) + return Colors.orange[300]; + else if (widget.orderModel.orderStatusId == 40 || + widget.orderModel.orderStatusId == 996 || + widget.orderModel.orderStatusId == 200) return Colors.red[900]; } - - getCancelOrder(dataIsCancel){ - if(widget.orderModel.canCancel && widget.orderModel.canRefund) - { - setState(() { - isCancel = true; - isRefund = false; - }); - } - else if (widget.orderModel.canCancel ){ - setState(() { - isCancel = true; - isRefund = false; - }); - - } - else if (widget.orderModel.canRefund){ - setState(() { - isCancel = false; - isRefund = true; - }); - } - else { - setState(() { - isCancel = false; - isRefund = false; - }); - } -} + getCancelOrder(dataIsCancel) { + if (widget.orderModel.canCancel && widget.orderModel.canRefund) { + setState(() { + isCancel = true; + isRefund = false; + }); + } else if (widget.orderModel.canCancel) { + setState(() { + isCancel = true; + isRefund = false; + }); + } else if (widget.orderModel.canRefund) { + setState(() { + isCancel = false; + isRefund = true; + }); + } else { + setState(() { + isCancel = false; + isRefund = false; + }); + } + } // .getCanceledOrder - presentConfirmDialog(cancelFunction, id){ + presentConfirmDialog(cancelFunction, id) { ConfirmDialog dialog = new ConfirmDialog( context: context, confirmMessage: TranslationBase.of(context).confirmCancellation, okText: TranslationBase.of(context).confirm, cancelText: TranslationBase.of(context).cancel_nocaps, - okFunction: () => cancelFunction.getCanceledOrder(id, context).then((value){ - print(":D"); - print(value); + okFunction: () => + cancelFunction.getCanceledOrder(id, context).then((value) { + print(":D"); + print(value); // Navigator.pop(context); - Navigator.push(context, - MaterialPageRoute(builder: (context) => - OrderPage(customerID: widget.orderModel.customerId.toString())), - );}), - - cancelFunction: () => {} - ); + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => OrderPage( + customerID: widget.orderModel.customerId.toString())), + ); + }), + cancelFunction: () => {}); dialog.showAlertDialog(context); } - getCanceledOrder(order){ + getCanceledOrder(order) { Navigator.pop(context); - if(widget.orderModel.canCancel && widget.orderModel.canRefund == false){ + if (widget.orderModel.canCancel && widget.orderModel.canRefund == false) { // getCanceledOrder(order); // AppToast.showSuccessToast(message: "Request Sent Successfully"); // Navigator.push(context, // MaterialPageRoute(builder: (context) => OrderPage())); } - } } - - - - - - diff --git a/lib/pages/pharmacy/order/ProductReview.dart b/lib/pages/pharmacy/order/ProductReview.dart index 37ede97c..4d09191c 100644 --- a/lib/pages/pharmacy/order/ProductReview.dart +++ b/lib/pages/pharmacy/order/ProductReview.dart @@ -1,4 +1,3 @@ - import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/order_model_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/pharmacy/profile/profile.dart'; @@ -8,145 +7,133 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/material.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/order_model.dart'; import 'package:flutter_svg/svg.dart'; +import 'package:intl/intl.dart'; import 'package:rating_bar/rating_bar.dart'; +import 'package:flutter/src/widgets/image.dart' as flutterImage; class ProductReviewPage extends StatefulWidget { + final Product product; + + ProductReviewPage(this.product); - OrderModel orderModel; - ProductReviewPage({ - @required this.orderModel - }); @override _ProductReviewPageState createState() => _ProductReviewPageState(); } class _ProductReviewPageState extends State { - String orderId ="3516"; - var pharmacyUser =""; - var product =""; - var CustomerId =""; - String submitTxt =""; - var doctorRating= ""; - var reviewObj = {}; - AppSharedPreferences sharedPref = AppSharedPreferences(); + double currentRating = 0; + String reviewText = ""; + TextEditingController _reviewController = new TextEditingController(); + bool finishReview = false; @override Widget build(BuildContext context) { + double ratingValue = double.parse("${widget.product.approvedRatingSum}"); return BaseView( - onModelReady: (model)=>model.getOrderDetails(widget.orderModel.id), - builder: (_,model, wi )=> AppScaffold( + builder: (_, model, wi) => AppScaffold( appBarTitle: TranslationBase.of(context).writeReview, isShowAppBar: true, - isPharmacy:true , + isPharmacy: true, body: Container( color: Colors.white, - child: SingleChildScrollView( + child: !finishReview ? SingleChildScrollView( child: Column( - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - ListView.builder( - scrollDirection: Axis.vertical, - shrinkWrap: true, - physics: ScrollPhysics(), - itemCount:widget.orderModel.orderItems.length, - itemBuilder: (context, index){ - return Container( - margin: EdgeInsets.only(top :15.0, bottom: 15.0), - child: Row( - children:[ - Column( - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - Container( - margin: EdgeInsets.only(left: 10), - child: SvgPicture.asset( -// widget.orderModel.orderItems[index].product.images[index].src.toString(), - 'assets/images/al-habib_onlne_pharmacy_bg.png', - fit: BoxFit.cover, - width: 80, - height: 80, - ), - ), - ] - ), - ], - ), - Column( - children: [ - Row( - children: [ - Text(widget.orderModel.orderItems[index].product.name.toString(), - style: TextStyle(fontSize: 16.0, - ), + children: [ + Container( + margin: EdgeInsets.symmetric(vertical: 8, horizontal: 16), + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + widget.product.images != null + ? flutterImage.Image.network( + widget.product.images[0].src, + fit: BoxFit.cover, + height: 80, + ) + : flutterImage.Image.asset( + "assets/images/no_image.png", + fit: BoxFit.cover, + height: 80, + ), + Expanded( + child: Container( + child: Column( + children: [ + Container( + margin: EdgeInsets.all(5), + child: Align( + alignment: Alignment.topLeft, + child: RichText( + text: TextSpan( + text: widget.product.name, + style: TextStyle( + color: Colors.black, + fontSize: 14, + fontWeight: FontWeight.normal), ), - ], + ), ), - Row( - children: [ - Container( - margin: EdgeInsets.only(left: 5), - child: Text(widget.orderModel.orderItems[index].product.price.toString(), - style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold, - ), - ), - ), - Container( - margin: EdgeInsets.only(left: 5), - child: Text(TranslationBase.of(context).sar, - style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold, - ), - ), + ), + Container( + margin: EdgeInsets.all(5), + child: Align( + alignment: Alignment.topLeft, + child: RichText( + text: TextSpan( + text: + '${widget.product.price} ${TranslationBase.of(context).sar}', + style: TextStyle( + fontWeight: FontWeight.bold, + color: Colors.black, + fontSize: 13), ), - ], + ), ), - Row( - children: [ - Container( - margin: EdgeInsets.all(5), - child: Align( - alignment: Alignment.topLeft, - child: RatingBar.readOnly( - initialRating: 3, - size: 15.0, - filledColor: Colors.yellow[700], - emptyColor: Colors.grey[500], - isHalfAllowed: true, - halfFilledIcon: Icons.star_half, - filledIcon: Icons.star, - emptyIcon: Icons.star, - ), - ), - ), - Container( - child: Text(widget.orderModel.orderItems[index].product.approvedRatingSum.toString(), - style: TextStyle(fontSize: 14.0, fontWeight: FontWeight.bold, - ), + ), + Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Container( + child: Align( + alignment: Alignment.topLeft, + child: RatingBar.readOnly( + initialRating: ratingValue, + size: 15.0, + filledColor: Colors.yellow[700], + emptyColor: Colors.grey[500], + isHalfAllowed: true, + halfFilledIcon: Icons.star_half, + filledIcon: Icons.star, + emptyIcon: Icons.star, ), ), - Container( - margin: EdgeInsets.only(left: 5), - child: Text("(" + widget.orderModel.orderItems[index].product.approvedTotalReviews.toString() - + ' ' + TranslationBase.of(context).review +")", - style: TextStyle(fontSize: 12.0, + ), + SizedBox( + width: 20, + ), + Container( + child: Align( + child: RichText( + text: TextSpan( + text: + '(${widget.product.approvedTotalReviews} reviews)', + style: TextStyle( + fontWeight: FontWeight.bold, + color: Colors.grey, + fontSize: 13), ), ), ), - ], - ), - ], - ), - ] + ), + ], + ), + ], ), - ); - } - ), - ]), - + ), + ), + ]), + ), Divider( color: Colors.grey[350], height: 20, @@ -155,15 +142,13 @@ class _ProductReviewPageState extends State { endIndent: 0, ), Container( - margin: EdgeInsets.only( top: 12.0), + margin: EdgeInsets.only(top: 12.0), child: Column( crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisSize: MainAxisSize.max, children: [ RatingBar( - // initialRating: - // this.doctor.actualDoctorRate.toDouble(), size: 40.0, filledColor: Colors.yellow[700], emptyColor: Colors.grey[500], @@ -171,51 +156,79 @@ class _ProductReviewPageState extends State { halfFilledIcon: Icons.star_half, filledIcon: Icons.star, emptyIcon: Icons.star, + onRatingChanged: (rating) { + currentRating = rating; + }, ), ], ), ), Container( - padding: EdgeInsets.fromLTRB(8.0, 20.0, 8.0,20.0), + padding: EdgeInsets.symmetric(horizontal: 16, vertical: 16), child: Column( - children: [ - TextFormField ( + children: [ + TextFormField( + controller: _reviewController, + maxLines: 6, + minLines: 4, decoration: InputDecoration( - contentPadding: const EdgeInsets.symmetric(vertical: 60.0), border: InputBorder.none, hintText: 'Tell us more about product!', focusedBorder: OutlineInputBorder( borderRadius: BorderRadius.circular(5.0), - borderSide: BorderSide(width: 1, color: Colors.grey[400]), + borderSide: + BorderSide(width: 1, color: Colors.grey[400]), ), enabledBorder: OutlineInputBorder( - borderRadius: BorderRadius.all(Radius.circular(5.0)), - borderSide: BorderSide(color: Colors.grey[400], width: 1), + borderRadius: + BorderRadius.all(Radius.circular(5.0)), + borderSide: + BorderSide(color: Colors.grey[400], width: 1), ), ), + onChanged: (value) { + setState(() { + reviewText = value; + }); + }, + textAlign: TextAlign.start, + textAlignVertical: TextAlignVertical.top, ), ], ), ), InkWell( - onTap: () { -// Navigator.push(context, -// MaterialPageRoute(builder: (context) => )); - }, + onTap: reviewText != null && reviewText != "" + ? () { + model + .makeReview( + widget.product, ratingValue, reviewText) + .then((value) { + setState(() { + finishReview = true; + }); + }); + } + : null, child: Container( + margin: EdgeInsets.symmetric(vertical: 8, horizontal: 16), height: 50.0, width: 400.0, color: Colors.transparent, child: Container( decoration: BoxDecoration( border: Border.all( - color: Colors.yellow[700], + color: _reviewController.value.text != null && + _reviewController.value.text != "" + ? Colors.yellow[700] + : Color(0xFFf5d69c), style: BorderStyle.solid, - width: 1.0 - ), - color: Colors.yellow[700], - borderRadius: BorderRadius.circular(5.0) - ), + width: 1.0), + color: _reviewController.value.text != null && + _reviewController.value.text != "" + ? Colors.yellow[700] + : Color(0xFFf5d69c), + borderRadius: BorderRadius.circular(5.0)), child: Center( child: Text( TranslationBase.of(context).shareReview, @@ -231,85 +244,89 @@ class _ProductReviewPageState extends State { ), ], ), - ), - ),), + ) : getReviewedProduct(), + ), + ), ); } - - - //new screen is showing after submitting the review - Widget getReviewedProduct(){ + Widget getReviewedProduct() { return Column( mainAxisAlignment: MainAxisAlignment.center, - children: [ + children: [ Row( mainAxisAlignment: MainAxisAlignment.center, - children: [ + children: [ SvgPicture.asset( 'assets/images/pharmacy/check_icon.svg', width: 28, - height: 28,), + height: 28, + ), Container( - margin: EdgeInsets.only(left: 10.0), - child: Text(TranslationBase.of(context).reviewSuccessful, - style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold, + margin: EdgeInsets.symmetric(horizontal: 8), + child: Text( + TranslationBase.of(context).reviewSuccessful, + style: TextStyle( + fontSize: 20.0, + fontWeight: FontWeight.bold, ), ), ), ], ), Container( - margin: EdgeInsets.only(top:5.0, bottom: 20.0 ), - child: Text(TranslationBase.of(context).reviewShared, - style: TextStyle(fontSize: 15.0, + margin: EdgeInsets.symmetric(horizontal: 8, vertical: 8), + child: Text( + TranslationBase.of(context).reviewShared, + style: TextStyle( + fontSize: 15.0, ), ), ), Container( - margin: EdgeInsets.only(bottom: 30.0, top: 30.0 ), + margin: EdgeInsets.only(bottom: 30.0, top: 30.0), child: SvgPicture.asset( 'assets/images/pharmacy/success_review_icon.svg', width: 100, - height: 100,), + height: 100, + ), ), Container( - margin: EdgeInsets.only(left: 20.0, right: 20.0), + margin: EdgeInsets.symmetric(horizontal: 16), child: Column( - children: [ + children: [ Row( mainAxisAlignment: MainAxisAlignment.start, - children: [ + children: [ SvgPicture.asset( 'assets/images/pharmacy/quote_start.svg', width: 15, - height: 15,), - ], - ), - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text(TranslationBase.of(context).reviewComment, - style: TextStyle(fontSize: 15.0, - ), + height: 15, ), ], ), + Text( + TranslationBase.of(context).reviewComment, + style: TextStyle( + fontSize: 15.0, + ), + ), Row( mainAxisAlignment: MainAxisAlignment.end, - children: [ + children: [ SvgPicture.asset( 'assets/images/pharmacy/quote_end.svg', width: 15, - height: 15,), + height: 15, + ), ], ), ], ), ), Container( - margin: EdgeInsets.only(top: 20.0 ), + margin: EdgeInsets.only(top: 20.0), child: InkWell( onTap: () { Navigator.push( @@ -320,17 +337,16 @@ class _ProductReviewPageState extends State { ); }, child: Container( - height: 50.0, color: Colors.transparent, + height: 50.0, + color: Colors.transparent, child: Container( decoration: BoxDecoration( border: Border.all( color: Colors.orange, style: BorderStyle.solid, - width: 1.0 - ), + width: 1.0), color: Colors.transparent, - borderRadius: BorderRadius.circular(5.0) - ), + borderRadius: BorderRadius.circular(5.0)), child: Center( child: Text( TranslationBase.of(context).backMyAccount, @@ -348,23 +364,4 @@ class _ProductReviewPageState extends State { ); } -// submit(){ -// this.orderId.id = "0"; -// this.reviewObj.position = 0; -// this.reviewObj.customerId = this.pharmacyUser.CustomerId; -// this.reviewObj.productId = this.product.id; -// this.reviewObj.storeId = 2; -// this.reviewObj.isApproved = false; -// this.reviewObj.title =''; -// this.reviewObj.reviewText = this.submitTxt; -// this.reviewObj.rating = this.doctorRating; -// this.reviewObj.replyText = null; -// this.reviewObj.helpfulYesTotal = 0; -// this.reviewObj.helpfulNoTotal = 0; -// this.reviewObj.createdOnUtc = new Date().toString(); -// this.submitProductReview(); -// } - submitProductReview(){ - - } -} \ No newline at end of file +} diff --git a/lib/services/pharmacy_services/orderDetails_service.dart b/lib/services/pharmacy_services/orderDetails_service.dart index 5adbbc24..a3bb9976 100644 --- a/lib/services/pharmacy_services/orderDetails_service.dart +++ b/lib/services/pharmacy_services/orderDetails_service.dart @@ -36,4 +36,40 @@ class OrderDetailsService extends BaseService{ super.error = error; }); } + + Future makeReview(Product product, double rating, String reviewText) async { + hasError = false; + super.error = ""; + + var customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID); + + + Map body = Map(); + Map reviewBody = Map(); + reviewBody["created_on_utc"] = DateTime.now().toString(); + reviewBody["customer_id"] = customerId; + reviewBody["helpful_no_total"] = 0; + reviewBody["helpful_yes_total"] = 0; + reviewBody["id"] = 0; + reviewBody["is_approved"] = false; + reviewBody["position"] = 0; + reviewBody["product_id"] = product.id; + reviewBody["rating"] = rating; + reviewBody["reply_text"] = reviewText; + reviewBody["store_id"] = 2; + reviewBody["title"] = ""; + body['review'] = reviewBody; + await baseAppClient.post("$PHARMACY_MAKE_REVIEW", + onSuccess: (response, statusCode) async { + /* + "success": { + "SuccessEndUserMsg": "Your request has been completed successfuly.", + "SuccessEndUserMsgN": "تمت العملية بنجاح" + } + */ + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } } \ No newline at end of file diff --git a/lib/widgets/pharmacy/product_tile.dart b/lib/widgets/pharmacy/product_tile.dart index bdb45cb3..2449ecf5 100644 --- a/lib/widgets/pharmacy/product_tile.dart +++ b/lib/widgets/pharmacy/product_tile.dart @@ -2,10 +2,11 @@ - +import 'package:diplomaticquarterapp/core/model/pharmacies/order_model.dart'; import 'package:diplomaticquarterapp/pages/pharmacy/order/ProductReview.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:flutter/material.dart'; +import 'package:flutter/src/widgets/image.dart' as flutterImage; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:rating_bar/rating_bar.dart'; @@ -20,11 +21,11 @@ class productTile extends StatelessWidget { final String img; final String imgs; final int status; - + final Product product; productTile({this.productName, this.productPrice, this.productRate, this.qyt, this.totalPrice, this.productReviews, this.img, - this.isOrderDetails=true, this.status, this.imgs}); + this.isOrderDetails=true, this.status, this.product ,this.imgs}); @override @@ -42,7 +43,7 @@ class productTile extends StatelessWidget { this.imgs != null && this.imgs.length > 0 ? Container( margin: EdgeInsets.only(left: 10), - child: Image.network(imgs), + child: flutterImage.Image.network(imgs), // fit: BoxFit.cover, width: 80, height: 80, @@ -213,7 +214,7 @@ class productTile extends StatelessWidget { InkWell( onTap: () { Navigator.push(context, - MaterialPageRoute(builder: (context) => ProductReviewPage())); + MaterialPageRoute(builder: (context) => ProductReviewPage(product))); }, child: Container( padding: EdgeInsets.only(left: 13.0, right: 13.0, top: 5.0), diff --git a/pubspec.yaml b/pubspec.yaml index dee882e6..18a8330a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -45,7 +45,7 @@ dependencies: url_launcher: ^5.5.0 shared_preferences: ^0.5.8 flutter_flexible_toast: ^0.1.4 - firebase_messaging: ^7.0.0 + firebase_messaging: ^7.0.3 android_intent: ^0.3.7+7 # Progress bar progress_hud_v2: ^2.0.0