toJson method
Returns a JSON map for the request body.
Implementation
Map<String, dynamic> toJson() {
return <String, dynamic>{
'username': username,
'email': email,
'password': password,
'agreement': agreement,
'locale': locale,
if (reason != null) 'reason': reason,
if (dateOfBirth != null) 'date_of_birth': dateOfBirth,
};
}