setAudioNotifications method

Future<Result> setAudioNotifications(
  1. List<AudioNotification> audioNotifications
)

Sets the AudioNotifications for the playlist player.

Implementation

Future<Result> setAudioNotifications(
    List<AudioNotification> audioNotifications) async {
  return ResultMap[await _invokeMethod('setAudioObjects', {
        'smallIconFileNames':
            audioNotifications.map((e) => e.smallIconFileName).toList(),
        'titles': audioNotifications.map((e) => e.title).toList(),
        'subTitles': audioNotifications.map((e) => e.subTitle).toList(),
        'largeIconUrls':
            audioNotifications.map((e) => e.largeIconUrl).toList(),
        'notificationDefaultActionsList': audioNotifications
            .map((e) =>
                NotificationDefaultActionsMap[e.notificationDefaultActions])
            .toList(),
        'notificationActionCallbackModes': audioNotifications
            .map((e) => NotificationActionCallbackModeMap[
                e.notificationActionCallbackMode])
            .toList(),
        'notificationCustomActionsList': audioNotifications
            .map((e) =>
                NotificationCustomActionsMap[e.notificationCustomActions])
            .toList(),
      }) as int] ??
      Result.ERROR;
}