objd_gen 0.0.2
objd_gen: ^0.0.2 copied to clipboard

A package of code generators for objD Annotations

example/example.dart

import 'package:objd/core.dart';

part 'example.g.dart';

@Wdg
Widget helloWorld() => Log('Hello World!');

@Wdg
Widget helloName(
  String name, {
  String lastname = '',
  required Context context,
}) =>
    For.of([
      Comment('This was generated by HelloName on version ${context.version}'),
      Log('Hello $name $lastname!'),
    ]);

@Func()
final Widget load = HelloWorld();

@Func(
  name: 'main',
  path: 'folder',
  execute: false,
  create: true,
)
final Widget main_widget = Comment('main file');

@Pck(name: 'namespace', main: 'main', load: 'load')
final List<File> myPack = [LoadFile, MainFile];

@Prj(
  name: 'My awesome Datapack',
  target: './datapacks/',
  version: 17,
  description: 'A simple dp for demonstrating annotations',
)
final myProject = NamespacePack();
0
likes
70
pub points
20%
popularity

Publisher

Unknown

A package of code generators for objD Annotations

Homepage

Documentation

Documentation
API reference

License

BSD (LICENSE)

Dependencies

analyzer, build, build_config, objd, source_gen

More

Packages that depend on objd_gen