Video call page updated

merge-requests/143/head
Sultan Khan 6 years ago
parent b66eebfd10
commit cad6892c8b

@ -26,7 +26,7 @@ class LiveCareProvider with ChangeNotifier {
var profile = await sharedPref.getObj(DOCTOR_PROFILE); var profile = await sharedPref.getObj(DOCTOR_PROFILE);
_pendingRequestModel.projectID = await sharedPref.getInt(PROJECT_ID); _pendingRequestModel.projectID = await sharedPref.getInt(PROJECT_ID);
_pendingRequestModel.doctorID = profile['DoctorID']; _pendingRequestModel.doctorID = profile['DoctorID'];
_pendingRequestModel.sErServiceID = "1,3"; _pendingRequestModel.sErServiceID = "1,3,7";
_pendingRequestModel.sourceID = 1; _pendingRequestModel.sourceID = 1;
_pendingRequestModel.patientData = PatientData(isOutKSA: false); _pendingRequestModel.patientData = PatientData(isOutKSA: false);
resetDefaultValues(); resetDefaultValues();

@ -1,6 +1,5 @@
import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/providers/livecare_provider.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/dr_app_shared_pref.dart';
import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
@ -208,8 +207,6 @@ class _LiveCarePandingListState extends State<LiveCarePandingListScreen> {
color: Colors color: Colors
.green, //Colors.black, .green, //Colors.black,
onPressed: () => { onPressed: () => {
sharedPref.setObj( sharedPref.setObj(
LIVE_CARE_PATIENT, LIVE_CARE_PATIENT,
item), item),
@ -226,15 +223,7 @@ class _LiveCarePandingListState extends State<LiveCarePandingListScreen> {
], ],
), ),
), ),
onTap: () { onTap: () {},
sharedPref.setObj(
LIVE_CARE_PATIENT,
item);
Navigator.of(context)
.pushNamed(
VIDEO_CALL);
},
), ),
); );
}).toList(), }).toList(),

@ -22,7 +22,7 @@ class _VideoCallPageState extends State<VideoCallPage> {
String _timmer = ''; String _timmer = '';
LiveCareProvider _liveCareProvider; LiveCareProvider _liveCareProvider;
bool _isInit = true; bool _isInit = true;
var _tokenData; var _tokenData;
var patientData = {}; var patientData = {};
String image_url = 'https://hmgwebservices.com/Images/MobileImages/DUBAI/'; String image_url = 'https://hmgwebservices.com/Images/MobileImages/DUBAI/';
//bool _isOutOfStuck = false; //bool _isOutOfStuck = false;
@ -41,11 +41,11 @@ class _VideoCallPageState extends State<VideoCallPage> {
_tokenData = tokenData; _tokenData = tokenData;
/* opentok functionalites need to be written */ /* opentok functionalites need to be written */
VideoChannel.openVideoCallScreen(kApiKey: '46209962', VideoChannel.openVideoCallScreen(
kApiKey: '46209962',
kSessionId: _tokenData["OpenSessionID"], kSessionId: _tokenData["OpenSessionID"],
kToken: _tokenData["OpenTokenID"], kToken: _tokenData["OpenTokenID"],
); );
} }
String getTimerTime(int start) { String getTimerTime(int start) {
@ -90,8 +90,8 @@ class _VideoCallPageState extends State<VideoCallPage> {
return Scaffold( return Scaffold(
body: SafeArea( body: SafeArea(
child: Container( child: Container(
height: MediaQuery.of(context).size.height * 1.09, height: MediaQuery.of(context).size.height,
// width: MediaQuery.of(context).size.width, width: MediaQuery.of(context).size.width,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
), ),
@ -105,7 +105,7 @@ class _VideoCallPageState extends State<VideoCallPage> {
height: 10.0, height: 10.0,
), ),
Text( Text(
'Calling', 'Dailing...',
style: TextStyle( style: TextStyle(
color: Colors.deepPurpleAccent, color: Colors.deepPurpleAccent,
fontWeight: FontWeight.w300, fontWeight: FontWeight.w300,
@ -146,58 +146,53 @@ class _VideoCallPageState extends State<VideoCallPage> {
), ),
), ),
SizedBox( SizedBox(
height: MediaQuery.of(context).size.height * 0.02, height: MediaQuery.of(context).size.height * .2,
), ),
Row( // Row(
mainAxisSize: MainAxisSize.max, // mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween, // mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center, // crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[ // children: <Widget>[
FunctionalButton( // FunctionalButton(
title: 'Speaker', // title: 'Speaker',
icon: Icons.phone_in_talk, // 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: () { onPressed: () {
Navigator.of(context).pop();
print(_tokenData["OpenSessionID"]);
print(_tokenData["OpenTokenID"]);
VideoChannel.openVideoCallScreen(kApiKey: '46209962',
kSessionId: _tokenData["OpenSessionID"],
kToken: _tokenData["OpenTokenID"],
);
}, },
), elevation: 30.0,
FunctionalButton( shape: CircleBorder(side: BorderSide(color: Colors.red)),
title: 'Flip', mini: false,
icon: Icons.flip_to_back, child: Icon(
onPressed: () {}, Icons.call_end,
), color: Colors.red,
FunctionalButton( size: 35,
title: 'Mute', ),
icon: Icons.mic_off, backgroundColor: Colors.red[100],
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],
)
], ],
), ),
), ),

Loading…
Cancel
Save