Skip to content

Commit

Permalink
Fixes flutter_svg latest version requiring a non null clipBehavior fi…
Browse files Browse the repository at this point in the history
…eld. (#369)

* Fix nullable type in SvgPicture.asset clipBehavior

SvgPicture.asset expects a non null type for clipBehavior.  This creates a default value that matches SvgPicture default clipBehavior.

* Remove depreciation annotation from clipBehavior

This is to match the latest version of flutter_svg.
See:
https://github.com/dnfield/flutter_svg/blame/master/lib/svg.dart#L181

* Update test resources to match flutter_svg

---------

Co-authored-by: Daichi Furiya <dadadada.chop@gmail.com>
  • Loading branch information
jetpeter and wasabeef authored Apr 17, 2023
1 parent ef79ae8 commit ef7ba1f
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/core/example/lib/gen/assets.gen.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ class SvgIntegration extends Integration {
bool excludeFromSemantics = false,
SvgTheme theme = const SvgTheme(),
ColorFilter? colorFilter,
Clip clipBehavior = Clip.hardEdge,
@deprecated Color? color,
@deprecated BlendMode colorBlendMode = BlendMode.srcIn,
@deprecated Clip? clipBehavior,
@deprecated bool cacheColorFilter = false,
}) {
return SvgPicture.asset(
Expand Down
2 changes: 1 addition & 1 deletion packages/core/test_resources/actual_data/assets.gen.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ef7ba1f

Please sign in to comment.