functional_widget 0.10.2 copy "functional_widget: ^0.10.2" to clipboard
functional_widget: ^0.10.2 copied to clipboard

A code generator that generates widget classes from their implementation as a function.

example/lib/main.dart

import 'package:flutter/foundation.dart';
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 `@swidget`
@swidget
Widget foo(int value) {
  return Container();
}

void main() => runApp(
      // we use the generated class
      const Foo(42),
    );
256
likes
140
points
5.26k
downloads

Publisher

verified publisherdash-overflow.net

Weekly Downloads

A code generator that generates widget classes from their implementation as a function.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

analyzer, build, build_config, code_builder, collection, functional_widget_annotation, meta, source_gen

More

Packages that depend on functional_widget