toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final capacityProvider = this.capacityProvider;
  final base = this.base;
  final weight = this.weight;
  return {
    'capacityProvider': capacityProvider,
    if (base != null) 'base': base,
    if (weight != null) 'weight': weight,
  };
}