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.
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
flutter create app_name
flutter pub add -d extension_enabler
dart run extension_enabler enable
and fill the details:
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
To run the extension on chromium based browser,
go to browser_name://extensions/ enable Developer Mode in the browser and load the extension
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
- If you are facing any issues 🤔 feel free to create issues : here
- if want to improve 🛠️ the package, you are welcome 🙏 : here


