stopAllNotification method

Future<String> stopAllNotification(
  1. BuildContext context
)

throw No internet connection

Implementation

Future<String> stopAllNotification(BuildContext context) async {
  if (VChatAppService.instance.vChatNotificationType ==
      VChatNotificationType.firebase) {
    await FirebaseMessaging.instance.deleteToken();
    return VChatAppService.instance
        .getTrans(context)
        .notificationsHasBeenStoppedSuccessfully();
  } else {
    throw "you have to enable firebase for this project first";
  }
}