writeFileImports method

  1. @override
void writeFileImports(
  1. KotlinOptions generatorOptions,
  2. Root root,
  3. Indent indent, {
  4. required String dartPackageName,
})
override

Writes specified imports to indent.

Implementation

@override
void writeFileImports(
  KotlinOptions generatorOptions,
  Root root,
  Indent indent, {
  required String dartPackageName,
}) {
  indent.newln();
  if (generatorOptions.package != null) {
    indent.writeln('package ${generatorOptions.package}');
  }
  indent.newln();
  indent.writeln('import android.util.Log');
  indent.writeln('import io.flutter.plugin.common.BasicMessageChannel');
  indent.writeln('import io.flutter.plugin.common.BinaryMessenger');
  indent.writeln('import io.flutter.plugin.common.MessageCodec');
  indent.writeln('import io.flutter.plugin.common.StandardMessageCodec');
  indent.writeln('import java.io.ByteArrayOutputStream');
  indent.writeln('import java.nio.ByteBuffer');
}