writeDataClass method
void
writeDataClass(
- ObjcOptions generatorOptions,
- Root root,
- Indent indent,
- Class classDefinition, {
- required String dartPackageName,
override
Writes a single data class to indent
.
Implementation
@override
void writeDataClass(
ObjcOptions generatorOptions,
Root root,
Indent indent,
Class classDefinition, {
required String dartPackageName,
}) {
final String className =
_className(generatorOptions.prefix, classDefinition.name);
indent.writeln('@implementation $className');
_writeObjcSourceClassInitializer(
generatorOptions, root, indent, classDefinition, className);
writeClassDecode(
generatorOptions,
root,
indent,
classDefinition,
dartPackageName: dartPackageName,
);
writeClassEncode(
generatorOptions,
root,
indent,
classDefinition,
dartPackageName: dartPackageName,
);
indent.writeln('@end');
indent.newln();
}