wipeppLogin method

Future<WpTokenModel?> wipeppLogin({
  1. required String token,
})

Implementation

Future<WpTokenModel?> wipeppLogin({
  required String token,
}) async {
  try {
    if (_initializeContext == null || _clientAppKeys == null) {
      log(
        "initialize ERROR.",
        error: "initialize ERROR.",
        stackTrace: StackTrace.current,
      );
      return null;
    } else {
      final _lang = Lang();
      String wpTokenError =
          _lang.getTextTR(langEnum: _langEnum, key: "wp_token_error");

      var value = await authRepository.wipeppLogin(
        clientAppKeys: _clientAppKeys!,
        token: token,
      );
      if (value.errorMsg != null) {
        customDialog(
          _initializeContext!,
          text: wpTokenError,
        );
        return value.data;
      } else {
        return value.data;
      }
    }
  } catch (e) {
    return null;
  }
}