Skip to content
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

[BUG]: flutter_svg DefaultSvgTheme not working #484

Closed
2 tasks done
mym0404 opened this issue Mar 17, 2024 · 0 comments · Fixed by #485
Closed
2 tasks done

[BUG]: flutter_svg DefaultSvgTheme not working #484

mym0404 opened this issue Mar 17, 2024 · 0 comments · Fixed by #485
Labels
bug Something isn't working

Comments

@mym0404
Copy link
Contributor

mym0404 commented Mar 17, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Version

5.4.0

Command type

build_runner (Default)

What happened?

The presence of default SvgTheme argument of svg output prevents DefaultSvgTheme in flutter_svg works correctly.

SVG.cube.svg(width: 64, theme: SvgTheme(currentColor: Colors.red)),
SvgPicture.asset('assets/svg/cube.svg',
    width: 64, theme: SvgTheme(currentColor: Colors.red)),

image

child: DefaultSvgTheme(
  theme: SvgTheme(currentColor: Colors.red),
  child: Column(
    children: [
      SVG.cube.svg(width: 64),
      SvgPicture.asset('assets/svg/cube.svg', width: 64),

image

Relevant a pubspec.yaml.

No response

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@mym0404 mym0404 added the bug Something isn't working label Mar 17, 2024
AlexV525 pushed a commit that referenced this issue Mar 18, 2024
… correctly (#485)

The default SvgTheme argument prevents `DefaultSvgTheme` provider works
correctly. This should be null and works as a passthrough behavior

## What does this change?

Remove default `SvgTheme` from svg generator

Fixes #484 🎯

## Type of change

- [x] Bug fix (non-breaking change which fixes an issue)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant