Build chrome extension in flutter

Updated 31 May 2024

Save

Chrome extensions serve as powerful tools to enhance users’ browsing experiences, offering functionalities ranging from productivity tools to entertainment utilities. With Flutter’s cross-platform capabilities and rich widget library, building Chrome extensions becomes not only feasible but also efficient and enjoyable. Let’s embark on a journey to explore how you can leverage Flutter to create a Chrome extension in flutter.

In today’s blog we are going to learn about how to build chrome extension in flutter.

Before starting with the blog, if you are looking to develop Mobile Apps, You may also check our flutter app development services.

Implementation

First, Create A New Project in flutter and Remove non-supported scripts tags from index.html

  1. Navigate to web/index.html file and remove all the <script>..</script> tags as shown below:

2. Set the extension height and width

For setting height and width for Extension add inside style property of <html> tag :

 

3. Make changes in the manifest.json file

Navigate to web/manifest.json file and replace the entire content with the following :

 

4. RUN this command to build the extension for web

Open terminal and run below command to build extension for chrome :

 

Create flutter app

Create flutter app and add QR code(qr_flutter: ^4.1.0) generator dependency in pubspec.yaml file and add example code in dart file as below :

 

Installation on chrome

Open chrome and Enable the Developer mode option with toggle present in the top-right corner of the chrome browser.

Install the build extension by clicking on load unpacked option and Select the <flutter_project_dir>/build/web folder.

Output

Conclusion

Thanks for reading this article ❤️

I hope this blog will help you to learn about how to build chrome extension in flutter and you will be able to implement it. For more updates, make sure to keep following Mobikul Blogs to learn more about mobile app development.

Happy Learning ✍️

Other blogs you may like…

QR Code Generator in Flutter

Reference

https://docs.flutter.dev/platform-integration/web/building

author
. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


Be the first to comment.

Start a Project


    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home