enableReciveNotification method

Future enableReciveNotification({
  1. required String? type,
})

MARK: enableReciveNotification enable (String) type (String) one of theses values ("appPush","SMS","email") Output : - callback with two parameter success bool as string error

Implementation

Future enableReciveNotification({required String? type}) async {
  try {
    var data = {'enable': true, 'type': type};
    await _channel.invokeMethod(_updateChannel, data).then((result) {
      logger.d('enableReciveNotification $result');
    });
    return 'Success';
  } on PlatformException catch (e) {
    logger.d(e);
    return e;
  }
}