DataMaterial constructor

const DataMaterial({
  1. String? source,
  2. String? text,
})

A material read from source or written as text; exactly one of the two is given, asserted.

Implementation

const DataMaterial({this.source, this.text})
  : assert(
      (source == null) != (text == null),
      'a material is a source path or text, not both',
    );