playAsset method

Future<void> playAsset(
  1. String assetName
)

Plays a VAP animation from a Flutter asset.

The assetName should correspond to an asset declared in pubspec.yaml. This is the recommended way to bundle VAP animations with your app.

Throws an exception if the asset cannot be found or played.

Example:

await controller.playAsset('assets/animations/sample.mp4');

Implementation

Future<void> playAsset(String assetName) async {
  await __channel.invokeMethod('playAsset', {'assetName': assetName});
}