writeGeneralUtilities method
void
writeGeneralUtilities(
- SwiftOptions generatorOptions,
- Root root,
- Indent indent, {
- required String dartPackageName,
override
Writes any necessary helper utilities to indent
if needed.
This method is not required, and does not need to be overridden.
Implementation
@override
void writeGeneralUtilities(
SwiftOptions generatorOptions,
Root root,
Indent indent, {
required String dartPackageName,
}) {
if (generatorOptions.includeErrorClass) {
_writePigeonError(generatorOptions, indent);
}
if (root.containsHostApi || root.containsProxyApi) {
_writeWrapResult(indent);
_writeWrapError(generatorOptions, indent);
}
if (root.containsFlutterApi || root.containsProxyApi) {
_writeCreateConnectionError(generatorOptions, indent);
}
_writeIsNullish(indent);
_writeNilOrValue(indent);
}