File.execute constructor

File.execute(
  1. String path, {
  2. Widget? child,
  3. String? pack,
  4. bool create = true,
  5. Comment? header,
  6. bool inheritFolder = true,
  7. Object? arguments,
})

the execute subconstructor adds an execution statement forwarding to the new file into the original

Implementation

File.execute(
  this.path, {
  this.child,
  this.pack,
  this.create = true,
  this.header,
  this.inheritFolder = true,
  this.arguments,
}) : execute = true {
  assert(arguments == null ||
      arguments is Map ||
      arguments is Storage ||
      arguments is Entity ||
      arguments is Location);
  path.replaceAll('.mcfunction', '');
  if (path.substring(0, 1) == '/') path = path.substring(1);
}