objd_gen 0.0.1
objd_gen: ^0.0.1 copied to clipboard

Dart native

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 = '', 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
29%
popularity

A package of code generators for objD Annotations

Homepage

Documentation

Documentation
API reference

Uploader

stevertusyt@gmail.com

License

BSD (LICENSE)

Dependencies

analyzer, build, build_config, objd, source_gen

More

Packages that depend on objd_gen