Artifact constructor

Artifact({
  1. required String kind,
  2. required Address address,
  3. String? path,
  4. String? text,
  5. Map<String, Object?> meta = const {},
})

Implementation

Artifact({
  required this.kind,
  required this.address,
  this.path,
  this.text,
  this.meta = const {},
}) {
  if (path == null && text == null) {
    throw ArgumentError(
      'An artifact needs somewhere to live: give it a path, inline text, or '
      'both.',
    );
  }
}