flutter_svg: ^0.22.0 copied to clipboard
An SVG rendering and widget library for Flutter, which allows painting and displaying Scalable Vector Graphics 1.1 files.
PictureProvider, and deprecate
PictureProvider.clearCache. This is intended to allow users to set a maximum cache size, which was previously impossible.
- Fix alignment/sizing issues introduced in 0.21.0
- Stable nullsafe release.
- Fix bug introduced when width and height are both null on the widget.
- Use more efficient method for XML attribute parsing.
- Fix sizing when both width and height are null. This is potentially breaking.
- Bump versions to stable nullsafe when possible
- Update README with links to alternative implementations of SVG in Flutter.
- Attempt to report file source/key when errors happen.
- Add missing platforms to example project, update Android embedding.
- Minor fixes for future error handling to respect new Dart rules/expectations.
- Adds option
warningsAsErrorsthat throws errors when detecting unsupported SVG elements.
- Fix broken image for pub.
- Fix bug where HTTP headers were not passed along to the HTTP client.
- Remove unnecessary package:collection dependency
- Initial release with null safety
- Remove dead code
- Fix up incorrect
- Fix a bug where color filters were applied when they should not be.
- Allow for opt-in/out of color filter caching behavior, undeprecate color filtering on the providers, and allow for a global override.
- Fix color filtering when BlendMode.color is used.
- Avoid unnecessary cache invalidation of SVGs drawn with color changes by:
- Deprecate color filter related options on PictureProvider classes.
- Make ColorFilter a property on SvgPicture
- Use the ColorFiltered widget for filtered SVGs.
- Fix RTL rendering bug
- Bump the path_drawing dependency to 0.4.1+1
- Expose clipBehavior from FittedBox
- Expose SVG ids in
- Change type of
- Fixed bug in transform parsing
- Drop DiagnosticbleMixin usage.
- Bump XML dependency to ^4.1.0 and resolve deprecated API usages.
- Await futures in tests.
- Provide a clearer error message when nested
<svg>elements are used.
- Fixed regression in v0.17.3 for shape elements with no explicit fill but explicit opacity.
- Be more permissive about whitespace in transform attributes.
- Stop defaulting color to black when not present, fixing issue with colors
carried over from
- Bumped minimum Flutter version to 1.6.7 to pick up DiagnosticableMixin.
- Allow more variations of whitespace in base64 encoded image data.
- Fix for issue with
useelements refering to groups or other
useelements not correctly applying styles.
- Make ColorFiltering apply to whole layer instead of per paint operation.
- BREAKING Remove
- Fix color filtering for text.
DrawableStyleable. Shapes already worked this way, and the transform logic was handled in a confusingly different way than all the other style attributes.
- Properly apply transforms to referenced use eleemnts.
- Respect transformations on
- Be more tolerant of malformed base64 data, similar to browsers (specifically, having spaces present in the data). ## 0.14.4
- Apply masks in the correct order when blend modes are involved in shapes.
- Support for masks on groups.
- Update example project to Android X.
- Support for the
- Format, open up obtainKey for testing.
- Fix case where color filters were incorrectly getting created.
- Same fix for group opacity/saveLayer as in 0.12.4+2
- Bump path_drawing dependency, which includes bug fixes in parsing.
- Updated SDK constraint to support new error message formats
- Updated error message formats
- Misc. updates for new SDK features
- Changed version constraint to prevent pulling down from wrong flutter version.
- Fixed group opacity/saveLayer bug.
- Bump dep on path_drawing which contains bugfixes for parsing.
opacityhandling, particularly for groups. Previously, opacities were averaged together, which resulted in incorrect compositing (particularly if overlapping shapes were drawn within a group). Now, a new layer is created with the opacity applied to the whole. This may cause some performance degredation, but is more correct.
- Allow font-size to be specified in
px(with an explicit postfix).
excludeFromSemanticsproperty for purely decorative SVGs. The default value is false.
- Fixed bug with stream completer unregistration.
- Fixed bug with text transforms in new parsing.
- Fixed bug with RGBA parsing for opacity
- Fixed bug with AVD parsing from strings.
- Support for
- BREAKING Avoid scaling based on devicePixelRatio. This turned out to be a mistake, and caused rendering inconsistencies across devices. It was particularly harmful on devices where the ratio was less than 1.0.
precachePicturemethod to allow for pre-caching of SVG assets. Similar in functionality to
precacheImagein the Flutter framework. Also added improvements to error handling in the various related routines.
- Format source code
- Remove unintentionally committed pubspec.lock
- Rewrote parsing logic to unpin dart-xml dependency, and bumped Dart XML dependency.
- Fix bug where unsupported elements could impact drawing. Unhandled elements that have children will now be completely ignored. This is technically a breaking change, as previously a child of an unsupported element could have been drawn if it was supported. Fixes #126.
- Pin dart-xml to 3.2.5, as 3.3.0 is a breaking change (next release will address this).
pxpostfixes on many double literals.
- Added a
- Updated tests to support async changes in Flutter's
- This is breaking for tests - tests will now require a more recent version of Flutter to run. It should not break consumers though.
This is technically a breaking release, but it also includes important fixes for v0.10.0. Rather than splitting the breaking parts out in to v0.11.0 so soon after the release of v0.10.0, I'm including some more breaking changes here. This will not normally be done.
- Fix bug that caused
<stop>elements that weren't self-closing to parse improperly.
- Many documentation updates/improvements.
- Added support for gradients that use
- BREAKING: Changed some of the methods on
DrawableDefinitionServerto support gradients better.
- BREAKING: Removed the
PaintServertypedef, since this was only serving gradients and we need to have more control there for
- Fix bug that caused an empty
<defs/>element prevent rendering.
- Rewrite parsing to be more space efficient.
- Refactor parsing to enable more output possibilities.
- Create a dedicated SVG parsing class (SvgParser).
- Updates to text - better support for nested text/tspans.
- Miscellaneous bug fixes.
- Testing improvements.
- Fix inheritance issues with
- Fix a few inconsistencies in text anchor processing/positioning.
- BREAKING Improvements to text positioning. Thanks to @krispypen!
- Implement support for
- Implement support for
svgcleanerper author's recommendation.
DrawableStyleableto avoid crashing with certain unhandled elements.
- Improve error reporting for certain
- Revert changes made on 0.7.0 to attempt to utilize
height. These changes did not quite fix what they were intended to fix and caused problems they weren't intended to case.
- Made parsing
asyncto support image loading.
- Added support for
- By default,
SvgPicture.assetwill now cache the asset. We already cached the final picture, but the caching included any color filtering provided on the image. This is problematic if the color is animated. See dnfield/flutter_svg#33
- BREAKING Correct erroneous
heightprocessing on the root element.
heightwere treated as synonyms for the width and height of the
viewBox. This is not correct, and resulted in meaningful rendering errors in some scenarios compared to Chrome. Fixing this makes the parser more conformant to the spec, but may make your SVGs look significantly different if they specify
height. If you want the old behavior, you'll have to update your SVGs to not specify
MediaQuery.of(context).devicePixelRatioif available before defaulting to
window.devicePixelRatioin places that need awareness of devicePixelRatios.
- Support for
<symbol>, and shape/group elements in
<defs>. There are some limitations to this currently,
- Consume updated version of path_drawing.
- Fix bug with fill-rule inheritance + example to test.
- Fixed an issue with stroke and fill inheritance (and added test)
- General formatting/analyzer cleanup
- BREAKING Update Flutter version dependencies/package dependencies
- Print unhandled errors only once, and only in debug mode (000e17f)
- Add ability to specify a
Alignmentfor SvgPictures (Thanks @sroddy!).
- Miscellaneous bug fixes
- Restructure project to match expectations of Flutter tooling
- Create a new class to encapsulate
Paintand assist with inheriting all painting properties.
- Fixes regression introduced in v0.5.2 where some previously working inheritance stopped working.
- Support more complex stroke/fill property inheritance.
- Consume latest path_drawing (and path_parsing) packages to fix issue(s) with smooth curve handling.
HttpStatus.OKchange - not ready yet for Flutter beta channel
- Fix bug(s) in processing stroke and fill opacity when stroke/fill are inherited.
- Fix HTTP network headers for network pictures
- Consume latest change from path_drawing (fixes exponent validation)
- Minimum Flutter version is now 0.5.1 (latest beta as of release)
- Merge in support for Focal Pointed Radial Gradients
- Use asset directory references in pubspec.yaml
- Better support for nested
- Support for
<ellipse>parsing bug (ellipses were drawn at half the expected size)
<polyline>parsing bug (polylines were incorrectly forced to be closed)
- Fix bug where widget caused exception in a
- Remove deprecated code related to
- Improved reporting of error conditions
- Unsupported style elements will report an error
- Unresolvable definitions will report an error
- Support for
- Fix centering/scaling of canvas when viewBox is not square
- Improved color parsing
- Bug fix around caching for tinting/coloring (color was not being properly included in cache keys)
- Support for tinting/coloring the output
- Documentation updates
- This version represents a major rewrite of the widget(s) involved in rendering SVG drawings. This is primarily to support caching and better performance in rendering.
- New method on DrawableRoot toPicture to create a ui.Picture object from the SVG.
- Support for caching of Pictures, similar to how framework caches images. This will eventually be configurable, but is not as of this release.
BREAKING CHANGES #
- BREAKING CHANGE:
VectorDrawableImagehave been deprecated. They relied on methods that are less efficient than those now surfaced in
- BREAKING CHANGE: Size is no longer passed to
SvgPicture- its size is determined by parent size.
- BREAKING CHANGE:
clipToViewBoxis now called
allowDrawingOutsideViewBox. It defaults to false. It should not ordinarily be set to true, as it can allow unexpected memory usage if your vector graphic tries to draw far outside of the viewBox bounds.
- BREAKING CHANGE:
SvgPicturedoes not support custom
ErrorWidgetBuilders at this point in time. However, errors will be properly logged to the console. This is a result of improvements in the loading/caching of drawings.
- Fix bug(s) in inheritance (better rendering of Ghostscript_Tiger.svg)
- Support for
- Refactoring of how gradients are handled to enable clipPaths
- Refactor of SVG shape -> path logic
- Fix bugs in
- Add error widget on error.
- Add ability to specify error/placeholder widgets.
- Minor improvement on flutter logo SVG (add missing gradient).
- Improve docs, unit tests.
- Add more unit tests and rendering tests (!).
- Add top level flutter_svg.dart.
- Fix bugs found in transform matrix logic for skewX and skewY.
- Minor improvements in handling inheritance for PathFillType.
- Support gradient spread types (TileModes in Flutter).
- Bump to path_drawing 0.2.3 (fix arc defect).
- Handle 'none' in dasharray without throwing exception.
- Better handling of inheritance and 'none' in fill/stroke/dasharray
- Handle opacity on groups and inherited/blended opacity.
- Fixes elements that have both opacity and stroke-opacity or fill-opacity.
- Improvements for inheritance.
- Fixes related to unspecified fills on shapes.
Bumping minor version due to internal breaking changes and new support. Works on dev channel as of release (Flutter >= 0.3.6).
DrawableRootto support top level style definition.
- Support for dash paths.
- Support for more inherited attributes.
- Initial support for
- Support for
- Change painting order from stroke first, then fill to fill first, then stroke
(matches Chrome rendering of
Initial text support. Relies on flutter 0.3.6.
Initial release. Relies on pre-released master.