createNotificationChannel method

Future<void> createNotificationChannel()

Implementation

Future<void> createNotificationChannel() async {
  const AndroidNotificationChannel channel = AndroidNotificationChannel(
    CHANNEL_ID,
    'Personal Notifications', // Name
    description: 'Description of personal notifications', // Description
    importance: Importance.max, // Set to a valid Importance value
    playSound: true,
  );

  await flutterLocalNotificationsPlugin
      .resolvePlatformSpecificImplementation<
          AndroidFlutterLocalNotificationsPlugin>()
      ?.createNotificationChannel(channel);
}