AdapterResponse<T> class

Wrapper class for transferring response data from Platform to Flutter.

Wraps an exception if calling the platform method has failed to be logged by the consumer. Or wraps an object of type T when platform method has returned a response and deserialization was successful.

Constructors

AdapterResponse(T? _object, Exception? _exception)
Constructor
AdapterResponse.failure(Exception e)
Create an AdapterResponse with an exception.
factory
AdapterResponse.success(T? t)
Create an AdapterResponse with a response object.
factory

Properties

exception Exception
Get a non-null object value.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
isSuccess bool
Returns true if the _object is not null.
no setter
object ↔ T
Get a non-null object value.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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