[📚] firebase_ai works on Windows, but pub.dev and the docs don't list it
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 72/100
- issue の種類
- ドキュメント
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
調査の方向性
firebase_ai のドキュメント、pubspec、platform_header_helper.dart から始め、次に、ドキュメントに記載されたプラットフォーム一覧と、ここで説明されている Windows の動作を比較します。Windows のサポートと、API-key および App Check に関する注意点を文書化します。プラットフォーム宣言を更新する場合は、pub.dev に Windows が掲載されていることを確認し、Windows で package をテストします。
索引モデルが issue の本文から書いたものです。
説明
Summary
firebase_ai works on Windows desktop, but nothing says so. The pub.dev page lists Android, iOS, macOS and web, and the Firebase AI Logic Flutter docs don't mention Windows. We assumed it was unsupported and kept it disabled on Windows in our app until we tested it.
What we tested
Windows 10 22H2, debug builds:
- A minimal Flutter app with
firebase_ai3.15.0 and again with 4.0.0:Firebase.initializeApp(options: DefaultFirebaseOptions.windows), thenFirebaseAI.agentPlatform(location: 'us-central1').generativeModel(model: 'gemini-2.5-flash-lite').generateContentandgenerateContentStreamboth returned complete responses. No signed-in user, no App Check. - Our production app on 3.15.0, as an integration test with a signed-in Firebase Auth user:
generateContentandgenerateContentStreamatus-east5both returned complete responses.
We also called the REST endpoint directly with the Windows app's API key and no identity headers; global, us-central1, us-east5 and europe-west4 all answered.
Why it works
The package's only native code is the getPlatformHeaders method channel, which supplies the API-key identity headers (X-Android-Package / X-Android-Cert, x-ios-bundle-identifier). On Windows no plugin is registered, so getPlatformSecurityHeaders() in platform_header_helper.dart catches the missing channel and sends no identity headers, the same path web takes. Everything else is plain Dart HTTP.
pub.dev derives its platform tags from flutter.plugin.platforms in the pubspec. There is no windows entry, so the package shows as unsupported there.
Suggestion
- Document Windows as supported, with the two caveats that come from having no native plugin: the API key can't be restricted to a Windows app identity (it behaves like the web key), and there is no Windows App Check provider, so enforcing App Check for AI Logic would block Windows clients.
- Optionally declare Windows in the pubspec (a
dartPluginClass, or whatever you prefer) so pub.dev lists the platform.
Happy to test a change on Windows.
- 主要言語
- Dart
- スター
- 9.3k
- フォーク
- 4.1k
- 平均マージ
- 1日 14時間
- マージ済み PR(30日)
- 39
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
firebase/flutterfire のほかの issue
-
Needs Attention platform: windows plugin: cloud_firestore reproduced type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
firebase/flutterfire#18735 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[cloud_firestore]: a snapshots() listener cancelled while it registers is never removed nativelyオープンNeeds Attention platform: android platform: ios platform: macos plugin: cloud_firestore reproduced type: bug
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
firebase/flutterfire#18724 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
blocked: customer-response platform: web plugin: cloud_firestore type: bug
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
firebase/flutterfire#18700 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Needs Attention platform: ios plugin: messaging reproduced type: bug
難易度 3/5 1〜2日 初心者へのやさしさ 74/100
firebase/flutterfire#18699 · コメント 4 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
blocked: flutter platform: windows plugin: storage reproduced type: bug
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
firebase/flutterfire#18664 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
firebase/flutterfire の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
immich-app/immich#31955 ·
メンテナーはふだん 1 日以内に返信
-
bug triage
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
fluttercommunity/plus_plugins#3994 ·
メンテナーはふだん 1 日以内に返信
-
[BUG] iOS: a feature drag interrupted by the system never ends, and the next pan drags the featureオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
maplibre/flutter-maplibre-gl#1053 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100