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 <philterdesign@gmail.com>
This commit is contained in:
philter
2024-04-11 18:23:47 +00:00
parent 4ede8c868e
commit a22fc5f047
2 changed files with 6 additions and 1 deletions

View File

@ -1 +1 @@
cf43d9fdf8ab24146fd3c350121d200c43ca544d
024f95b100f1e76940c4dad707e54bb4f48e86d4

View File

@ -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;
}
}