playEffect method

Future<int> playEffect(
  1. int effectId,
  2. int loopCount,
  3. int volume
)

Implementation

Future<int> playEffect(int effectId, int loopCount, int volume) async {
  Map<String, dynamic> arguments = {'effectId': effectId, 'loopCount': loopCount, 'volume': volume};
  String? result = await _channel.invokeMethod("playEffect", arguments);
  Map<String, dynamic> json = jsonDecode(result!);
  int? code = json['code'];
  return code ?? -1;
}