ExtendedResponse extension

Extension for dio's Response class

on
  • Response

Methods

body<T extends DataModel>(Type type) → T

Available on Response, provided by the ExtendedResponse extension

Convert response body to a DataModel
decimal() double

Available on Response, provided by the ExtendedResponse extension

integer() int

Available on Response, provided by the ExtendedResponse extension

list<T extends DataModel>(Type type) List<T>

Available on Response, provided by the ExtendedResponse extension

Convert response body to a list of DataModel
number() num

Available on Response, provided by the ExtendedResponse extension

text() String

Available on Response, provided by the ExtendedResponse extension

Get response body as text string