vendredi 3 juillet 2020

How do I call my HTML webpage to expand and fit the whole screen?

I have an HTML file that I'm calling in my Flutter app. On fetching the file using WebView, my output looks like the image shown below and does not cover up my entire screen.
This is my code:

<html>
<head>
 <meta charset='utf-8'>
 <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
 <meta http-equiv='X-UA-Compatible' content='IE=edge'>
 <script type="text/javascript" src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="https://s3.amazonaws.com/cdn.theoremreach/v3/theorem_reach.min.js"></script>
</head>
<body>
 <iframe src="https://theoremreach.com/respondent_entry/direct?api_key=abc&user_id=12345"></iframe>
 <script type="text/javascript">
var theoremReachConfig = {
apiKey: "abc",
userId: "12345",
onRewardCenterOpened: onRewardCenterOpened,
onReward: onReward,
onRewardCenterClosed: onRewardCenterClosed
};

var TR = new TheoremReach(theoremReachConfig);

function onRewardCenterOpened(){
console.log("onRewardCenterOpened");

}

function onReward(data){
window.postMessage(data.earnedThisSession)
console.log("onReward: " + data.earnedThisSession);
}

function onRewardCenterClosed(){
console.log("onRewardCenterClosed");
}

if (TR.isSurveyAvailable()) {
TR.showRewardCenter();
}

</script>
</body>
</html>

And this is what the screen looks like:

I am trying to fit the entire WebView on my screen.




Aucun commentaire:

Enregistrer un commentaire