0 purchases
dartness generator
Introduction #
dartness_generator is used with dartness_server in order to provide the code generation for some annotations
Generating code #
Add dartness_generator together with build_runner in dev_dependencies also add dartness_server in the dependency
section in the pubspec.yaml
dependencies:
dartness_server: ^0.7.0
dev_dependencies:
build_runner: ^2.2.0
dartness_generator: ^0.7.2
copied to clipboard
Add the corresponding part '.g.dart' to your classes, otherwise the new code won't be generated, you can find an
example in the following code:
part 'city_controller.g.dart';
@Controller('/cities')
class CityController {
@Get()
String getCities() {
return 'This action returns a list of cities';
}
}
copied to clipboard
Go to the root of your project and execute the following command:
$ dart run build_runner build
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.