Penguin SDK changes & crashlytics

dev_3.13.6_Development
haroon amjad 1 year ago
parent 21403a2bba
commit cd7da0dd70

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

@ -204,6 +204,7 @@ internal class PenguinView(
// .setDeepLinkData("deeplink")
.setCustomizeColor("#2CA0AF")
.setDeepLinkSchema("")
.setIsEnableReportIssue(true)
.build()
// Set location delegate to handle location updates
@ -215,7 +216,17 @@ internal class PenguinView(
// }
// 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
PlugAndPlaySDK.start(mContext, this)

@ -22,7 +22,7 @@ var PACKAGES_ORDER_HISTORY = '/api/orders/items';
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:4422/';
// var BASE_URL = 'https://uat.hmgwebservices.com/';
var BASE_URL = 'https://uat.hmgwebservices.com/';
// var BASE_URL = 'https://hmgwebservices.com/';
// var BASE_URL = 'http://10.20.200.111:1010/';
// 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://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/';
@ -698,10 +698,10 @@ var GET_PROJECT_FROM_NFC = 'Services/OUTPs.svc/Rest/GetProjectByNFC';
//PAYFORT
var getPayFortProjectDetails = "Services/PayFort_Serv.svc/REST/GetPayFortProjectDetails";
var addPayFortApplePayResponse = "Services/PayFort_Serv.svc/REST/AddResponse";
var payFortEnvironment = FortEnvironment.production;
var applePayMerchantId = "merchant.com.hmgwebservices";
// var payFortEnvironment = FortEnvironment.test;
// var applePayMerchantId = "merchant.com.hmgwebservices.uat";
// var payFortEnvironment = FortEnvironment.production;
// var applePayMerchantId = "merchant.com.hmgwebservices";
var payFortEnvironment = FortEnvironment.test;
var applePayMerchantId = "merchant.com.hmgwebservices.uat";
class AppGlobal {
static var context;

@ -184,8 +184,8 @@ class BaseAppClient {
// body['IdentificationNo'] = 1023854217;
// body['MobileNo'] = "531940021"; //0560717232
// body['PatientID'] = 4769791; //4609100
// body['TokenID'] = "@dm!n";
body['PatientID'] = 1231755; //4609100
body['TokenID'] = "@dm!n";
// Patient ID: 3027574
// Mobile no.: 0502303285
@ -195,7 +195,7 @@ class BaseAppClient {
// if (url == 'https://uat.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) {

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

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

Loading…
Cancel
Save