as<T> method

T as<T>(
  1. T parser(
    1. LuckyResponse
    )
)

Passes this to parser and returns the result.

Use this for strongly-typed deserialization without intermediate variables. Example: response.as(User.fromResponse).

Implementation

T as<T>(T Function(LuckyResponse) parser) => parser(this);