I am using webview_flutter to show a web page. I am using the below code to detect the platform, like is it android or ios. My below code is not working. Flutter webview - https://pub.dev/packages/webview_flutter I have added the below class in body.
class - view-withKeyboard
function applyAfterResize() {
console.log(getMobileOperatingSystem());
if (getMobileOperatingSystem() == 'ios') {
if (originalPotion !== false) {
var wasWithKeyboard = $('body').hasClass('view-withKeyboard');
var nowWithKeyboard = false;
var diff = Math.abs(originalPotion - ($(window).width() + $(window).height()));
if (diff > 100) nowWithKeyboard = true;
$('body').toggleClass('view-withKeyboard', nowWithKeyboard);
if (wasWithKeyboard != nowWithKeyboard) {
//onKeyboardOnOff(nowWithKeyboard);
}
}
}
}
$(document).on('focus blur', '.white-div input[type=text]', function(e){
//alert('here');
if (getMobileOperatingSystem() == 'ios') {
var $obj = $(this);
var nowWithKeyboard = (e.type == 'focusin');
$('body').toggleClass('view-withKeyboard', nowWithKeyboard);
onKeyboardOnOff(nowWithKeyboard);
}
});