Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: dart-lang/core
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: dart-lang/core
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: platform-3.2
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 8 commits
  • 56 files changed
  • 1 contributor

Commits on Feb 18, 2026

  1. New API with per-platform properties.

    The `Platform.current` object exposes one (or potentially more)
    of a `NativePlatform` (based on `dart:io`) or `BrowserPlatform`
    (based on JS `window.navigator` or anything else relevant).
    
    Each has its own API, and the current platform determines
    whether a value of these types is available or not.
    On unsupported platforms, a value is just `null`.
    
    Provides a `testing.dart` library which exposes
    `TestNativePlatform` and `TestBrowserPlatform`,
    which are customizable classes that can be used for testing.
    It's possible to run code with such a fake value as
    the *current* platform (`Platform.current` is temporarily
    updated to a value which exposes the, fx, `TestNativePlatform`
    as its `Platform.nativePlatform`).
    
    Still retains the legacy and deprecated API that makes
    native properties directly available on `Platform`.
    Code should migrate to the new API by doing:
    * `const LocalPlatform()` → `Platform.current.nativePlatform!`
    * `new FakePlatform()` → `new TestNativePlatform()`
    
    It's currently not possible to have more than one non-`null`
    platform-value.
    Platforms are detected by the presence of the `dart:io` and `dart:js_interop`
    libraries, and no current platform has both.
    When such a platform exists, the code will need to be adapted to to produce
    *both* (possible using conditional imports or conditional parts
    and augmentations).
    lrhn committed Feb 18, 2026
    Configuration menu
    Copy the full SHA
    ee957a0 View commit details
    Browse the repository at this point in the history

Commits on Feb 24, 2026

  1. Configuration menu
    Copy the full SHA
    f291979 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c891b07 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    76b09e0 View commit details
    Browse the repository at this point in the history
  4. Format.

    lrhn committed Feb 24, 2026
    Configuration menu
    Copy the full SHA
    3d4e817 View commit details
    Browse the repository at this point in the history
  5. Typo in comment in pubspec.

    lrhn committed Feb 24, 2026
    Configuration menu
    Copy the full SHA
    cbb7e24 View commit details
    Browse the repository at this point in the history

Commits on Feb 25, 2026

  1. Configuration menu
    Copy the full SHA
    ae26c62 View commit details
    Browse the repository at this point in the history

Commits on Apr 14, 2026

  1. Tweaks.

    lrhn committed Apr 14, 2026
    Configuration menu
    Copy the full SHA
    ef1a5aa View commit details
    Browse the repository at this point in the history
Loading