DocumentNode constructor

DocumentNode({
  1. Map<String, dynamic>? metadata,
})

Implementation

DocumentNode({
  Map<String, dynamic>? metadata,
}) {
  // We construct a new map here, instead of directly assigning from the
  // constructor, because we need to make sure that `_metadata` is mutable.
  _metadata = {
    if (metadata != null) //
      ...metadata,
  };
}