sendCreatePinCode method

Future<void> sendCreatePinCode(
  1. String pinCode,
  2. String pinCodeName, {
  3. GetDeviceDetailsMethod getDetails = DevicesRepository.getDeviceDetails,
  4. SendCreatePinCodeMethod sendCreatePinCodeMethod = PinCodeRepository.sendCreatePinCodeAction,
})

Run the "makeCreatePinCodeActionRequest" mutation on this device

@param pinCode the pin code @param pinCodeName the name for the pin code @throws ServerException for any errors returned by the platform

Implementation

Future<void> sendCreatePinCode(String pinCode, String pinCodeName,
    {GetDeviceDetailsMethod getDetails = DevicesRepository.getDeviceDetails,
    SendCreatePinCodeMethod sendCreatePinCodeMethod =
        PinCodeRepository.sendCreatePinCodeAction}) async {
  return performAction<List<PinCodeCredential>>(
      [...?getPinCodeCredentials, PinCodeCredential(pinCodeName, pinCode)],
      () => getPinCodeCredentials,
      () => sendCreatePinCodeMethod(
          _request, this._deviceId, pinCode, pinCodeName),
      getDetails: getDetails);
}