functional_widget_annotation 0.5.2 functional_widget_annotation: ^0.5.2 copied to clipboard
Annotations for function_widget_generator used to generate widget classes from a function
import 'package:functional_widget_annotation/functional_widget_annotation.dart';
import 'package:flutter/widgets.dart';
part 'main.g.dart';
// we create a widget using a widget decorated by `@widget`
@widget
Widget foo() {
return Container();
}
void main() => runApp(
// we use the generated class
const Foo(),
);