Map<String, dynamic> toJson() { return { 'projectId': projectId, 'projectName': projectName, if (apiKey != null) 'apiKey': apiKey, }; }