toJson static method

Map<String, dynamic> toJson(
  1. Metadata metadata
)

Creates Map from Class Object

Implementation

static Map<String, dynamic> toJson(Metadata metadata) {
  switch (metadata.version) {
    case 9:
      return (metadata as Metadata_V9).toJson();
    case 10:
      return (metadata as Metadata_V10).toJson();
    case 11:
      return (metadata as Metadata_V11).toJson();
    case 12:
      return (metadata as Metadata_V12).toJson();
    case 13:
      return (metadata as Metadata_V13).toJson();
    case 14:
      return (metadata as Metadata_V14).toJson();
    default:
      throw Exception('Unknown Metadata version: ${metadata.version}}');
  }
}