when i add webview controler showing some errors on Postdetail()

import 'package:flutter/material.dart';
import 'package:webview_flutter/webview_flutter.dart';
import 'package:url_launcher/url_launcher.dart';

// ignore: must_be_immutable
class PostDetail extends StatefulWidget {
  final String text;
  final String id;
  String js ="document.querySelector('meta[name=\"viewport\"]').setAttribute('content', 'width=1024px, initial-scale=' + (document.documentElement.clientWidth / 1024));";

  // receive data from the FirstScreen as a parameter
  PostDetail({required this.id, required this.text, key,}) : super(key: null);

  _PostDetailState createState() => _PostDetailState();

class _PostDetailState extends State<PostDetail> {
  late WebViewController _myController;

  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.text)
      body: WebView(
        initialUrl: widget.id,
        javascriptMode: JavascriptMode.unrestricted,
        onWebViewCreated: (controller) {
          _myController = controller;
        onPageStarted: (url) {
            "document.getElementById('mmenu').style.display = 'none'; document.getElementByClassName('pageHeader').style.display = 'none'; document.getElementById('line1').style.display = 'none';"
          _myController.evaluateJavascript("document.getElementByTagName('p').hasAttribute('style').style.display = 'none'; document.getElementByTagName('table').hasAttribute('align').style.display = 'none';");
        userAgent: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20100101 Firefox/4.0",
        navigationDelegate: (NavigationRequest request) {
          if (request.url.startsWith(widget.id)) {
            return NavigationDecision.navigate;
          } else {
            return NavigationDecision.prevent;
  _launchURL(String url) async {
    if (await canLaunch(url)) {
      await launch(url);
    } else {
      throw 'Could not launch $url';

This is my code. When I run this code website is not loading and also Zoom is not working please help me. Please share code with zoom and also hide the header and footer of website. When I use flutter flutter_webview_pulgin it enable zoom but couldnot evaluate javascprit please share code by using any flutter webview pulgin.

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum