AuthResponse.fromJson constructor

AuthResponse.fromJson(
  1. Map<String, dynamic> json
)

Instanciates an AuthResponse object from json response.

Implementation

AuthResponse.fromJson(Map<String, dynamic> json)
    : session = Session.fromJson(json),
      user = User.fromJson(json) ?? Session.fromJson(json)?.user;