toMap method
Transforms this access token to a Map.
This could be useful for encoding this access token as JSON and then sending it to a server.
Implementation
Map<String, dynamic> toMap() {
return {
'id': user.id,
'user_id': user.userId,
'username': user.username,
'email': user.email,
'auth_token': token,
'auth_secret': secret,
};
}