ElginError class

Classe que encapsula erros retornados pelos dispositivos Elgin.

Esta classe interpreta o código de erro retornado pela API nativa e fornece o tipo de erro e uma mensagem descritiva correspondente, facilitando o tratamento e exibição dos erros ao usuário final.

Exemplo de uso:

final erro = ElginError(-22);
print(erro.type); // ERRO_DE_ABERTURA_PORTA_USB
print(erro.message); // Erro ao tentar abrir a porta de comunicação.

Constructors

ElginError(int code)
Construtor da classe ElginError.

Properties

code int
Código do erro retornado pela integração.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
message String
Mensagem detalhada e amigável referente ao erro ocorrido.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type String
Tipo categorizado do erro, útil para verificações programáticas.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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