Skip to content

Commit c190052

Browse files
committed
Consume new vector_graphics
1 parent 461ed86 commit c190052

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# CHANGES
22

3+
## 2.0.2
4+
5+
- Consume newer version of vector_graphics with multiple fixes around
6+
inheritence, patterns, and currentColor handling.
7+
38
## 2.0.1
49

510
- Disable Isolate parsing in debug mode.

lib/src/loaders.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ class SvgTheme {
1919
///
2020
/// Defaults the [fontSize] to 14.
2121
const SvgTheme({
22-
this.currentColor,
22+
this.currentColor = const Color(0xFF000000),
2323
this.fontSize = 14,
2424
double? xHeight,
2525
}) : xHeight = xHeight ?? fontSize / 2;
2626

2727
/// The default color applied to SVG elements that inherit the color property.
2828
/// See: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#currentcolor_keyword
29-
final Color? currentColor;
29+
final Color currentColor;
3030

3131
/// The font size used when calculating em units of SVG elements.
3232
/// See: https://www.w3.org/TR/SVG11/coords.html#Units
@@ -39,7 +39,7 @@ class SvgTheme {
3939

4040
vg.SvgTheme _toVgTheme() {
4141
return vg.SvgTheme(
42-
currentColor: currentColor != null ? vg.Color(currentColor!.value) : null,
42+
currentColor: vg.Color(currentColor.value),
4343
fontSize: fontSize,
4444
xHeight: xHeight,
4545
);

pubspec.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ name: flutter_svg
22
description: An SVG rendering and widget library for Flutter, which allows painting and displaying Scalable Vector Graphics 1.1 files.
33
repository: https://github.com/dnfield/flutter_svg
44
issue_tracker: https://github.com/dnfield/flutter_svg/issues
5-
version: 2.0.1
5+
version: 2.0.2
66

77
dependencies:
88
flutter:
99
sdk: flutter
10-
vector_graphics: ^1.0.1
11-
vector_graphics_codec: ^1.0.1
12-
vector_graphics_compiler: ^1.0.1
10+
vector_graphics: ^1.1.0
11+
vector_graphics_codec: ^1.1.0
12+
vector_graphics_compiler: ^1.1.0
1313

1414
dev_dependencies:
1515
flutter_test:

0 commit comments

Comments
 (0)