How to inject a simple code in Flutter WebView to hide a part of the website (footer)?

You can try

flutterWebviewPlugin.evalJavascript('alert("Hello World")')

Remember that the evalJavascript() expects the JS not HTML, So you can't use like

flutterWebviewPlugin.evalJavascript('<script language="JavaScript" type="text/javascript">alert("Hello World")</script>')

Here is the complete example for your reference,

import 'package:flutter/material.dart';
import 'package:flutter_webview_plugin/flutter_webview_plugin.dart';

class JSInWebView extends StatefulWidget {
  JSInWebViewState createState() {
    return new JSInWebViewState();

class JSInWebViewState extends State<JSInWebView> {
  final flutterWebviewPlugin = new FlutterWebviewPlugin();
  // alternatively you can define variable as var js = "YOUR_SCRIPT"; and use it inside evalJavascript

  void initState(){
    flutterWebviewPlugin.evalJavascript("alert('Hi, I just executed')");

  void dispose() {

  Widget build(BuildContext context) {
    return WebviewScaffold(
      url: '',
      hidden: true,
      appBar: AppBar(title: Text("Elite")),