toJson method
Converts a ConfigMapEnvSource instance to JSON data.
Implementation
Map<String, Object> toJson() {
final jsonData = <String, Object>{};
final tempName = name;
final tempOptional = optional;
if (tempName != null) {
jsonData['name'] = tempName;
}
if (tempOptional != null) {
jsonData['optional'] = tempOptional;
}
return jsonData;
}