0

how to create condition if true play sound custom else play sound default device android i try like it but in condition false play custom sound

await flutterLocalNotificationsPlugin.zonedSchedule(
  id,
    title,
  message,
  time,
    NotificationDetails(
        android:AndroidNotificationDetails(
          'channel id',
          'channel name',
          playSound: true,
          sound: sound ?  RawResourceAndroidNotificationSound('bell') : null,
          importance: Importance.max,
          priority: Priority.high,
        )
    ),
  androidAllowWhileIdle: true,
  uiLocalNotificationDateInterpretation:
  UILocalNotificationDateInterpretation.absoluteTime,
  payload: '$year-$month-$day, $hour:$minute'

);
cmbon
  • 1
  • 2

0 Answers0