|
|
|
|
@ -13,7 +13,7 @@ class VideoCallWebPage extends StatelessWidget{
|
|
|
|
|
final String receiverId;
|
|
|
|
|
final String callerId;
|
|
|
|
|
VideoCallWebPage({@required this.receiverId, @required this.callerId}){
|
|
|
|
|
request = URLRequest(url: Uri.parse("https://vcallapi.hmg.com/index.html?username=$receiverId"));
|
|
|
|
|
request = URLRequest(url: Uri.parse("https://vcallapi.hmg.com/Mobileindex.html?username=$receiverId&doctorid=$callerId"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
InAppWebViewGroupOptions options = InAppWebViewGroupOptions(
|
|
|
|
|
@ -64,7 +64,7 @@ class VideoCallWebPage extends StatelessWidget{
|
|
|
|
|
onLoadStart: onLoadStart,
|
|
|
|
|
onLoadError: onError,
|
|
|
|
|
onConsoleMessage: onConsoleMessage,
|
|
|
|
|
shouldOverrideUrlLoading: shouldRedirect ,
|
|
|
|
|
// shouldOverrideUrlLoading: shouldRedirect ,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
@ -93,11 +93,18 @@ class VideoCallWebPage extends StatelessWidget{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
onLoadStart(InAppWebViewController controller, Uri url) {
|
|
|
|
|
print(url);
|
|
|
|
|
if(url.toString().toLowerCase().contains("endcallpage")){
|
|
|
|
|
Navigator.pop(webViewKey.currentContext);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Future<NavigationActionPolicy> shouldRedirect(InAppWebViewController controller, NavigationAction navigationAction) async {
|
|
|
|
|
var uri = navigationAction.request.url;
|
|
|
|
|
if(uri.queryParameters['exit'] == "yes"){
|
|
|
|
|
// if(uri.queryParameters['exit'] == "yes"){
|
|
|
|
|
// Navigator.pop(webViewKey.currentContext);
|
|
|
|
|
// }
|
|
|
|
|
if(uri.toString().toLowerCase().contains("endcallpage")){
|
|
|
|
|
Navigator.pop(webViewKey.currentContext);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|