DirectusListResponse<T> class

Directus response object when data is List.

When response is returning a List of items, use this instead of DirectusResponse. This class is created to properly and type safely convert data. Using List responses inside DirectusResponse will throw an error. Only this response should be used. It has all the same properties and methods, but adopted when response is List.

Implemented types

Constructors

DirectusListResponse(Response dioResponse, {ItemsConverter? converter})
Constructor that converts Dio Response to DirectusListResponse. You can pass converter that is used to convert response Map to proper object, by default it will return Map.
DirectusListResponse.manually(List<T> data, {ResponseMeta? meta})
Manually set data.

Properties

data List<T>
Response data.
latefinaloverride
hashCode int
The hash code for this object.
no setterinherited
meta ResponseMeta?
Response metadata.
latefinal
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

Static Methods

fromRequest<U>(Future<Response<Object?>> func(), {ItemsConverter? converter}) Future<DirectusListResponse<U>>
Static method that you can pass a closure that should return Dio Response.
override