fromMap static method

HVError fromMap(
  1. Map errorObj
)

Creates an instance of HVError from a map object.

Parameters:

  • errorObj: A map containing the error details, where 'errorCode' and 'errorMessage' are required keys.

Returns:

  • An instance of HVError with the error details from the map.

Implementation

static HVError fromMap(Map errorObj) {
  return HVError(
    errorCode: errorObj['errorCode'],
    errorMessage: errorObj['errorMessage'],
  );
}