Skip to content

Commit ef7ba1f

Browse files
jetpeterwasabeef
andauthored
Fixes flutter_svg latest version requiring a non null clipBehavior field. (#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 <[email protected]>
1 parent ef79ae8 commit ef7ba1f

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

packages/core/example/lib/gen/assets.gen.dart

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/core/lib/generators/integrations/svg_integration.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ class SvgIntegration extends Integration {
3838
bool excludeFromSemantics = false,
3939
SvgTheme theme = const SvgTheme(),
4040
ColorFilter? colorFilter,
41+
Clip clipBehavior = Clip.hardEdge,
4142
@deprecated Color? color,
4243
@deprecated BlendMode colorBlendMode = BlendMode.srcIn,
43-
@deprecated Clip? clipBehavior,
4444
@deprecated bool cacheColorFilter = false,
4545
}) {
4646
return SvgPicture.asset(

packages/core/test_resources/actual_data/assets.gen.dart

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/core/test_resources/actual_data/assets_package_parameter.gen.dart

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/core/test_resources/actual_data/assets_svg_integrations.gen.dart

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)