From ef97a69daba038d6c534e775e5bc1831b77e8b3e Mon Sep 17 00:00:00 2001 From: stuartmorgan Date: Wed, 11 Sep 2019 07:43:50 -0700 Subject: [PATCH] Make Swift plugin template swift-format compliant (#40195) swift-format will alphabetize import statements, so Flutter* should be before Foundation. Also, separating the "Generated file" comment prevents the formatter from thinking that the comment is associated with the following import, rather than the file, if it does re-order. --- packages/flutter_tools/lib/src/plugins.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/flutter_tools/lib/src/plugins.dart b/packages/flutter_tools/lib/src/plugins.dart index 91af433d167..7d8a279f5a3 100644 --- a/packages/flutter_tools/lib/src/plugins.dart +++ b/packages/flutter_tools/lib/src/plugins.dart @@ -349,8 +349,9 @@ const String _objcPluginRegistryImplementationTemplate = '''// const String _swiftPluginRegistryTemplate = '''// // Generated file. Do not edit. // -import Foundation + import {{framework}} +import Foundation {{#plugins}} import {{name}}