ApiParser<E> class

Constructors

ApiParser({required Map<Type, ErrorMessageAdapter<E>> adapters, required Map<String, E> errorMessages, required E defaultErrorMessage, Map<String, Map<String, E>> fieldErrorMessages = const {}})

Properties

adapters Map<Type, ErrorMessageAdapter<E>>
final
defaultErrorMessage → E
final
errorMessages Map<String, E>
final
fieldErrorMessages Map<String, Map<String, E>>
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getErrors(Type type, List<ErrorMessage> errors) List<ParserMessageEntity<E>>
getFieldMessageFromCode(String field, String errorCode) → E
getFirstMessage(List<ErrorMessage> errors) → E
getMessage(ErrorMessage error) → E
getMessageFromCode(String errorCode) → E
getParserResponse<T>(Type type, ApiResponse<T>? response) ParserResponse<T, E>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parse<T>(Type type, ApiResponse<T> response) ApiParserResponse<T, E>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited