Skip to content

fix(place_tracker): Migrate to Dart 3 and resolve Null Safety crashes#2794

Open
rabi-33 wants to merge 1 commit intoflutter:mainfrom
rabi-33:main
Open

fix(place_tracker): Migrate to Dart 3 and resolve Null Safety crashes#2794
rabi-33 wants to merge 1 commit intoflutter:mainfrom
rabi-33:main

Conversation

@rabi-33
Copy link

@rabi-33 rabi-33 commented Feb 6, 2026

Problem

The place_tracker sample was pinned to an outdated SDK version (>=2.7.0 <3.0.0) and used pre-Null Safety dependencies. This caused the following issues:

  • Build Failure: The project could not be compiled on modern Flutter environments (Dart 3+).
  • Runtime Crashes: The Maps_flutter version (0.5.x) utilized deprecated Android embedding v1 APIs.

Solution

This PR migrates the project to fully support Dart 3 and Flutter 3.x.

Key Changes:

  1. SDK Upgrade: Bumped environment constraints to sdk: ">=3.0.0 <4.0.0".
  2. Dependency Updates:
    • Maps_flutter: Upgraded to ^2.5.0 (fixes Android embedding warning).
    • provider: Upgraded to ^6.0.0.
    • go_router: Added for modern navigation handling.
  3. Null Safety Migration:
    • Applied ? nullable types and late keywords throughout the codebase.
    • Added required null checks to prevent Null check operator used on a null value errors.

Verification

  • Builds successfully on Flutter 3.19.x / Dart 3.3.
  • Static Analysis: Passed flutter analyze with 0 errors.

Pre-launch Checklist

  • I read the [Flutter Style Guide] recently, and have followed its advice.
  • I signed the [CLA].
  • I read the [Contributors Guide].
  • I have added sample code updates to the [changelog].
  • I updated/added relevant documentation (doc comments with ///).

@google-cla
Copy link

google-cla bot commented Feb 6, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@rabi-33
Copy link
Author

rabi-33 commented Feb 6, 2026

i signed it

@rabi-33
Copy link
Author

rabi-33 commented Feb 6, 2026

@googlebot I signed it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant