writeFileImports method
void
writeFileImports(
- DartOptions generatorOptions,
- Root root,
- Indent indent, {
- required String dartPackageName,
override
Writes specified imports to indent
.
Implementation
@override
void writeFileImports(
DartOptions generatorOptions,
Root root,
Indent indent, {
required String dartPackageName,
}) {
indent.writeln("import 'dart:async';");
indent.writeln(
"import 'dart:typed_data' show Float64List, Int32List, Int64List, Uint8List;",
);
indent.newln();
final bool hasProxyApi = root.apis.any((Api api) => api is AstProxyApi);
indent.writeln(
"import 'package:flutter/foundation.dart' show ReadBuffer, WriteBuffer${hasProxyApi ? ', immutable, protected' : ''};");
indent.writeln("import 'package:flutter/services.dart';");
if (hasProxyApi) {
indent.writeln(
"import 'package:flutter/widgets.dart' show WidgetsFlutterBinding;",
);
}
}