getRefreshTokens static method

Future<OperationResult> getRefreshTokens()

Implementation

static Future<OperationResult> getRefreshTokens() async {
  if (TecfyBasicApp.refreshTokenApiURL == null ||
      (TecfyBasicApp.refreshTokenApiURL?.isEmpty ?? true)) {
    return OperationResult(success: false, multiMessage: {
      "en": "refreshTokenApiURL is null or empty",
      "ar": "لا يوجد رابط للتحقق من التوكن"
    });
  }
  OperationResult result = await ApiService().httpGetDynamic(
      TecfyBasicApp.refreshTokenApiURL!,
      checkOnTokenExpiration: false);
  if (result.success) {
    return result;
  } else {
    return OperationResult(success: false, multiMessage: result.multiMessage);
  }
}