79206188

Date: 2024-11-20 07:31:04
Score: 0.5
Natty:
Report link

You can "hack" the flutter_local_notifications MethodChannel the plugin uses to invoke native functions and do something like this:

const MethodChannel localNotificationsMethodChannel =
MethodChannel('dexterous.com/flutter/local_notifications');

Future<void> deleteNotificationChannel(String channelId) async {
  await _localNotificationsMethodChannel.invokeMethod(
    'deleteNotificationChannel',
    channelId,
  );
}

I used this because I needed to customize the notification sound (based on user settings for the app) and the only way to do that was to create a new notification channel when the notification sound changes, and I didn't want my app notification settings to be flooded with unnecessary channels.

Reasons:
  • Blacklisted phrase (0.5): I need
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Marina P.