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(),

@ -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: () { // onPressed: () {
// },
// ),
print(_tokenData["OpenSessionID"]); // FunctionalButton(
print(_tokenData["OpenTokenID"]); // title: 'Flip',
// icon: Icons.flip_to_back,
VideoChannel.openVideoCallScreen(kApiKey: '46209962', // onPressed: () {},
kSessionId: _tokenData["OpenSessionID"], // ),
kToken: _tokenData["OpenTokenID"], // FunctionalButton(
); // title: 'Mute',
// icon: Icons.mic_off,
}, // onPressed: () {},
), // ),
FunctionalButton( // ],
title: 'Flip', // ),
icon: Icons.flip_to_back,
onPressed: () {}, // SizedBox(
), // height: MediaQuery.of(context).size.height * 0.1,
FunctionalButton( // ),
title: 'Mute', Container(
icon: Icons.mic_off, width: 70.0,
onPressed: () {}, height: 70.0,
), child: FloatingActionButton(
],
),
SizedBox(
height: MediaQuery.of(context).size.height * 0.1,
),
FloatingActionButton(
onPressed: () { onPressed: () {
Navigator.of(context).pop(); Navigator.of(context).pop();
}, },
elevation: 20.0, elevation: 30.0,
shape: CircleBorder(side: BorderSide(color: Colors.red)), shape: CircleBorder(side: BorderSide(color: Colors.red)),
mini: false, mini: false,
child: Icon( child: Icon(
Icons.call_end, Icons.call_end,
color: Colors.red, color: Colors.red,
size: 35,
), ),
backgroundColor: Colors.red[100], backgroundColor: Colors.red[100],
) ))
], ],
), ),
), ),

Loading…
Cancel
Save