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: flutter/packages
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 67ec0d36293e
Choose a base ref
...
head repository: flutter/packages
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0411f1deabb4
Choose a head ref
  • 2 commits
  • 5 files changed
  • 2 contributors

Commits on May 6, 2026

  1. [vector_graphics_compiler] Fix HSL color parsing for decimal percenta…

    …ge components (#11619)
    
    ## Description
    
    Fixes a bug in the HSL color parser where decimal percentage components
    (e.g. `76.2745098039%`) were incorrectly multiplied by `2.55` — the
    conversion factor used for **rgb** percentages (percent → 0–255).  For
    **hsl**, saturation and lightness must stay in the 0–100 range (later
    divided by 100) so the multiplication produced wildly wrong values
    (e.g. `76.27 → 194`, then `194 / 100 = 1.94`).
    
    The same branch also mis-handled the `hsla` alpha component: a unitless
    decimal like `0.5` should be converted to 0–255 via `× 255`, not `× 2.55`.
    
    ### Root cause
    
    `parser.dart` checked `rawColor.contains('.')` and unconditionally
    applied `* 2.55`, regardless of whether the current function was
    `rgb()`/`rgba()` (correct) or `hsl()`/`hsla()` (incorrect).
    
    ### Fix
    
    Track whether each token had a `%` suffix before stripping it.
    For HSL percentage components, return the raw `double` (0–100 range).
    For unitless alpha decimals (0–1 range), multiply by 255.
    
    ### Reproduction (from issue #185833)
    
    ```
    hsl(270, 100%, 76.2745098039%)
    ```
    
    | Before fix | After fix |
    |---|---|
    | `#efdeff` ❌ | `#c286ff` ✓ |
    
    ## Tests
    
    Four new tests added to `parsers_test.dart`:
    
    - `hsl` with integer percentages (regression)
    - `hsl` with decimal lightness percentage (the reported bug)
    - `hsla` with integer percentages + decimal alpha (regression)
    - `hsla` with decimal lightness + decimal alpha (combined case)
    
    ## Related Issues
    
    Fixes flutter/flutter#185833
    fondoger authored May 6, 2026
    Configuration menu
    Copy the full SHA
    412bf44 View commit details
    Browse the repository at this point in the history

Commits on May 7, 2026

  1. Comment out the test that uses implemented NetworkInterface to accomm…

    …odate dart sdk breaking change. (#11659)
    
    This addresses dart sdk breaking change dart-lang/sdk#63216.
    
    flutter/flutter#186155 tracks undoing this once dart rolls into flutter.
    aam authored May 7, 2026
    Configuration menu
    Copy the full SHA
    0411f1d View commit details
    Browse the repository at this point in the history
Loading