MaterialResource constructor

MaterialResource(
  1. LocalId id, {
  2. required String type,
  3. String name = '',
  4. Map<String, PropertyValue>? properties,
  5. AssetRef? asset,
})

Creates a material of the given type.

Implementation

MaterialResource(
  super.id, {
  required this.type,
  this.name = '',
  Map<String, PropertyValue>? properties,
  this.asset,
}) : properties = properties ?? {};