AuthResponse class

A model representing the authentication response from the API.

This class encapsulates the authentication token, the authenticated user's details, and the hospital associated with the user.

Constructors

AuthResponse.new({required String token, required User user, required Hospital hospital})
Creates an AuthResponse instance.
AuthResponse.fromJson(Map<String, dynamic> json)
Creates an AuthResponse instance from a JSON map.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
hospital Hospital
The hospital associated with the authenticated user.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
token String
The authentication token.
final
user User
The authenticated user's details.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts this AuthResponse instance to a JSON map.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited