isAndroidNotificationEnabled method

  1. @override
Future<bool> isAndroidNotificationEnabled({
  1. String? id,
})
override

检查通知状态

Implementation

@override
Future<bool> isAndroidNotificationEnabled({String? id}) async {
  if (!Platform.isAndroid) {
    return false;
  }

  bool enabled =
      await methodChannel.invokeMethod('isNotificationEnabled', {'id': id});

  return enabled;
}