You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[vector_graphics] add imageBuilder property to VectorGraphic (#11094)
related with flutter/flutter#182635
Adding an `imageBuilder` property to `VectorGraphic` allows developers
to wrap the successfully loaded vector graphic with decorations or
interaction layers (e.g., borders, shadows, gesture detectors) only when
the image is available. This completes the builder pattern alongside the
existing `placeholderBuilder` and `errorBuilder`, giving full control
over all three rendering states.
## Changes
- Added `VectorGraphicsImageWidget` typedef
- Added optional `imageBuilder` parameter to `VectorGraphic`
constructors and `createCompatVectorGraphic`
- Exported `VectorGraphicsImageWidget` from
`vector_graphics_compat.dart`
- Added two tests verifying `imageBuilder` is called on success and not
during placeholder state
- Bumped version to 1.1.20
## Test plan
- [x] `imageBuilder wraps the loaded vector graphic` — verifies the
builder is applied on successful load
- [x] `imageBuilder is not called during placeholder state` — verifies
the builder is skipped during loading
- [x] All 60 existing tests pass
0 commit comments