Response<T> constructor

Response<T>({
  1. T? data,
  2. ErrorData? error,
  3. int balance = 0,
})

Creates a new Response instance.

data is the response data of type T, if the request was successful. error is the error information, if the request failed. balance is the current account balance.

Implementation

Response({this.data, this.error, this.balance = 0});