rive-flutter
rive-flutter copied to clipboard
The name `AudioSource` isn't a type, so it can't be used as a type argument.
rive v0.14-dev11 (This is the latest commit in the repo that we’ve tested: 49baf479eaaa90ddf9a53246a1fdb536a7dcba18)
It seems that AudioSource is not exported from the rive_native package to the rive package. We can use RenderImage and Font but not AudioSource.
final audio = r.Factory.rive.decodeAudio(bytes);
final images = <String, r.RenderImage>{};
final sounds = <String, r.AudioSource>{}; // <- compile time error
final fonts = <String, r.Font>{};
We get this compile time error:
The name 'AudioSource' isn't a type, so it can't be used as a type argument.
Try correcting the name to an existing type, or defining a type named 'AudioSource'