WidgetAnnotation constructor

const WidgetAnnotation({
  1. bool assertions = false,
  2. bool restAction = false,
})

Writing a Widget becomes much simpler with the @WidgetAnnotation() annotation. You can just give it a function with needed parameters which returns a new Widget and the generators will figure out a Widget class to go along with it.

Implementation

const WidgetAnnotation({this.assertions = false, this.restAction = false});