toJson method

Map<String, dynamic> toJson()

Serializes the user into the payload expected by the token endpoint.

Implementation

Map<String, dynamic> toJson() => {
      'id': id,
      if (name != null) 'name': name,
      if (avatarUrl != null) 'avatarUrl': avatarUrl,
    };