toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() => {
  'name': name,
  'grade': grade,
  if (firstAscent != null) 'firstAscent': firstAscent!.toJson(),
  if (height != null) 'height': height,
};