Skip to content

Add svg ColorMapper to svg loader #680

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions examples/example/lib/gen/assets.gen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ class SvgGenImage {
String? semanticsLabel,
bool excludeFromSemantics = false,
_svg.SvgTheme? theme,
_svg.ColorMapper? colorMapper,
ColorFilter? colorFilter,
Clip clipBehavior = Clip.hardEdge,
@deprecated Color? color,
Expand All @@ -367,6 +368,7 @@ class SvgGenImage {
assetBundle: bundle,
packageName: package,
theme: theme,
colorMapper: colorMapper,
);
}
return _svg.SvgPicture(
Expand Down
2 changes: 2 additions & 0 deletions examples/example_resources/lib/gen/assets.gen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ class SvgGenImage {
String? semanticsLabel,
bool excludeFromSemantics = false,
_svg.SvgTheme? theme,
_svg.ColorMapper? colorMapper,
ColorFilter? colorFilter,
Clip clipBehavior = Clip.hardEdge,
@deprecated Color? color,
Expand All @@ -202,6 +203,7 @@ class SvgGenImage {
assetBundle: bundle,
packageName: package,
theme: theme,
colorMapper: colorMapper,
);
}
return _svg.SvgPicture(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class SvgIntegration extends Integration {
this.size,
this.flavors = const {},
}) : _isVecFormat = false;

const SvgGenImage.vec(
this._assetName, {
this.size,
Expand Down Expand Up @@ -54,6 +54,7 @@ ${isPackage ? "\n static const String package = '$packageName';" : ''}
String? semanticsLabel,
bool excludeFromSemantics = false,
_svg.SvgTheme? theme,
_svg.ColorMapper? colorMapper,
ColorFilter? colorFilter,
Clip clipBehavior = Clip.hardEdge,
@deprecated Color? color,
Expand All @@ -73,6 +74,7 @@ ${isPackage ? "\n static const String package = '$packageName';" : ''}
assetBundle: bundle,
packageName: package,
theme: theme,
colorMapper: colorMapper,
);
}
return _svg.SvgPicture(
Expand Down

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.

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.

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.

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.

Loading