Penguin SDK changes & crashlytics

merge-update-with-lab-changes
haroon amjad 1 year ago
parent 21403a2bba
commit cd7da0dd70

@ -58,6 +58,7 @@ android {
buildFeatures { buildFeatures {
viewBinding true viewBinding true
dataBinding true
} }
sourceSets { sourceSets {

@ -204,6 +204,7 @@ internal class PenguinView(
// .setDeepLinkData("deeplink") // .setDeepLinkData("deeplink")
.setCustomizeColor("#2CA0AF") .setCustomizeColor("#2CA0AF")
.setDeepLinkSchema("") .setDeepLinkSchema("")
.setIsEnableReportIssue(true)
.build() .build()
// Set location delegate to handle location updates // Set location delegate to handle location updates
@ -215,7 +216,17 @@ internal class PenguinView(
// } // }
// Set events delegate for reporting issues // Set events delegate for reporting issues
PlugAndPlaySDK.setPiEventsDelegate { } // PlugAndPlaySDK.setPiEventsDelegate(new PIEventsDelegate() {
// @Override
// public void onReportIssue(PIReportIssue issue) {
// Log.e("Issue Reported: ", issue.getReportType());
// }
// // Implement issue reporting logic here }
// @Override
// public void onSharedLocation(String link) {
// // Implement Shared location logic here
// }
// })
// Start the Penguin SDK // Start the Penguin SDK
PlugAndPlaySDK.start(mContext, this) PlugAndPlaySDK.start(mContext, this)

@ -22,7 +22,7 @@ var PACKAGES_ORDER_HISTORY = '/api/orders/items';
var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara'; var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara';
// var BASE_URL = 'http://10.50.100.198:2018/'; // var BASE_URL = 'http://10.50.100.198:2018/';
// var BASE_URL = 'http://10.50.100.198:4422/'; // var BASE_URL = 'http://10.50.100.198:4422/';
// var BASE_URL = 'https://uat.hmgwebservices.com/'; var BASE_URL = 'https://uat.hmgwebservices.com/';
// var BASE_URL = 'https://hmgwebservices.com/'; // var BASE_URL = 'https://hmgwebservices.com/';
// var BASE_URL = 'http://10.20.200.111:1010/'; // var BASE_URL = 'http://10.20.200.111:1010/';
// var BASE_URL = 'https://hmgwebservices.com/'; // var BASE_URL = 'https://hmgwebservices.com/';
@ -30,7 +30,7 @@ var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara';
// var BASE_URL = 'https://vidauat.cloudsolutions.com.sa/'; // var BASE_URL = 'https://vidauat.cloudsolutions.com.sa/';
// var BASE_URL = 'https://vidamergeuat.cloudsolutions.com.sa/'; // var BASE_URL = 'https://vidamergeuat.cloudsolutions.com.sa/';
var BASE_URL = 'https://webservices.hmg.com/'; // var BASE_URL = 'https://webservices.hmg.com/';
// var BASE_URL = 'http://10.50.100.198:4422/'; // var BASE_URL = 'http://10.50.100.198:4422/';
@ -698,10 +698,10 @@ var GET_PROJECT_FROM_NFC = 'Services/OUTPs.svc/Rest/GetProjectByNFC';
//PAYFORT //PAYFORT
var getPayFortProjectDetails = "Services/PayFort_Serv.svc/REST/GetPayFortProjectDetails"; var getPayFortProjectDetails = "Services/PayFort_Serv.svc/REST/GetPayFortProjectDetails";
var addPayFortApplePayResponse = "Services/PayFort_Serv.svc/REST/AddResponse"; var addPayFortApplePayResponse = "Services/PayFort_Serv.svc/REST/AddResponse";
var payFortEnvironment = FortEnvironment.production; // var payFortEnvironment = FortEnvironment.production;
var applePayMerchantId = "merchant.com.hmgwebservices"; // var applePayMerchantId = "merchant.com.hmgwebservices";
// var payFortEnvironment = FortEnvironment.test; var payFortEnvironment = FortEnvironment.test;
// var applePayMerchantId = "merchant.com.hmgwebservices.uat"; var applePayMerchantId = "merchant.com.hmgwebservices.uat";
class AppGlobal { class AppGlobal {
static var context; static var context;

@ -184,8 +184,8 @@ class BaseAppClient {
// body['IdentificationNo'] = 1023854217; // body['IdentificationNo'] = 1023854217;
// body['MobileNo'] = "531940021"; //0560717232 // body['MobileNo'] = "531940021"; //0560717232
// body['PatientID'] = 4769791; //4609100 body['PatientID'] = 1231755; //4609100
// body['TokenID'] = "@dm!n"; body['TokenID'] = "@dm!n";
// Patient ID: 3027574 // Patient ID: 3027574
// Mobile no.: 0502303285 // Mobile no.: 0502303285
@ -195,7 +195,7 @@ class BaseAppClient {
// if (url == 'https://uat.hmgwebservices.com/Services/NHIC.svc/REST/GetPatientInfo') { // if (url == 'https://uat.hmgwebservices.com/Services/NHIC.svc/REST/GetPatientInfo') {
// url = "https://hmgwebservices.com/Services/NHIC.svc/REST/GetPatientInfo"; // url = "https://hmgwebservices.com/Services/NHIC.svc/REST/GetPatientInfo";
// body['TokenID'] = "@dm!n"; // body['TokenID'] = "@dm!n";
// } // }
// if (AppGlobal.isNetworkDebugEnabled) { // if (AppGlobal.isNetworkDebugEnabled) {

@ -35,12 +35,13 @@ void main() async {
// Pass all uncaught asynchronous errors that aren't handled by the Flutter framework to Crashlytics // Pass all uncaught asynchronous errors that aren't handled by the Flutter framework to Crashlytics
PlatformDispatcher.instance.onError = (error, stack) { PlatformDispatcher.instance.onError = (error, stack) {
FirebaseCrashlytics.instance.recordError(error, stack, fatal: true); if (!kDebugMode) FirebaseCrashlytics.instance.recordError(error, stack, fatal: true);
return true; return true;
}; };
setupLocator(); setupLocator();
HttpOverrides.global = MyHttpOverrides(); HttpOverrides.global = MyHttpOverrides();
runApp(MyApp()); runApp(MyApp());
} }
@ -67,8 +68,6 @@ class _MyApp extends State<MyApp> {
//0567184134 mobile //0567184134 mobile
//246305493 //246305493
// checkForUpdate() { // checkForUpdate() {
// // todo need to verify 'imp' // // todo need to verify 'imp'
// InAppUpdate.checkForUpdate().then((info) { // InAppUpdate.checkForUpdate().then((info) {
@ -152,14 +151,12 @@ class _MyApp extends State<MyApp> {
], ],
child: Consumer<ProjectViewModel>( child: Consumer<ProjectViewModel>(
builder: (context, projectProvider, child) => MaterialApp( builder: (context, projectProvider, child) => MaterialApp(
builder: (_, mchild) { builder: (_, mchild) {
return MediaQuery( return MediaQuery(
data: MediaQuery.of(context).copyWith( data: MediaQuery.of(context).copyWith(
textScaler: TextScaler.linear(1.0), textScaler: TextScaler.linear(1.0),
), //set desired text scale factor here ), //set desired text scale factor here
child: mchild! child: mchild!);
);
// Container( // Container(
// color: Colors.blue, // color: Colors.blue,
// )); // ));

@ -30,28 +30,18 @@ class NewHomeHealthCareStepTowPage extends StatefulWidget {
final Function(PickResult)? onPick; final Function(PickResult)? onPick;
final double? latitude; final double? latitude;
final double? longitude; final double? longitude;
final PatientERInsertPresOrderRequestModel? final PatientERInsertPresOrderRequestModel? patientERInsertPresOrderRequestModel;
patientERInsertPresOrderRequestModel;
final Function? changePageViewIndex; final Function? changePageViewIndex;
final HomeHealthCareViewModel model; final HomeHealthCareViewModel model;
const NewHomeHealthCareStepTowPage( const NewHomeHealthCareStepTowPage({Key? key, this.onPick, this.latitude, this.longitude, this.patientERInsertPresOrderRequestModel, this.changePageViewIndex, required this.model})
{Key? key,
this.onPick,
this.latitude,
this.longitude,
this.patientERInsertPresOrderRequestModel,
this.changePageViewIndex,
required this.model})
: super(key: key); : super(key: key);
@override @override
_NewHomeHealthCareStepTowPageState createState() => _NewHomeHealthCareStepTowPageState createState() => _NewHomeHealthCareStepTowPageState();
_NewHomeHealthCareStepTowPageState();
} }
class _NewHomeHealthCareStepTowPageState class _NewHomeHealthCareStepTowPageState extends State<NewHomeHealthCareStepTowPage> {
extends State<NewHomeHealthCareStepTowPage> {
double latitude = 0; double latitude = 0;
double longitude = 0; double longitude = 0;
AddressInfo? _selectedAddress; AddressInfo? _selectedAddress;
@ -88,8 +78,7 @@ class _NewHomeHealthCareStepTowPageState
} }
void _getUserLocation() async { void _getUserLocation() async {
if (await this.sharedPref.getDouble(USER_LAT) != null && if (await this.sharedPref.getDouble(USER_LAT) != null && await this.sharedPref.getDouble(USER_LONG) != null) {
await this.sharedPref.getDouble(USER_LONG) != null) {
var lat = await this.sharedPref.getDouble(USER_LAT); var lat = await this.sharedPref.getDouble(USER_LAT);
var long = await this.sharedPref.getDouble(USER_LONG); var long = await this.sharedPref.getDouble(USER_LONG);
latitude = lat; latitude = lat;
@ -97,8 +86,7 @@ class _NewHomeHealthCareStepTowPageState
currentPostion = LatLng(lat, long); currentPostion = LatLng(lat, long);
setMap(); setMap();
} else { } else {
locationUtils = locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context);
new LocationUtils(isShowConfirmDialog: true, context: context);
locationUtils.getCurrentLocation(callBack: (value) { locationUtils.getCurrentLocation(callBack: (value) {
print(value); print(value);
setMap(); setMap();
@ -138,8 +126,7 @@ class _NewHomeHealthCareStepTowPageState
showCurrentLocation = true; showCurrentLocation = true;
}); });
} else { } else {
latLong = widget latLong = widget.model.addressesList[widget.model.addressesList.length - 1].latLong;
.model.addressesList[widget.model.addressesList.length - 1].latLong;
} }
} }
@ -178,8 +165,7 @@ class _NewHomeHealthCareStepTowPageState
decoration: cardRadius(12), decoration: cardRadius(12),
child: Container( child: Container(
child: InkWell( child: InkWell(
onTap: () => onTap: () => confirmSelectLocationDialog(widget.model.addressesList),
confirmSelectLocationDialog(widget.model.addressesList),
child: Container( child: Container(
padding: EdgeInsets.all(8), padding: EdgeInsets.all(8),
width: double.infinity, width: double.infinity,
@ -212,28 +198,28 @@ class _NewHomeHealthCareStepTowPageState
), ),
InkWell( InkWell(
onTap: () { onTap: () {
Navigator.push( // Navigator.push(
context, // context,
FadePage( // FadePage(
page: LocationPage( // page: LocationPage(
// latitude: latitude, // // latitude: latitude,
// longitude: longitude, // // longitude: longitude,
), // ),
), // ),
).then((value) async { // ).then((value) async {
print(value); // print(value);
await widget.model.getCustomerAddresses(); // await widget.model.getCustomerAddresses();
setState(() {}); // setState(() {});
}); // });
}, },
child: Padding( child: Padding(
padding: EdgeInsets.only(left: 12, right: 12, bottom: 16, top: 8), padding: EdgeInsets.only(left: 12, right: 12, bottom: 16, top: 16),
child: Row( child: Row(
children: [ children: [
Icon(Icons.add_circle_outline_sharp), Icon(Icons.location_on_outlined),
mWidth(12), mWidth(12),
Text( Text(
TranslationBase.of(context).addNewAddress, TranslationBase.of(context).selectLocation,
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
@ -261,23 +247,18 @@ class _NewHomeHealthCareStepTowPageState
), ),
), ),
Padding( Padding(
padding: padding: const EdgeInsets.only(left: 20, right: 20, top: 14, bottom: 14),
const EdgeInsets.only(left: 20, right: 20, top: 14, bottom: 14),
child: DefaultButton( child: DefaultButton(
TranslationBase.of(context).continues, TranslationBase.of(context).continues,
() { () {
setState(() { setState(() {
widget.patientERInsertPresOrderRequestModel!.latitude = widget.patientERInsertPresOrderRequestModel!.latitude = latitude;
latitude; widget.patientERInsertPresOrderRequestModel!.longitude = longitude;
widget.patientERInsertPresOrderRequestModel!.longitude =
longitude;
}); });
navigateTo( navigateTo(
context, context,
NewHomeHealthCareStepThreePage( NewHomeHealthCareStepThreePage(
patientERInsertPresOrderRequestModel: patientERInsertPresOrderRequestModel: widget.patientERInsertPresOrderRequestModel,
widget.patientERInsertPresOrderRequestModel,
model: widget.model, model: widget.model,
), ),
); );
@ -319,8 +300,7 @@ class _NewHomeHealthCareStepTowPageState
goToCurrentLocation() { goToCurrentLocation() {
Geolocator.getCurrentPosition().then((value) { Geolocator.getCurrentPosition().then((value) {
_selectedAddress = _selectedAddress = AddressInfo(latLong: '${value.latitude},${value.longitude}');
AddressInfo(latLong: '${value.latitude},${value.longitude}');
moveToLocation(LatLng(value.latitude, value.longitude)); moveToLocation(LatLng(value.latitude, value.longitude));
}); });
} }

@ -12,6 +12,7 @@ import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/push-notification-handler.dart'; import 'package:diplomaticquarterapp/uitl/push-notification-handler.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:firebase_crashlytics/firebase_crashlytics.dart'; import 'package:firebase_crashlytics/firebase_crashlytics.dart';
import 'package:flutter/foundation.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:flutter_zoom_videosdk/native/zoom_videosdk.dart'; import 'package:flutter_zoom_videosdk/native/zoom_videosdk.dart';
@ -85,7 +86,7 @@ class _SplashScreenState extends State<SplashScreen> {
// debugPrint("ALL SHARED PREFERENCES!!!!!"); // debugPrint("ALL SHARED PREFERENCES!!!!!");
// debugPrint(jsonEncode(value)); // debugPrint(jsonEncode(value));
}); });
await FirebaseCrashlytics.instance.setCrashlyticsCollectionEnabled(true); if (!kDebugMode) await FirebaseCrashlytics.instance.setCrashlyticsCollectionEnabled(true);
// PushNotificationHandler(context).init(); // Asyncronously // PushNotificationHandler(context).init(); // Asyncronously
} }

Loading…
Cancel
Save