createNotificationChannel method Null safety

Future<void> createNotificationChannel(
  1. String channelId,
  2. String channelName,
  3. String channelDescription,
  4. int importance,
  5. bool showBadge
)

Method to create Notification Channel

Implementation

static Future<void> createNotificationChannel(
    String channelId,
    String channelName,
    String channelDescription,
    int importance,
    bool showBadge) async {
  return await _channel.invokeMethod('createNotificationChannel', {
    'channelId': channelId,
    'channelName': channelName,
    'channelDescription': channelDescription,
    'importance': importance,
    'showBadge': showBadge
  });
}