temporary solution, the metadata will have its own type'd properties since everything will be converted to json.
type
final Map<String, dynamic>? metadata;