From 17ed1cddb44af6bb98a15aa2b805513a34d12ae0 Mon Sep 17 00:00:00 2001 From: Alexandru Mariuti Date: Tue, 5 Nov 2024 10:36:57 +0100 Subject: [PATCH 1/2] refactor/compiler-wasm-compatibility --- packages/vector_graphics_compiler/CHANGELOG.md | 4 ++++ .../lib/vector_graphics_compiler.dart | 4 ++-- packages/vector_graphics_compiler/pubspec.yaml | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/vector_graphics_compiler/CHANGELOG.md b/packages/vector_graphics_compiler/CHANGELOG.md index 51e080adfa83..feb96a3706a8 100644 --- a/packages/vector_graphics_compiler/CHANGELOG.md +++ b/packages/vector_graphics_compiler/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.1.13 + +* Makes the package WASM compatible. + ## 1.1.12 * Transfers the package source from https://github.com/dnfield/vector_graphics diff --git a/packages/vector_graphics_compiler/lib/vector_graphics_compiler.dart b/packages/vector_graphics_compiler/lib/vector_graphics_compiler.dart index c4a8efe3b27a..206041b7d264 100644 --- a/packages/vector_graphics_compiler/lib/vector_graphics_compiler.dart +++ b/packages/vector_graphics_compiler/lib/vector_graphics_compiler.dart @@ -18,9 +18,9 @@ import 'src/svg/theme.dart'; import 'src/vector_instructions.dart'; export 'src/_initialize_path_ops_io.dart' - if (dart.library.html) 'src/_initialize_path_ops_web.dart'; + if (dart.library.js_interop) 'src/_initialize_path_ops_web.dart'; export 'src/_initialize_tessellator_io.dart' - if (dart.library.html) 'src/_initialize_tessellator_web.dart'; + if (dart.library.js_interop) 'src/_initialize_tessellator_web.dart'; export 'src/geometry/basic_types.dart'; export 'src/geometry/matrix.dart'; export 'src/geometry/path.dart'; diff --git a/packages/vector_graphics_compiler/pubspec.yaml b/packages/vector_graphics_compiler/pubspec.yaml index ae92d689012e..e2c7e5e98970 100644 --- a/packages/vector_graphics_compiler/pubspec.yaml +++ b/packages/vector_graphics_compiler/pubspec.yaml @@ -5,7 +5,7 @@ issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+ # See https://github.com/flutter/flutter/issues/157626 before publishing a new # version. publish_to: none -version: 1.1.12 +version: 1.1.13 executables: vector_graphics_compiler: @@ -36,7 +36,7 @@ dev_dependencies: sdk: flutter test: ^1.20.1 # See https://github.com/flutter/flutter/issues/157626 - vector_graphics: ">=1.1.11+1 <= 1.1.12" + vector_graphics: ^1.1.13 vector_math: ^2.1.2 platforms: From 0bfba137a77f45966733b1be4e63deebf737e95d Mon Sep 17 00:00:00 2001 From: Alexandru Mariuti Date: Tue, 5 Nov 2024 17:33:16 +0000 Subject: [PATCH 2/2] Update pubspec.yaml --- packages/vector_graphics_compiler/pubspec.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/vector_graphics_compiler/pubspec.yaml b/packages/vector_graphics_compiler/pubspec.yaml index d72245f6cf69..6c86d50b38af 100644 --- a/packages/vector_graphics_compiler/pubspec.yaml +++ b/packages/vector_graphics_compiler/pubspec.yaml @@ -31,7 +31,6 @@ dev_dependencies: flutter_test: sdk: flutter test: ^1.20.1 - # See https://github.com/flutter/flutter/issues/157626 vector_graphics: ^1.1.13 vector_math: ^2.1.2