toJson method Null safety

Map toJson()

Implementation

Map toJson() => {
      'contentType': contentType.index,
      'flags': flags.value,
      'usage': usage.value,
    };