[flutter_svg] add imageBuilder property to SvgPicture (#11615) related with flutter/flutter#182635 This PR exposes the `imageBuilder` support added to `VectorGraphic` in flutter/packages#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
This repo is a companion repo to the main flutter repo. It contains the source code for Flutter's first-party packages (i.e., packages developed by the core Flutter team). Check the packages directory to see all packages.
These packages are also available on pub.
Please file any issues, bugs, or feature requests in the main flutter repo. Issues pertaining to this repository are labeled “package”.
If you wish to contribute a new package to the Flutter ecosystem, please see the documentation for developing packages. You can store your package source code in any GitHub repository (the present repo is only intended for packages developed by the core Flutter team). Once your package is ready you can publish to the pub repository.
If you wish to contribute a change to any of the existing packages in this repo, please review our contribution guide, and send a pull request.
These are the packages hosted in this repository: