Skip to content
pubscout

chrome_extension

0.6.0, released 3 weeks ago by xaha.dev

Access native chrome.* APIs to build Chrome extensions with Dart and Flutter.

WASM-ready
$ flutter pub add chrome_extension
Source repository

What it does

Provides a high-level, type-safe interface for accessing Chrome extension APIs (such as tabs, storage, alarms, runtime) using Dart and Flutter. The library builds on top of dart:js_interop and supports JavaScript and WebAssembly compilation.

AI-written summary of version 0.6.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You are building a Chrome extension or browser extension using Dart or Flutter
  • You need type-safe access to chrome.* APIs like chrome.tabs, chrome.storage, or chrome.runtime

Skip it when

  • You are developing a standard mobile or desktop application unrelated to browser extensions

Strengths

  • Comprehensive coverage of Chrome extension APIs
  • Type-safe interface built on top of dart:js_interop
  • Supports compilation to JavaScript and WebAssembly

Weaknesses

  • Strictly limited to Chrome extensions and browser extension development

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
0

No special dependencies required, uses dart:js_interop.

import 'package:chrome_extension/tabs.dart';

void main() async {
  var tabs = await chrome.tabs.query(QueryInfo(
    active: true,
    currentWindow: true,
  ));
  print(tabs.first.title);
}

Alternatives

Packages that do the same job and could replace chrome_extension.