writeGeneralUtilities method

  1. @override
void writeGeneralUtilities(
  1. KotlinOptions generatorOptions,
  2. Root root,
  3. Indent indent, {
  4. 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(
  KotlinOptions generatorOptions,
  Root root,
  Indent indent, {
  required String dartPackageName,
}) {
  if (root.containsHostApi || root.containsProxyApi) {
    _writeWrapResult(indent);
    _writeWrapError(generatorOptions, indent);
  }
  if (root.containsFlutterApi || root.containsProxyApi) {
    _writeCreateConnectionError(generatorOptions, indent);
  }
  if (generatorOptions.includeErrorClass) {
    _writeErrorClass(generatorOptions, indent);
  }
}