Func constructor

const Func({
  1. String? name,
  2. String? pack,
  3. String? path = '/',
  4. bool? execute,
  5. bool? create,
})

Writing Minecrafts functions annotations becomes really easy. Just annotate a Widget variable that should be inside of your function with @Func():

@Func()
final Widget load = Say('Hello');

Inside the parentheses of @Func() you can also provide various parameters to customize the file generation:

@Func
name Provide a custom filename different from the variable name
path Give a custom path for your function
execute whether to execute your File(when included somewhere in the widget tree)
create whether to actually create the file or not

Implementation

const Func({
  this.name,
  this.pack,
  this.path = '/',
  this.execute,
  this.create,
});