writeFlutterApi method
void
writeFlutterApi(
- ObjcOptions generatorOptions,
- Root root,
- Indent indent,
- AstFlutterApi api, {
- required String dartPackageName,
override
Writes a single Flutter Api to indent
.
Implementation
@override
void writeFlutterApi(
ObjcOptions generatorOptions,
Root root,
Indent indent,
AstFlutterApi api, {
required String dartPackageName,
}) {
final String apiName = _className(generatorOptions.prefix, api.name);
_writeExtension(indent, apiName);
indent.newln();
indent.writeln('@implementation $apiName');
indent.newln();
_writeInitializers(indent);
for (final Method func in api.methods) {
_writeMethod(
generatorOptions,
root,
indent,
api,
func,
dartPackageName: dartPackageName,
);
}
indent.writeln('@end');
indent.newln();
}