Updates & fixes

sultan_v3.3
haroon amjad 2 years ago
parent 0e01835327
commit 6bdb7a3305

@ -6,6 +6,7 @@
In most cases you can leave this as-is, but you if you want to provide
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />

@ -863,7 +863,7 @@ const Map localizedValues = {
"question": {"en": "Question", "ar": "سؤال"},
"message-type": {"en": "Message Type", "ar": "نوع الرسالة"},
"feedback-type": {"en": "Feedback Type", "ar": "نوع الرسالة"},
"compliment": {"en": "compliment", "ar": "شكوى"},
"compliment": {"en": "Appreciation", "ar": "تقدير"},
"suggestion": {"en": "Suggestion", "ar": "إقتراح"},
"your-feedback": {"en": "Your feedback was sent", "ar": "لقد تم ارسال اقتراحك شكرا لك"},
"select-part": {"en": "Please select the part that complain about", "ar": "يرجى تحديد الجزء الذي تشكو منه"},
@ -1843,7 +1843,7 @@ const Map localizedValues = {
"privacyPolicy": {"en": "Privacy Policy", "ar": "سياسة الخصوصية"},
"termsConditions": {"en": "Terms & Conditions", "ar": "الأحكام والشروط"},
"prescriptionDeliveryError": {"en": "This clinic does not support refill & delivery.", "ar": "هذه العيادة لا تدعم إعادة التعبئة والتسليم."},
"liveCarePermissions": {"en": "LiveCare requires Camera, Microphone & Location permissions, Please allow these to proceed.", "ar": "يتطلب لايف كير أذونات الكاميرا والميكروفون والموقع، يرجى السماح لها بالمتابعة."},
"liveCarePermissions": {"en": "LiveCare requires Camera, Microphone & Location permissions to enable virtual consultation between patient & doctor, Please allow these to proceed.", "ar": "يتطلب لايف كير أذونات الكاميرا والميكروفون والموقع، يرجى السماح لها بالمتابعة."},
"lakumUnhold": { "en": "The account has already been activated", "ar": "لقد تم تفعيل الحساب من قبل" },
"lakumDiscontinue": { "en": "The account is closed", "ar": "الحساب مغلق" },
"lakumSuccess": { "en": "The account has been activated successfully", "ar": "تم تفعيل الحساب بنجاح" },

@ -340,8 +340,8 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
});
}
},
color: Color(0xffD02127),
textColor: (titleController.text.toString().isEmpty || messageController.text.toString().isEmpty) ? Color(0xff000000) : Colors.white,
color: (titleController.text.toString().isEmpty || messageController.text.toString().isEmpty) ? Color(0xffEAEAEA) : Color(0xffD02127),
textColor: Colors.white,
disabledColor: Color(0xffEAEAEA),
),
),
@ -405,8 +405,8 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
color: Color(0xff575757),
letterSpacing: -0.56,
),
suffixIconConstraints: BoxConstraints(minWidth: 50),
suffixIcon: suffixTap == null ? null : IconButton(icon: Icon(Icons.mic, color: Color(0xff2E303A)), onPressed: suffixTap),
// suffixIconConstraints: BoxConstraints(minWidth: 50),
// suffixIcon: suffixTap == null ? null : IconButton(icon: Icon(Icons.mic, color: Color(0xff2E303A)), onPressed: suffixTap),
contentPadding: EdgeInsets.zero,
border: InputBorder.none,
focusedBorder: InputBorder.none,

@ -49,7 +49,7 @@ class _IncomingCallState extends State<IncomingCall> with SingleTickerProviderSt
void dispose() {
_animationController.dispose();
player.stop();
_controller.dispose();
// _controller.dispose();
disposeAudioResources();
super.dispose();
}
@ -62,17 +62,17 @@ class _IncomingCallState extends State<IncomingCall> with SingleTickerProviderSt
body: FutureBuilder<void>(
future: _initializeControllerFuture,
builder: (context, snapshot) {
if (snapshot.connectionState == ConnectionState.done) {
// if (snapshot.connectionState == ConnectionState.done) {
return Stack(
alignment: FractionalOffset.center,
children: <Widget>[
new Positioned.fill(
child: new AspectRatio(aspectRatio: _controller.value.aspectRatio, child: new CameraPreview(_controller)),
),
// new Positioned.fill(
// child: new AspectRatio(aspectRatio: _controller.value.aspectRatio, child: new CameraPreview(_controller)),
// ),
new Positioned.fill(
child: new ClipRect(
child: new BackdropFilter(
filter: new ImageFilter.blur(sigmaX: 10.0, sigmaY: 10.0),
// child: new BackdropFilter(
// filter: new ImageFilter.blur(sigmaX: 10.0, sigmaY: 10.0),
child: new Container(
decoration: new BoxDecoration(color: Colors.grey[800].withOpacity(0.8)),
child: Column(
@ -191,29 +191,18 @@ class _IncomingCallState extends State<IncomingCall> with SingleTickerProviderSt
),
),
),
),
// ),
],
);
} else {
return const Center(child: CircularProgressIndicator());
}
// } else {
// return const Center(child: CircularProgressIndicator());
// }
},
),
);
}
void _runAnimation() async {
final cameras = await availableCameras();
final firstCamera = cameras[1];
_controller = CameraController(
// Get a specific camera from the list of available cameras.
firstCamera,
// Define the resolution to use.
ResolutionPreset.medium,
);
_initializeControllerFuture = _controller.initialize();
setState(() {
isCameraReady = true;
});
@ -229,7 +218,7 @@ class _IncomingCallState extends State<IncomingCall> with SingleTickerProviderSt
try {
// backToHome();
// final roomModel = RoomModel(name: widget.incomingCallData.name, token: widget.incomingCallData.sessionId, identity: widget.incomingCallData.identity);
await _controller.dispose();
// await _controller.dispose();
changeCallStatusAPI(4);
await Navigator.of(context).pushReplacement(
MaterialPageRoute(

@ -10,6 +10,7 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/covid_consent_dialog.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
@ -290,7 +291,7 @@ class _LiveCarePatmentPageState extends State<LiveCarePatmentPage> {
AppToast.showErrorToast(message: TranslationBase.of(context).pleaseAcceptTerms);
} else {
askVideoCallPermission().then((value) async {
if (value) {
if (value == true) {
locationUtils = new LocationUtils(isShowConfirmDialog: false, context: context);
locationUtils.getCurrentLocation(callBack: (value) {
print(value);
@ -322,10 +323,29 @@ class _LiveCarePatmentPageState extends State<LiveCarePatmentPage> {
}
Future<bool> askVideoCallPermission() async {
if (!(await Permission.camera.request().isGranted) || !(await Permission.microphone.request().isGranted) || !(await Permission.location.request().isGranted)) {
return false;
if (Platform.isIOS) {
if (!(await Permission.camera.request().isGranted) || !(await Permission.microphone.request().isGranted) || !(await Permission.location.request().isGranted)) {
return false;
}
} else {
await showDialog(
context: context,
builder: (cxt) => CovidConsentDialog(
okTitle: TranslationBase.of(context).acceptLbl,
title: TranslationBase.of(context).covidConsentHeader,
message: TranslationBase.of(context).liveCarePermissions,
onTap: () async {
if (!(await Permission.camera.request().isGranted) || !(await Permission.microphone.request().isGranted) || !(await Permission.location.request().isGranted)) {
return false;
}
},
));
}
return true;
// if (!(await Permission.camera.request().isGranted) || !(await Permission.microphone.request().isGranted) || !(await Permission.location.request().isGranted)) {
// return false;
// }
// return true;
}
openPermissionsDialog() {
@ -342,6 +362,17 @@ class _LiveCarePatmentPageState extends State<LiveCarePatmentPage> {
dialog.showAlertDialog(context);
}
openPermissionsConsentDialog() {
showDialog(
context: context,
builder: (cxt) => CovidConsentDialog(
okTitle: TranslationBase.of(context).acceptLbl,
title: TranslationBase.of(context).covidConsentHeader,
message: TranslationBase.of(context).covidConsent,
onTap: () async {},
));
}
Future drawOverAppsMessageDialog(BuildContext context) async {
ConfirmDialog dialog = new ConfirmDialog(
context: context,

@ -14,10 +14,10 @@ class AppPermission{
if (!(await Permission.camera.request().isGranted) || !(await Permission.microphone.request().isGranted)) {
return false;
}
if (Platform.isAndroid && !(await PlatformBridge.shared().isDrawOverAppsPermissionAllowed())) {
await _drawOverAppsMessageDialog(context);
return false;
}
// if (Platform.isAndroid && !(await PlatformBridge.shared().isDrawOverAppsPermissionAllowed())) {
// await _drawOverAppsMessageDialog(context);
// return false;
// }
return true;
}

@ -22,6 +22,7 @@ import 'package:flutter_ios_voip_kit/call_state_type.dart';
import 'package:flutter_ios_voip_kit/flutter_ios_voip_kit.dart';
import 'package:huawei_hmsavailability/huawei_hmsavailability.dart';
import 'package:huawei_push/huawei_push.dart' as h_push;
import 'package:permission_handler/permission_handler.dart';
import 'app_shared_preferences.dart';
import 'navigation_service.dart';
@ -236,6 +237,11 @@ class PushNotificationHandler {
if (Platform.isIOS) {
final permission = await FirebaseMessaging.instance.requestPermission();
if (permission.authorizationStatus == AuthorizationStatus.denied) return;
} else {
// await Permission.notification.request().then((value) {
// }).catchError((err) {
// print(err);
// });
}
// 'Android HMS' (Handle Huawei Push_Kit Streams)
@ -245,15 +251,21 @@ class PushNotificationHandler {
// } else {
// 'Android GMS or iOS' (Handle Firebase Messaging Streams
FirebaseMessaging.instance.getInitialMessage().then((RemoteMessage message) async {
print("Firebase getInitialMessage with message : ${message.data.toString()}");
subscribeFCMTopic();
if (Platform.isIOS)
await Future.delayed(Duration(milliseconds: 3000)).then((value) {
if (message != null) newMessage(message);
});
else if (message != null) newMessage(message);
});
try {
FirebaseMessaging.instance.getInitialMessage().then((RemoteMessage message) async {
if(message != null) {
// print("Firebase getInitialMessage with message : ${message.data.toString()}");
subscribeFCMTopic();
if (Platform.isIOS)
await Future.delayed(Duration(milliseconds: 3000)).then((value) {
if (message != null) newMessage(message);
});
else if (message != null) newMessage(message);
}
});
} catch(ex) {
}
FirebaseMessaging.onMessage.listen((RemoteMessage message) async {
print("Firebase onMessage!!!");

@ -1,7 +1,7 @@
name: diplomaticquarterapp
description: A new Flutter application.
version: 4.5.008+4050008
version: 4.5.013+4050013
environment:
sdk: ">=2.7.0 <3.0.0"
@ -40,7 +40,7 @@ dependencies:
camera: ^0.10.1
# Permissions
permission_handler: ^8.3.0
permission_handler: ^10.2.0
# Flutter Html View
flutter_html: ^2.2.1

Loading…
Cancel
Save