Skip to content

Conversation

@stuartmorgan-g
Copy link
Collaborator

@stuartmorgan-g stuartmorgan-g commented Jan 8, 2026

Replaces the legacy JSON serialization of heatmaps with fully typed Pigeon data.

Updates the min Flutter SDK version to 3.35 (stable N-1) because there's an analysis difference between 3.32 and 3.35 in some of the new Dart code, and it's easier to just drop 3.32 now than to add a suppression and then clean it up later.

Final iOS portion of flutter/flutter#117907

Pre-Review Checklist

Footnotes

  1. Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. 2 3

Copy link

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

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 is a great improvement, migrating the iOS heatmap implementation from legacy JSON serialization to a fully typed Pigeon data model. This refactoring significantly enhances type safety, code clarity, and maintainability. The changes are comprehensive, covering Dart and Objective-C code, updating tests to reflect the new data structures, and correctly removing the old serialization logic. I have one minor suggestion for a small efficiency improvement in the Dart code.

Comment on lines +689 to 711
static PlatformHeatmapGradient? _platformHeatmapGradientFromHeatmapGradient(
HeatmapGradient? gradient,
) {
if (gradient == null) {
return null;
}
return PlatformHeatmapGradient(
colors: gradient.colors
.map(
(HeatmapGradientColor c) => PlatformColor(
red: c.color.r,
green: c.color.g,
blue: c.color.b,
alpha: c.color.a,
),
)
.toList(),
startPoints: gradient.colors
.map((HeatmapGradientColor c) => c.startPoint)
.toList(),
colorMapSize: gradient.colorMapSize,
);
}

Choose a reason for hiding this comment

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

medium

To avoid iterating over gradient.colors twice, you can use a single loop to build both the colors and startPoints lists. This can be slightly more efficient and arguably makes it clearer that the two lists are built in tandem.

  static PlatformHeatmapGradient? _platformHeatmapGradientFromHeatmapGradient(
    HeatmapGradient? gradient,
  ) {
    if (gradient == null) {
      return null;
    }
    final List<PlatformColor> colors = <PlatformColor>[];
    final List<double> startPoints = <double>[];
    for (final HeatmapGradientColor c in gradient.colors) {
      colors.add(PlatformColor(
        red: c.color.r,
        green: c.color.g,
        blue: c.color.b,
        alpha: c.color.a,
      ));
      startPoints.add(c.startPoint);
    }
    return PlatformHeatmapGradient(
      colors: colors,
      startPoints: startPoints,
      colorMapSize: gradient.colorMapSize,
    );
  }

@stuartmorgan-g stuartmorgan-g added the autosubmit Merge PR when tree becomes green via auto submit App label Jan 13, 2026
@auto-submit auto-submit bot merged commit eb9e1dc into flutter:main Jan 13, 2026
81 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jan 13, 2026
github-merge-queue bot pushed a commit to flutter/flutter that referenced this pull request Jan 13, 2026
flutter/packages@e57e7f4...eb9e1dc

2026-01-13 stuartmorgan@google.com [google_maps_flutter] Migrate iOS
heatmaps to Pigeon (flutter/packages#10754)
2026-01-13 magder@google.com Set Gemini Code Assist include_drafts to
false (flutter/packages#10765)
2026-01-12 6655696+guidezpl@users.noreply.github.com [google_fonts]
Update the font generator to exclude variable font entries when a static
entry of the same weight and style exists (flutter/packages#10739)
2026-01-12 dasyad00@gmail.com [camera_android_camerax] get camera name
from Camera2CameraInfo.getCameraId in availableCameras
(flutter/packages#10775)
2026-01-12 49699333+dependabot[bot]@users.noreply.github.com Bump
peter-evans/create-pull-request from 7.0.0 to 8.0.0 in the
all-github-actions group (flutter/packages#10773)
2026-01-12 engine-flutter-autoroll@skia.org Roll Flutter from
3134be8 to d81cd3e (11 revisions) (flutter/packages#10779)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC flutter-ecosystem@google.com on the revert to ensure that a
human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
ikramhasan pushed a commit to ikramhasan/flutter that referenced this pull request Jan 15, 2026
…r#180907)

flutter/packages@e57e7f4...eb9e1dc

2026-01-13 stuartmorgan@google.com [google_maps_flutter] Migrate iOS
heatmaps to Pigeon (flutter/packages#10754)
2026-01-13 magder@google.com Set Gemini Code Assist include_drafts to
false (flutter/packages#10765)
2026-01-12 6655696+guidezpl@users.noreply.github.com [google_fonts]
Update the font generator to exclude variable font entries when a static
entry of the same weight and style exists (flutter/packages#10739)
2026-01-12 dasyad00@gmail.com [camera_android_camerax] get camera name
from Camera2CameraInfo.getCameraId in availableCameras
(flutter/packages#10775)
2026-01-12 49699333+dependabot[bot]@users.noreply.github.com Bump
peter-evans/create-pull-request from 7.0.0 to 8.0.0 in the
all-github-actions group (flutter/packages#10773)
2026-01-12 engine-flutter-autoroll@skia.org Roll Flutter from
3134be8 to d81cd3e (11 revisions) (flutter/packages#10779)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC flutter-ecosystem@google.com on the revert to ensure that a
human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App p: google_maps_flutter platform-ios

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants