Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Tags: flutter/packages

Tags

two_dimensional_scrollables-v0.5.2

Toggle two_dimensional_scrollables-v0.5.2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
[two_dimensional_scrollables] Fixes TreeView crash when empty or last…

… node collapsed (#11622)

This PR provides a robust fix for a crash in TreeView and resolves a regression introduced by a previous partial fix in PR #9103.

Previous attempts to fix the "empty tree" crash (shrinking to 0 rows) by moving _updateScrollBounds to the end of layout introduced a subtle inconsistency. When a node collapse triggered a scroll correction, the visible row range was recalculated after the layout loop had finished. This resulted in the paint phase attempting to access children that were never built, causing a null dereference (as seen in the Expand then collapse with offscreen nodes (top) test).

* _updateVerticalScrollBounds is now called before the child layout loop. This ensures that any vertical scroll corrections (e.g., clamping when content shrinks) happen first, so the layout loop builds exactly the rows that will be visible.
* Accurate Extent Calculation: Updated _updateScrollBounds to calculate the vertical scroll extent using the total height of all rows in _rowMetrics (via _rowMetrics.last.trailingOffset). This provides a consistent maxScrollExtent and correctly handles the "empty tree" state.
* Correct Horizontal Bounds: Updated the horizontal extent calculation to use absolute content-relative positions, ensuring correct scroll bounds when scrolling horizontally.

Fixes flutter/flutter#164981

## Pre-Review Checklist

**Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

[^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.

vector_graphics-v1.2.1

Toggle vector_graphics-v1.2.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
[vector_graphics] Fix uncaught StateError in useHtmlRenderObject on C…

…anvasKit / iOS Safari (#11685)

## Description

`useHtmlRenderObject()` only caught `UnsupportedError` when probing
`toImageSync`. CanvasKit on Mobile Safari (iOS 18.7) throws a `StateError`
("Unable to convert read pixels from SkImage") instead, which escapes the
`try/catch` and crashes the widget subtree.

This change treats both `UnsupportedError` and `StateError` as
"use the HTML render object" — the function only exists to probe and
pick a fallback.

## Related Issues

Fixes flutter/flutter#186333

## Tests

The failure mode is only triggered by specific CanvasKit / Mobile Safari
combinations (observed on iOS 18.7) and cannot be reproduced deterministically
in a unit test against the host's renderer. Validated against production
telemetry on iOS 18.7 Safari, where this exception is currently uncaught and
reaches users.

All existing `vector_graphics` and `vector_graphics_compiler` tests still
pass after the change.

vector_graphics_compiler-v1.2.2

Toggle vector_graphics_compiler-v1.2.2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
[vector_graphics_compiler] Add modern HSL color parsing (#11657)

## Description

Follow-up to #11619 and flutter/flutter#185833.

This moves HSL/HSLA function parsing from `parser.dart` into `colors.dart`, following the existing `parseCssRgb` / `parseRgbFunction` structure. It also adds support for the same practical legacy/modern syntax split already supported for RGB:

- legacy comma-separated syntax, e.g. `hsl(270, 100%, 76%)`
- modern space-separated syntax, e.g. `hsl(270 100% 76% / 0.5)`

This is intentionally scoped to the existing regex-based numeric parser style; it does not attempt to implement the full CSS Color 4 grammar.

## Tests

- Added `parseCssHsl` record parser tests covering legacy syntax, modern syntax, whitespace/case variations, decimal/negative tokens, and invalid syntax.
- Added `SvgParser.parseColor` tests for modern HSL/HSLA conversion and HSLA alpha behavior.
- Added HSLA alpha boundary and clamp tests for `0`, `0%`, `1`, `100%`, `50%`, `-0.5`, `-10%`, `2`, and `150%`.

Ran locally:

```sh
flutter test test/colors_test.dart test/parsers_test.dart
dart analyze lib/src/svg/colors.dart lib/src/svg/parser.dart test/colors_test.dart test/parsers_test.dart
```

## Related Issues

Fixes flutter/flutter#186153

video_player_avfoundation-v2.9.6

Toggle video_player_avfoundation-v2.9.6's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
[video_player] Add missing swift_version to podspec (#11670)

Adds a `swift_version` to the podspec of `video_player_avfoundation`, to fix a build error when building with CocoaPods in a project that doesn't itself have a Swift version set.

Updates the repo tooling `podspec-check` command to check for this, so that we don't forget it in future migrations.

Also fixes some missing ignores in `podspec-check` that caused false positives when running the check locally in a tree that has built plugins.

Fixes flutter/flutter#186232

## Pre-Review Checklist

[^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.

flutter_svg-v2.3.0

Toggle flutter_svg-v2.3.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
[flutter_svg] add imageBuilder property to SvgPicture (#11615)

related with flutter/flutter#182635

This PR exposes the `imageBuilder` support added to `VectorGraphic` in #11094 through `SvgPicture`.

`SvgPicture` already supports `placeholderBuilder` and `errorBuilder`, but it did not provide a success-state builder. Without this API, callers have to wrap `SvgPicture` externally, which also wraps the placeholder and error states.

Adding `imageBuilder` lets callers decorate or wrap only the successfully loaded SVG, while keeping loading and error UI separate.

## Alternatives considered
-  I chose `imageBuilder` because it follows the success-state wrapping pattern used by widgets like `CachedNetworkImage`

## Changes

- Added `SvgImageWidgetBuilder`.
- Added `imageBuilder` to all `SvgPicture` constructors.
- Forwarded `imageBuilder` to `createCompatVectorGraphic`.
- Added tests for successful load and placeholder states.
- Bumped `flutter_svg` to 2.3.0 and `vector_graphics` to ^1.2.0.

## Pre-Review Checklist

video_player_avfoundation-v2.9.5

Toggle video_player_avfoundation-v2.9.5's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
[video_player] Convert top-level classes to Swift (#11658)

Converts the top-level plugin class, along with the native view factory that is used for platform view management, from Objective-C to Swift. The Pigeon interface for the plugin class has been split out into a separate definition file so that it can use the Swift Pigeon generator while the player-instance-level API can continue to use Obj-C for now.

Since this is the first use of Swift in the plugin, this includes separating the Swift Package into more modules; now instead of:
video_player_avfoundation (Obj-C) -> video_player_avfoundation_ios and _macos (both Obj-C)
it's
video_player_avfoundation (Swift) -> video_player_avfoundation_objc (Obj-C) -> video_player_avfoundation_ios and _macos (both Obj-C)

The Swift conversions were done via Gemini as a starting point, but I did a side-by-side comparison to the Obj-C to ensure that everything was actually preserved, and fixed issues in its conversion manually.

The PR also includes adding some NONNULL region annotations to Obj-C headers that were accidentally missing it, since I ran into one of the omissions once I was calling the API from Swift, and then I audited all of the headers.

Part of flutter/flutter#119105

## Pre-Review Checklist

[^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.

vector_graphics_compiler-v1.2.1

Toggle vector_graphics_compiler-v1.2.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
[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

url_launcher_web-v2.4.3

Toggle url_launcher_web-v2.4.3's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
[url_launcher] Remove obsolete LICENSE entries (#11631)

The third-party code in `url_launcher_web` was removed in #4330, and `bsdiff` was removed in #502, but we never removed:
- The top-level LICENSE file entry for the code in `url_launcher_web`
- The repo tooling allowance for those copyright/license blocks

This removes those remaining pieces.

Part of flutter/flutter#129575

## Pre-Review Checklist

[^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.

camera_android-v0.10.10+17

Toggle camera_android-v0.10.10+17's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
[camera_android] Reset AE and AF triggers to idle after capture (#11330)

## Issue
App freezes during focus/flash sequence in low light.
On high-end camera devices, focusing takes longer in dark environments. Repeatedly requesting focus while using the flash can cause the CaptureRequest to hang. 

> The [issues](flutter/flutter#97501) has been resolved.
> I reproduced the same behavior on a different device (not an Xperia).

This log has been captured on my Xperia device.
```
D/CameraCaptureCallback(12647): CameraCaptureCallback | state: STATE_CAPTURING | afState: 1 | aeState: 5
D/CameraCaptureCallback(12647): CameraCaptureCallback | state: STATE_CAPTURING | afState: 1 | aeState: 5
D/CameraCaptureCallback(12647): CameraCaptureCallback | state: STATE_CAPTURING | afState: 5 | aeState: 4
D/CameraCaptureCallback(12647): CameraCaptureCallback | state: STATE_CAPTURING | afState: 5 | aeState: 4
D/CameraCaptureCallback(12647): CameraCaptureCallback | state: STATE_CAPTURING | afState: 1 | aeState: 4
I/Camera  (12647): refreshPreviewCaptureSession
```

## Root Cause
Camera2 trigger controls are driven by one-shot states (START), but they are not always reset to IDLE once the sequence is complete. On certain devices (like the Xperia 1), this failure to reset can block subsequent capture requests.

## Fix
`runPrecaptureSequence():` 
Send an AE trigger START, then immediately follow with IDLE in the same execution path.

`lockAutoFocus():` 
Send an AF trigger START, then reset to IDLE after the preview request is captured.

## Results
AE/AF triggers are now consistently returned to the IDLE state.
The freeze during capture after using the flash on Xperia 1 has been resolved.
Camera trigger sequences are now stable across various device models.

------
### By the way, 
I believe [CameraX](https://pub.dev/packages/camerax)  is the way to go for Android camera development. It's been the default since version 0.11.0.

## Pre-Review Checklist

**Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

[^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.

google_maps_flutter_web-v0.6.2+1

Toggle google_maps_flutter_web-v0.6.2+1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
[google_maps_flutter] Fix styles on web (#11629)

Fixes a regression from #7882 that caused non-cloud map styling not be applied on web, since the app-facing package changed to sending '' rather than null when a cloud mapId wasn't provided, and the web implementation didn't handle that case.

Fixes flutter/flutter#185171

*Replace this paragraph with a description of what this PR is changing or adding, and why. Consider including before/after screenshots.*

*List which issues are fixed by this PR. You must list at least one issue.*

## Pre-Review Checklist

[^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.