toLoginJson method
Converts the user credentials into a JSON-compatible map for login.
Only email and password are included in this request body.
Example:
{
"data": {
"email": "john@example.com",
"password": "secure123"
}
}
Implementation
Map<String, dynamic> toLoginJson() {
return {
'data': {
'email': email,
'password': password,
},
};
}