diff --git a/lib/providers/livecare_provider.dart b/lib/providers/livecare_provider.dart index dcce7e0e..20ee8db0 100644 --- a/lib/providers/livecare_provider.dart +++ b/lib/providers/livecare_provider.dart @@ -26,7 +26,7 @@ class LiveCareProvider with ChangeNotifier { var profile = await sharedPref.getObj(DOCTOR_PROFILE); _pendingRequestModel.projectID = await sharedPref.getInt(PROJECT_ID); _pendingRequestModel.doctorID = profile['DoctorID']; - _pendingRequestModel.sErServiceID = "1,3"; + _pendingRequestModel.sErServiceID = "1,3,7"; _pendingRequestModel.sourceID = 1; _pendingRequestModel.patientData = PatientData(isOutKSA: false); resetDefaultValues(); diff --git a/lib/screens/live_care/panding_list.dart b/lib/screens/live_care/panding_list.dart index ce139455..18b787cd 100644 --- a/lib/screens/live_care/panding_list.dart +++ b/lib/screens/live_care/panding_list.dart @@ -1,6 +1,5 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/providers/livecare_provider.dart'; -import 'package:doctor_app_flutter/util/VideoChannel.dart'; import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; @@ -208,8 +207,6 @@ class _LiveCarePandingListState extends State { color: Colors .green, //Colors.black, onPressed: () => { - - sharedPref.setObj( LIVE_CARE_PATIENT, item), @@ -226,15 +223,7 @@ class _LiveCarePandingListState extends State { ], ), ), - onTap: () { - sharedPref.setObj( - LIVE_CARE_PATIENT, - item); - Navigator.of(context) - .pushNamed( - VIDEO_CALL); - - }, + onTap: () {}, ), ); }).toList(), diff --git a/lib/screens/live_care/video_call.dart b/lib/screens/live_care/video_call.dart index 596f5f20..7d960101 100644 --- a/lib/screens/live_care/video_call.dart +++ b/lib/screens/live_care/video_call.dart @@ -22,7 +22,7 @@ class _VideoCallPageState extends State { String _timmer = ''; LiveCareProvider _liveCareProvider; bool _isInit = true; - var _tokenData; + var _tokenData; var patientData = {}; String image_url = 'https://hmgwebservices.com/Images/MobileImages/DUBAI/'; //bool _isOutOfStuck = false; @@ -41,11 +41,11 @@ class _VideoCallPageState extends State { _tokenData = tokenData; /* opentok functionalites need to be written */ - VideoChannel.openVideoCallScreen(kApiKey: '46209962', + VideoChannel.openVideoCallScreen( + kApiKey: '46209962', kSessionId: _tokenData["OpenSessionID"], - kToken: _tokenData["OpenTokenID"], + kToken: _tokenData["OpenTokenID"], ); - } String getTimerTime(int start) { @@ -90,8 +90,8 @@ class _VideoCallPageState extends State { return Scaffold( body: SafeArea( child: Container( - height: MediaQuery.of(context).size.height * 1.09, - // width: MediaQuery.of(context).size.width, + height: MediaQuery.of(context).size.height, + width: MediaQuery.of(context).size.width, decoration: BoxDecoration( color: Colors.white, ), @@ -105,7 +105,7 @@ class _VideoCallPageState extends State { height: 10.0, ), Text( - 'Calling', + 'Dailing...', style: TextStyle( color: Colors.deepPurpleAccent, fontWeight: FontWeight.w300, @@ -146,58 +146,53 @@ class _VideoCallPageState extends State { ), ), SizedBox( - height: MediaQuery.of(context).size.height * 0.02, + height: MediaQuery.of(context).size.height * .2, ), - Row( - mainAxisSize: MainAxisSize.max, - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - FunctionalButton( - title: 'Speaker', - icon: Icons.phone_in_talk, + // Row( + // mainAxisSize: MainAxisSize.max, + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + // crossAxisAlignment: CrossAxisAlignment.center, + // children: [ + // FunctionalButton( + // title: 'Speaker', + // icon: Icons.phone_in_talk, + // onPressed: () { + + // }, + // ), + // FunctionalButton( + // title: 'Flip', + // icon: Icons.flip_to_back, + // onPressed: () {}, + // ), + // FunctionalButton( + // title: 'Mute', + // icon: Icons.mic_off, + // onPressed: () {}, + // ), + // ], + // ), + + // SizedBox( + // height: MediaQuery.of(context).size.height * 0.1, + // ), + Container( + width: 70.0, + height: 70.0, + child: FloatingActionButton( onPressed: () { - - - - print(_tokenData["OpenSessionID"]); - print(_tokenData["OpenTokenID"]); - - VideoChannel.openVideoCallScreen(kApiKey: '46209962', - kSessionId: _tokenData["OpenSessionID"], - kToken: _tokenData["OpenTokenID"], - ); - + Navigator.of(context).pop(); }, - ), - FunctionalButton( - title: 'Flip', - icon: Icons.flip_to_back, - onPressed: () {}, - ), - FunctionalButton( - title: 'Mute', - icon: Icons.mic_off, - onPressed: () {}, - ), - ], - ), - SizedBox( - height: MediaQuery.of(context).size.height * 0.1, - ), - FloatingActionButton( - onPressed: () { - Navigator.of(context).pop(); - }, - elevation: 20.0, - shape: CircleBorder(side: BorderSide(color: Colors.red)), - mini: false, - child: Icon( - Icons.call_end, - color: Colors.red, - ), - backgroundColor: Colors.red[100], - ) + elevation: 30.0, + shape: CircleBorder(side: BorderSide(color: Colors.red)), + mini: false, + child: Icon( + Icons.call_end, + color: Colors.red, + size: 35, + ), + backgroundColor: Colors.red[100], + )) ], ), ),