setAudioVolume method

bool setAudioVolume(
  1. double volume
)

Implementation

bool setAudioVolume(double volume) {
  if (dotLottiePlayer != null && !isDisposed) {
    try {
      final player = dotLottiePlayer as JSObject;
      final method = player['setVolume'.toJS] as JSFunction;
      method.callAsFunction(player, volume.toJS);
      return true;
    } catch (e) {
      return false;
    }
  }
  return false;
}