Skip to content

refactor(platform_interface): replace Flutter UI and foundation imports with package:meta - #18604

Merged
Lyokone merged 2 commits into
firebase:mainfrom
kevmoo:cleanup-meta-annotations
Aug 24, 2026
Merged

Lyokone merged 2 commits into
firebase:mainfrom
kevmoo:cleanup-meta-annotations

Conversation

@kevmoo

@kevmoo kevmoo commented Aug 22, 2026 •

Copy link
Copy Markdown
Contributor

Cleans up superficial Flutter UI (material.dart, cupertino.dart) and foundation.dart imports across *_platform_interface packages in favor of package:meta/meta.dart.

Changes

  • UI Framework Cleanups:
    • Replace accidental package:flutter/material.dart and package:flutter/cupertino.dart imports in cloud_firestore_platform_interface, firebase_remote_config_platform_interface, and firebase_performance_platform_interface with package:meta/meta.dart.
    • Remove redundant package:flutter/material.dart imports in firebase_storage_platform_interface and firebase_crashlytics_platform_interface (which already imported package:meta).
  • Data Model Cleanups:
    • Replace package:flutter/foundation.dart in pure data models (Blob, FieldPath, GeoPoint, Timestamp, ActionCodeSettings) with package:meta/meta.dart for @immutable, @visibleForTesting, and @protected.
    • Define standalone _kIsWeb in Settings (cloud_firestore_platform_interface) to eliminate foundation.dart dependency.

Verification

  • All unit and platform interface tests pass 100% locally across modified packages:
    • cloud_firestore_platform_interface: 46/46 passed
    • firebase_auth_platform_interface: 181/181 passed
    • firebase_storage_platform_interface: 58/58 passed
    • firebase_crashlytics_platform_interface: 33/33 passed
    • firebase_remote_config_platform_interface: 11/11 passed
    • firebase_performance_platform_interface: 65/65 passed

…ts with package:meta

- Replace accidental `package:flutter/material.dart` and `package:flutter/cupertino.dart` imports in platform interfaces with `package:meta/meta.dart`.
- Replace `package:flutter/foundation.dart` imports in pure data models (`Blob`, `FieldPath`, `GeoPoint`, `Timestamp`, `ActionCodeSettings`, `Settings`) with `package:meta/meta.dart`.
- Define standalone `_kIsWeb` constant in `Settings` to decouple from `foundation.dart`.
@gemini-code-assist

Copy link
Copy Markdown
Contributor
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

@kevmoo
kevmoo marked this pull request as ready for review August 22, 2026 00:45
@kevmoo
kevmoo requested a review from Lyokone August 22, 2026 00:45
@kevmoo

kevmoo commented Aug 22, 2026

Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request removes Flutter-specific dependencies (such as foundation, material, and cupertino) from various Firebase platform interface packages, replacing them with 'package:meta/meta.dart' to decouple them from the Flutter framework. In 'settings.dart', a local '_kIsWeb' constant is introduced to replace 'kIsWeb'. The feedback suggests optimizing the '_kIsWeb' definition by using 'identical(0, 0.0)' instead of 'bool.fromEnvironment', which avoids the need for a lint suppression comment.

@Lyokone
Lyokone merged commit fef6d42 into firebase:main Aug 24, 2026
76 of 78 checks passed
@kevmoo
kevmoo deleted the cleanup-meta-annotations branch August 24, 2026 12:46
@firebase firebase locked and limited conversation to collaborators Sep 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants