init static method
Future<void>
init(
{ - required int playerId,
})
Implementation
static Future<void> init({required int playerId}) async {
const channel = BasicMessageChannel<dynamic>('io.github.wangyng.simple_audio_player.init', StandardMessageCodec());
final Map<String, dynamic> requestMap = {};
requestMap["playerId"] = playerId;
final reply = await channel.send(requestMap);
if (!(reply is Map)) {
_throwChannelException();
}
final replyMap = Map<String, dynamic>.from(reply);
if (replyMap['error'] != null) {
final error = Map<String, dynamic>.from(replyMap['error']);
_throwException(error);
} else {
// noop
}
}