套件概覽
一個 Dart 庫,可在 Flutter web 應用中存取 Chrome 擴展 API,例如 `chrome.runtime`、`chrome.storage` 和 `chrome.tabs`。專為使用 Flutter 開發 Chrome 擴展的開發者設計,提供類型安全的介面以與瀏覽器層級功能互動。此套件彌補了 Flutter 的 web 功能與原生 Chrome 擴展功能之間的差距,可順暢整合擴展特定行為,如背景腳本、彈出視窗互動及儲存管理。由 xaha.dev 維護,並託管於 GitHub,以確保透明度與社群貢獻。
適用情境
- 使用 Flutter 建立 Chrome 擴充程式
- 在網頁應用中訪問瀏覽器儲存
- 管理標籤頁和執行時間事件
- 建立彈出式介面
- 實作背景服務
主要特色
- Direct access to chrome.* APIs
- Type-safe Dart wrappers
- Web-only compatibility
- GitHub-hosted source code
- Simple pub add integration
適合對象
- Flutter web developers
- Chrome extension creators
- Browser automation projects
- Cross-platform extension tools
- Dart-focused web app builders
使用建議
- Only works on web platform
- Requires Chrome extension manifest setup
- Limited to Chrome-specific features
- Not compatible with non-Chrome browsers
- Depends on JavaScript interop