toJson method

Map<String, dynamic> toJson()

Converts the object to JSON map.

Implementation

Map<String, dynamic> toJson() => {
  'name': name,
  'description': description,
  'type': type,
  'count': count,
  'tiers': tiers?.map((t) => t.toJson()).toList(),
  'currentTier': currentTier?.value,
  'nextTier': nextTier?.value,
  'nextTierTripsRequired': nextTierTripsRequired,
  'remainingTrips': remainingTrips,
};