logout method

Future<MFResponse> logout (
  1. {@required String securityCheck}
)

Logs out of a specified securityCheck If an error occurs, an object of type MFResponse is returned.

Implementation

Future<MFResponse> logout({@required String securityCheck}) async {
  final Map response = await _channel.invokeMethod(
      WLAUTHORIZATIONMANAGER_LOGOUT,
      <String, dynamic>{SECURITYCHECK: securityCheck});

  final MFResponse mfResponse = MFResponse(mfResponse: response);
  if ((mfResponse.errorMsg?.isEmpty ?? true) ||
      (mfResponse.errorCode?.isEmpty ?? true)) {
    return mfResponse;
  } else {
    throw mfResponse;
  }
}