toJson method

Map<String, dynamic> toJson()

Map representation of this VroomJob having keys 'id', 'description', 'location', 'location_index', 'setup', 'service', 'amount', 'delivery', 'pickup', 'skills', 'priority', and 'time_windows'

Implementation

Map<String, dynamic> toJson() => <String, dynamic>{
      'id': id,
      'description': description,
      'location': location?.toList(),
      'location_index': locationIndex,
      'setup': setup,
      'service': service,
      'amount': amount,
      'delivery': delivery,
      'pickup': pickup,
      'skills': skills,
      'priority': priority,
      'time_windows': timeWindows,
    }..removeWhere((String _, dynamic value) => value == null);