play method
Implementation
Future<void> play(int soundId) async {
const channel = BasicMessageChannel<dynamic>('com.wangyng.better_sound_effect.play', StandardMessageCodec());
final Map<String, dynamic> requestMap = {"soundId": soundId};
final reply = await channel.send(requestMap);
if (!(reply is Map)) {
_throwChannelException();
}
Map<String, dynamic> replyMap = Map<String, dynamic>.from(reply);
if (replyMap['error'] != null) {
final HashMap<String, dynamic> error = replyMap['error'];
_throwException(error);
} else {
// noop
}
}