GithubHelp home page GithubHelp logo

islamdidarmd / flutter_adblocker_webview Goto Github PK

View Code? Open in Web Editor NEW
8.0 2.0 5.0 108 KB

A webview implementation of in Flutter that blocks most of the ads that appear inside of the webpages

Home Page: https://pub.dev/packages/adblocker_webview

License: BSD 3-Clause "New" or "Revised" License

Kotlin 0.76% Swift 1.89% Objective-C 0.18% Dart 90.84% Ruby 6.34%
adblocker dart flutter flutterdev adblocker-webview

flutter_adblocker_webview's Introduction

flutter_adblocker_webview's People

Contributors

islamdidarmd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

flutter_adblocker_webview's Issues

Support for flutter_adblocker_webview as a plug-and-play solution for flutter_inappwebview

I would like to request support for integrating flutter_adblocker_webview as a simple plug-and-play solution for flutter_inappwebview.

Currently, many developers, including myself, have existing codebases that utilize flutter_inappwebview for embedding web content within Flutter applications. However, we would like to enhance our apps by incorporating adblocking functionality without having to completely rewrite our WebView implementation.

The flutter_adblocker_webview package provides excellent adblocking capabilities, which could greatly benefit developers who are already using flutter_inappwebview. It would be fantastic if we could seamlessly integrate flutter_adblocker_webview into our existing projects without the need for significant modifications.

By offering compatibility between flutter_inappwebview and flutter_adblocker_webview, developers could easily add adblocking functionality to their apps without sacrificing the stability and features provided by flutter_inappwebview. This integration would save us time, effort, and potential compatibility issues that might arise from migrating to a different WebView package.

Thank you for considering this integration request. I believe it would be a valuable addition to both flutter_inappwebview and flutter_adblocker_webview, enabling developers to enhance their applications with adblocking capabilities effortlessly. If you require any further information or have any questions, please let me know!

I will try opening pulls to implement this functionally!

Make more reusabe

Hello bro,

You need to apply cache mechanism once the file is load by api it must be reused.Everytime user open webview you api is calling again ang again least provide additional parameter use like to cache loaded till that hours.

i think its not working ?

Qemu.2024.04.03.-.22.08.51.01.mp4

like in video its just keep open ads

my code :

import 'package:WatchMoviesAndSeries/components/user_input_method.dart';
import 'package:adblocker_webview/adblocker_webview.dart';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
import 'package:media_kit/media_kit.dart';
import 'package:web_video_player/player.dart';
import 'package:webview_all/webview_all.dart';

class movie_player extends StatefulWidget {
  movie_player({super.key});

  @override
  State<movie_player> createState() => _movie_playerState();
}

class _movie_playerState extends State<movie_player> {
  final player = Player();

  final playerWidget =
      WebVideoPlayer(url: 'https://vidsrc.xyz/embed/movie/$userInput');

  final _adBlockerWebviewController = AdBlockerWebviewController.instance;

  @override
  Widget build(BuildContext context) {
    return Scaffold(backgroundColor: Colors.black, body: MyApp());
  }
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      title: 'Webview All',
      debugShowCheckedModeBanner: false,
      home: MyBrowser(),
    );
  }
}

class MyBrowser extends StatefulWidget {
  const MyBrowser({Key? key, this.title}) : super(key: key);
  final String? title;

  @override
  _MyBrowserState createState() => _MyBrowserState();
}

class _MyBrowserState extends State<MyBrowser> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Padding(
        padding: EdgeInsets.only(
          top: 44,
        ),
        child: Center(

            // Look here!
            child: AdBlockerWebview(
          url: Uri.parse("https://vidsrc.xyz/embed/movie/$userInput"),
          adBlockerWebviewController: AdBlockerWebviewController.instance,
          onProgress: (progress) {
            setState(() {
              progress;
            });
          },
          shouldBlockAds: true,

          /// Other params if required
        )
            // child: Webview(

            //   url: "https://vidsrc.xyz/embed/movie/$userInput",
            // ),
            ),
      ),
    );
  }
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.