Map<String, Object> toJson() => { if (username != null) 'username': username!, if (password != null) 'password': password!, };