toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  final key = this.key;
  return {
    if (key != null) 'key': key.name,
  };
}