Skip to content

Adds DefaultSvgTheme #964

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

Merged
merged 1 commit into from
Jul 13, 2023
Merged

Adds DefaultSvgTheme #964

merged 1 commit into from
Jul 13, 2023

Conversation

GP4cK
Copy link
Contributor

@GP4cK GP4cK commented Jul 12, 2023

Closes #953

Some notes/questions:

  1. In this PR, I basically copied over the DefaultSvgTheme from v1.1.6
  2. For the tests, I also copied them except for this one test about the fontSize being based on the DefaultTextStyle because of this comment
  3. I noticed that the SvgTheme in flutter_svg/lib/src/loaders.dart seems to duplicate the one from vector_graphics_compiler. Shouldn't we use only the one from vector_graphics_compiler?

@@ -3,13 +3,14 @@ import 'dart:convert' show utf8;
import 'package:flutter/foundation.dart' hide compute;
import 'package:flutter/services.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_svg/src/utilities/http.dart';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I read somewhere that it's not good to mix relative and absolute imports so I changed it to be more consistent.

@dnfield
Copy link
Owner

dnfield commented Jul 12, 2023

  1. I noticed that the SvgTheme in flutter_svg/lib/src/loaders.dart seems to duplicate the one from vector_graphics_compiler. Shouldn't we use only the one from vector_graphics_compiler?

That gets done to avoid exporting types from vector_graphics_compiler to end users from this library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Is there a replacement for DefaultSvgTheme?
2 participants