Skip to content

Repository files navigation

Check out video demo by clicking below 👇

IMAGE ALT TEXT

🛠️ Extension Enabler 🛠️

A command line dev tool that enables flutter web app as chromium based extension with simple commands

Note

Flutter 3.29+ / CanvasKit: the HTML renderer was removed in Flutter 3.29. The build command now runs flutter build web --csp --no-web-resources-cdn, which bundles CanvasKit locally instead of loading it from a CDN, and the generated manifest allows 'wasm-unsafe-eval' so CanvasKit runs under Manifest V3. This keeps the extension within its Content-Security-Policy. See Flutter issue #165415 for background.

How to install?

Install it as dev_dependencies : Run this command:

flutter pub add -d extension_enabler

or add it as dev dependency in your pubspec.yaml:

dev_dependencies:
  extension_enabler: ^1.1.0

Stepwise Guide :

1. So First, create ⚡ a project in flutter.

 flutter create app_name

2. Install ⚙️ the package as dev dependencies.

flutter pub add -d extension_enabler

3. Run 🏃‍♂️

dart run extension_enabler enable

and fill the details:

image

4. Create a build 🛠️

dart run extension_enabler build

build will be generated in build/web Above command can also use to rebuild the app. And to update config run

dart run extension_enabler update

5. To run in Browser 🌍:

To run the extension on chromium based browser,

go to browser_name://extensions/ enable Developer Mode in the browser and load the extension

Non-interactive (scripts / CI)

enable and update also take flags, so you can skip the prompts. Pass all five to run with no input at all:

dart run extension_enabler enable \
  --name="My Extension" \
  --description="Does something useful" \
  --version=1.0.0 \
  --width=400 \
  --height=350

Any flag you leave out is asked for interactively (for update, an omitted flag keeps the current value). Invalid input exits with a non-zero status.

  • help :
dart run extension_enabler --help

image

  • If you are facing any issues 🤔 feel free to create issues : here
  • if want to improve 🛠️ the package, you are welcome 🙏 : here

Created by Narayan, connect with me narayann.me

About

Package (cli-app) that enables flutter web app as extension(chromium based) with simple commands

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages