toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final command = this.command;
  final environment = this.environment;
  final image = this.image;
  final ports = this.ports;
  return {
    if (command != null) 'command': command,
    if (environment != null) 'environment': environment,
    if (image != null) 'image': image,
    if (ports != null) 'ports': ports.map((k, e) => MapEntry(k, e.toValue())),
  };
}