typedef_for_fn_generator 1.0.4-nullsafety8 icon indicating copy to clipboard operation
typedef_for_fn_generator: ^1.0.4-nullsafety8 copied to clipboard

An annotation processor for @TypedefForFn annotations

typedef_for_fn #

Use this code generator if you want to automatically create type definitions based on your functions

add the necessary dependencies
dependencies:
  typedef_for_fn: ^1.0.1-nnbd

dev_dependencies:
  build_runner: ^1.2.8
  typedef_for_fn_generator: 1.0.4-nnbd-2
decorate your function with the annotation
@TypedefForFn()
void f3(int input) {}
then set your function
fn_f3 fn = (a) => print("blah");

note, don't put any other code in with your function files (msg me if you want this changed!)

see fn_test.dart in the example folder of the github project for more examples

1
likes
70
pub points
0%
popularity

Publisher

unverified uploader

An annotation processor for @TypedefForFn annotations

License

Icon for licenses.MIT (LICENSE)

Dependencies

analyzer, build, dartz, generator_common, quiver, source_gen, typedef_for_fn

More

Packages that depend on typedef_for_fn_generator