diff --git a/packages/vector_graphics/CHANGELOG.md b/packages/vector_graphics/CHANGELOG.md index d0233d9b..ebe15d26 100644 --- a/packages/vector_graphics/CHANGELOG.md +++ b/packages/vector_graphics/CHANGELOG.md @@ -1,5 +1,13 @@ # CHANGELOG +## 1.1.9+2 + +- Fix case sensitivity on scientific notation parsing. + +## 1.1.9+1 + +- Fix publication error that did not have latest source code. + ## 1.1.9 - Fix handling of invalid XML `@id` attributes. diff --git a/packages/vector_graphics/pubspec.yaml b/packages/vector_graphics/pubspec.yaml index 243979f6..27bac61e 100644 --- a/packages/vector_graphics/pubspec.yaml +++ b/packages/vector_graphics/pubspec.yaml @@ -1,6 +1,6 @@ name: vector_graphics description: A vector graphics rendering package for Flutter. -version: 1.1.9 +version: 1.1.9+2 homepage: https://github.com/dnfield/vector_graphics environment: @@ -10,13 +10,13 @@ environment: dependencies: flutter: sdk: flutter - vector_graphics_codec: 1.1.9 + vector_graphics_codec: 1.1.9+2 dev_dependencies: flutter_test: sdk: flutter flutter_lints: ^1.0.0 - vector_graphics_compiler: 1.1.9 + vector_graphics_compiler: 1.1.9+2 # Comment out before publishing dependency_overrides: diff --git a/packages/vector_graphics_codec/CHANGELOG.md b/packages/vector_graphics_codec/CHANGELOG.md index e72b21f8..6928cc91 100644 --- a/packages/vector_graphics_codec/CHANGELOG.md +++ b/packages/vector_graphics_codec/CHANGELOG.md @@ -1,5 +1,13 @@ # CHANGELOG +## 1.1.9+2 + +- Fix case sensitivity on scientific notation parsing. + +## 1.1.9+1 + +- Fix publication error that did not have latest source code. + ## 1.1.9 - Fix handling of invalid XML `@id` attributes. diff --git a/packages/vector_graphics_codec/pubspec.yaml b/packages/vector_graphics_codec/pubspec.yaml index fcb1319b..8c355414 100644 --- a/packages/vector_graphics_codec/pubspec.yaml +++ b/packages/vector_graphics_codec/pubspec.yaml @@ -1,6 +1,6 @@ name: vector_graphics_codec description: An encoding library for `package:vector_graphics` -version: 1.1.9 +version: 1.1.9+2 homepage: https://github.com/dnfield/vector_graphics environment: diff --git a/packages/vector_graphics_compiler/CHANGELOG.md b/packages/vector_graphics_compiler/CHANGELOG.md index f4eded61..0811ad8b 100644 --- a/packages/vector_graphics_compiler/CHANGELOG.md +++ b/packages/vector_graphics_compiler/CHANGELOG.md @@ -1,5 +1,13 @@ # CHANGELOG +## 1.1.9+2 + +- Fix case sensitivity on scientific notation parsing. + +## 1.1.9+1 + +- Fix publication error that did not have latest source code. + ## 1.1.9 - Fix handling of invalid XML `@id` attributes. diff --git a/packages/vector_graphics_compiler/lib/src/svg/_path_ops_ffi.dart b/packages/vector_graphics_compiler/lib/src/svg/_path_ops_ffi.dart index 518f8040..389e942c 100644 --- a/packages/vector_graphics_compiler/lib/src/svg/_path_ops_ffi.dart +++ b/packages/vector_graphics_compiler/lib/src/svg/_path_ops_ffi.dart @@ -119,7 +119,7 @@ class Path implements PathProxy { _updatePathData(); final int count = _pathData!.ref.verbCount; return List.generate(count, (int index) { - return pathVerbDict[_pathData!.ref.verbs.elementAt(index).value]!; + return pathVerbDict[_pathData!.ref.verbs[index]]!; }, growable: false); } diff --git a/packages/vector_graphics_compiler/lib/src/svg/parsers.dart b/packages/vector_graphics_compiler/lib/src/svg/parsers.dart index fc7e2b1f..a4f96c2a 100644 --- a/packages/vector_graphics_compiler/lib/src/svg/parsers.dart +++ b/packages/vector_graphics_compiler/lib/src/svg/parsers.dart @@ -31,7 +31,7 @@ List _parseTransformParams(String params) { for (int i = 0; i < params.length; i += 1) { final String char = params[i]; final bool isSeparator = char == ' ' || char == '-' || char == ','; - final bool isExponent = i > 0 && params[i - 1] == 'e'; + final bool isExponent = i > 0 && params[i - 1].toLowerCase() == 'e'; if (isSeparator && !isExponent) { if (current != '') { result.add(parseDouble(current)!); diff --git a/packages/vector_graphics_compiler/lib/src/svg/theme.dart b/packages/vector_graphics_compiler/lib/src/svg/theme.dart index 05a57c34..d82ed511 100644 --- a/packages/vector_graphics_compiler/lib/src/svg/theme.dart +++ b/packages/vector_graphics_compiler/lib/src/svg/theme.dart @@ -33,7 +33,7 @@ class SvgTheme { final double xHeight; @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { if (other.runtimeType != runtimeType) { return false; } diff --git a/packages/vector_graphics_compiler/pubspec.yaml b/packages/vector_graphics_compiler/pubspec.yaml index efe891fe..e301a9d8 100644 --- a/packages/vector_graphics_compiler/pubspec.yaml +++ b/packages/vector_graphics_compiler/pubspec.yaml @@ -1,6 +1,6 @@ name: vector_graphics_compiler description: A compiler for `package:vector_graphics`. -version: 1.1.9 +version: 1.1.9+2 homepage: https://github.com/dnfield/vector_graphics executables: @@ -14,7 +14,7 @@ dependencies: meta: ^1.7.0 path_parsing: ^1.0.1 xml: ^6.3.0 - vector_graphics_codec: 1.1.9 + vector_graphics_codec: 1.1.9+2 path: ^1.8.0 dev_dependencies: @@ -25,7 +25,7 @@ dev_dependencies: sdk: flutter flutter_test: sdk: flutter - vector_graphics: 1.1.9 + vector_graphics: 1.1.9+2 # Comment out before publishing dependency_overrides: diff --git a/packages/vector_graphics_compiler/test/parsers_test.dart b/packages/vector_graphics_compiler/test/parsers_test.dart index 67003f1e..0e0a9552 100644 --- a/packages/vector_graphics_compiler/test/parsers_test.dart +++ b/packages/vector_graphics_compiler/test/parsers_test.dart @@ -178,6 +178,11 @@ void main() { parseTransform('translate(9e-6,6.5e-4)'), AffineMatrix.identity.translated(9e-6, 6.5e-4), ); + + expect( + parseTransform('translate(9E-6,6.5E-4)'), + AffineMatrix.identity.translated(9e-6, 6.5e-4), + ); }); test('Parse a transform with a missing space', () { @@ -188,7 +193,15 @@ void main() { }); test('Parse a transform with doubled periods', () { - print(parseTransform('matrix(.70711-.70711.70711.70711-640.89 452.68)')); + expect( + parseTransform('matrix(.70711-.70711.70711.70711-640.89 452.68)'), + const AffineMatrix( + 0.70711, -0.70711, // + 0.70711, 0.70711, // + -640.89, 452.68, // + 0.70711, // + ), + ); }); }