I am using flutter local notification in a project which has custom sound. In settings, there is option to disable notifications. I want to show notifications but with no sound i.e. silent notification if user has disabled notifications from app settings. I have tried following case but no use.
AndroidNotificationChannel channel = AndroidNotificationChannel(
channelID,
channelName,
importance: Importance.max,
groupId: groupKey,
playSound: settingsHive.getNotiSettings() == "false" ? true : false,
sound: RawResourceAndroidNotificationSound(sound.split('.').first),
);
Please any help or idea ?