writeFileImports method
void
writeFileImports(
- SwiftOptions generatorOptions,
- Root root,
- Indent indent, {
- required String dartPackageName,
override
Writes specified imports to indent
.
Implementation
@override
void writeFileImports(
SwiftOptions generatorOptions,
Root root,
Indent indent, {
required String dartPackageName,
}) {
indent.writeln('import Foundation');
indent.newln();
indent.format('''
#if os(iOS)
import Flutter
#elseif os(macOS)
import FlutterMacOS
#else
#error("Unsupported platform.")
#endif''');
}