Convert class variables to Map representation.
@override Map<String, dynamic> toJson() { return <String, dynamic>{ 'type': type }; }