From a22fc5f0471551f45d9c2534ad70f99b0f6a5810 Mon Sep 17 00:00:00 2001 From: philter Date: Thu, 11 Apr 2024 18:23:47 +0000 Subject: [PATCH] Ensure rive_common wasm module gets pulled into rive_flutter properly In rive_flutter, we were doing a check to see if the file had any text before we loaded the rive_common wasm module. However, since all rive_common deps (text, audio, layout) are bundled together, we need to make sure to check for existence of those as well, and since Artboard extends LayoutComponent, we pretty much always need to load the module. Diffs= 024f95b10 Ensure rive_common wasm module gets pulled into rive_flutter properly (#7040) cb2ea5b2d Exposing artboard volume (#7022) 8ecc99130 Fixing audio runtimes. (#7007) Co-authored-by: Philip Chung --- .rive_head | 2 +- lib/src/rive_file.dart | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.rive_head b/.rive_head index fe5c2da..c90e07c 100644 --- a/.rive_head +++ b/.rive_head @@ -1 +1 @@ -cf43d9fdf8ab24146fd3c350121d200c43ca544d +024f95b100f1e76940c4dad707e54bb4f48e86d4 diff --git a/lib/src/rive_file.dart b/lib/src/rive_file.dart index 1338ad8..c440722 100644 --- a/lib/src/rive_file.dart +++ b/lib/src/rive_file.dart @@ -149,6 +149,11 @@ class RiveFile { final coreType = _peekRuntimeObjectType(reader, propertyToField); switch (coreType) { case TextBase.typeKey: + // Since all rive_common wasm modules are currently bundled together + // we need to check for existance of any of these. And since Artboard + // extends LayoutComponent, we will always need to load it + case ArtboardBase.typeKey: + case AudioAssetBase.typeKey: return true; } }