Video call page updated

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

@ -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();

@ -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<LiveCarePandingListScreen> {
color: Colors
.green, //Colors.black,
onPressed: () => {
sharedPref.setObj(
LIVE_CARE_PATIENT,
item),
@ -226,15 +223,7 @@ class _LiveCarePandingListState extends State<LiveCarePandingListScreen> {
],
),
),
onTap: () {
sharedPref.setObj(
LIVE_CARE_PATIENT,
item);
Navigator.of(context)
.pushNamed(
VIDEO_CALL);
},
onTap: () {},
),
);
}).toList(),

@ -22,7 +22,7 @@ class _VideoCallPageState extends State<VideoCallPage> {
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<VideoCallPage> {
_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<VideoCallPage> {
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<VideoCallPage> {
height: 10.0,
),
Text(
'Calling',
'Dailing...',
style: TextStyle(
color: Colors.deepPurpleAccent,
fontWeight: FontWeight.w300,
@ -146,58 +146,53 @@ class _VideoCallPageState extends State<VideoCallPage> {
),
),
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: <Widget>[
FunctionalButton(
title: 'Speaker',
icon: Icons.phone_in_talk,
// Row(
// mainAxisSize: MainAxisSize.max,
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// crossAxisAlignment: CrossAxisAlignment.center,
// children: <Widget>[
// 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],
))
],
),
),

Loading…
Cancel
Save