Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[core] Decouple platform_interface from Flutter for pure-Dart web

オープン
#18,645 コメント 3 件 リアクション 2 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@Lyokone がすでに取り組んでいます。

2026年9月17日 から。

  • #18788 @cedvdb による — オープン

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
リファクタリング
明瞭さ
おおむね明確
活発さ
活発
技術スタック
dart
領域
api, build-system

調査の方向性

まず firebase_core_platform_interface/pubspec.yaml と MethodChannelFirebase の実装を読み、次に issue で説明されている関連する *_platform_interface パッケージと web パッケージを比較します。Option A と Option B を比較検討し、FirebaseException/PlatformException の契約について maintainers と確認します。方向性が選択され、受け入れ条件が解決されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Needs Attention platform: all platform: web plugin: core type: enhancement
Context & Problem

Recent cleanups (#18604, #18624) removed package:flutter/foundation.dart, package:flutter/material.dart, and package:flutter_web_plugins imports from *_platform_interface data models and firebase_core_web. Because FlutterFire web implementations (firebase_core_web, firebase_auth_web, cloud_firestore_web) are built on dart:js_interop and package:web, they can compile to JS and Wasm GC without pulling in dart:ui or the Flutter engine.

However, non-Flutter Dart web frameworks (e.g. Jaspr) and pure-Dart environments cannot resolve these packages using standalone dart pub get because firebase_core_platform_interface (and sibling *_platform_interface packages) still declare flutter: sdk: flutter in pubspec.yaml.

The sole remaining reason *_platform_interface depends on flutter: sdk: flutter is that it bundles the default MethodChannel* implementation (package:flutter/services.dart). Meanwhile, package:plugin_platform_interface itself is already 100% pure Dart.

Proposed Options

We would like feedback from the maintainers on two architectural options to remove the flutter: sdk: flutter dependency from the platform interface layer:

Option A: Move MethodChannel* out of *_platform_interface (In-Place Pure Dart)
  • Move MethodChannelFirebase (package:flutter/services.dart) from firebase_core_platform_interface into the app-facing firebase_core package (or a dedicated firebase_core_method_channel subpackage).
  • Remove flutter: sdk: flutter and environment: flutter: from firebase_core_platform_interface/pubspec.yaml.
  • Pros: Zero new packages; *_platform_interface becomes 100% pure Dart immediately.
  • Cons: Technically a breaking change for external consumers or test suites that directly instantiate MethodChannelFirebase from firebase_core_platform_interface (requires scheduling for the next major version bump).
Option B: Extract Pure-Dart Leaf Package (package:firebase_common / *_interface)
  • Extract pure-Dart platform contracts and shared domain models (FirebaseAppPlatform, FirebaseOptions, FirebaseException, Timestamp, GeoPoint, etc.) into a zero-dependency pure-Dart package (e.g. package:firebase_common).
  • Have *_platform_interface re-export these types alongside MethodChannel*, while *_web packages depend directly on the pure-Dart package.
  • Pros: 100% backwards-compatible; requires no major version bump to existing *_platform_interface packages; enables code sharing with server-side firebase-admin-dart.
  • Cons: Introduces a new leaf package to publish and maintain in the monorepo.
Acceptance Criteria
  • Select preferred direction (Option A vs. Option B) for decoupling MethodChannel* (package:flutter/services.dart) from the pure-Dart interface layer.
  • Confirm whether pure-Dart platform interfaces should standardize exclusively on FirebaseException rather than catching/throwing PlatformException.
主要言語
Dart
スター
9.3k
フォーク
4.1k
平均マージ
3日 4時間
マージ済み PR(30日)
56

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

firebase/flutterfire のほかの issue

firebase/flutterfire の issue をすべて見る

似ている issue

Dart の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。