updateFCMPushToken method

  1. @Deprecated("Use [bindDeviceToken] instead")
Future<void> updateFCMPushToken(
  1. String token
)

Updates the FCM push token,

Param token The FCM push token.

Throws A description of the issue that caused this exception. See ChatError

Implementation

@Deprecated("Use [bindDeviceToken] instead")

///
/// Updates the FCM push token,
///
/// Param [token] The FCM push token.
///
/// **Throws** A description of the issue that caused this exception. See [ChatError]
///
///
///
Future<void> updateFCMPushToken(String token) async {
  try {
    Map req = {'token': token};
    Map result = await platform_interface.Client.instance.pushManager
        .callNativeMethod(ChatMethodKeys.updateFCMPushToken, req);
    ChatError.hasErrorFromResult(result);
  } catch (e) {
    rethrow;
  }
}