Attempt to fix the windows bot

Change-Id: Ifbe570282c99441c3b80926ae4d615e142b27480
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233657
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/convert_class_to_enum.dart b/pkg/analysis_server/lib/src/services/correction/dart/convert_class_to_enum.dart
index 978a6f5..0e05694 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/convert_class_to_enum.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/convert_class_to_enum.dart
@@ -179,6 +179,7 @@
     // being converted.
     var members = classDeclaration.members;
     var indent = utils.getIndent(1);
+    var eol = utils.endOfLine;
     var constantsBuffer = StringBuffer();
     var fieldsToConvert = fields.fieldsToConvert;
     fieldsToConvert
@@ -186,7 +187,7 @@
     for (var field in fieldsToConvert) {
       // Compute the declaration of the corresponding enum constant.
       if (constantsBuffer.isNotEmpty) {
-        constantsBuffer.write(',\n$indent');
+        constantsBuffer.write(',$eol$indent');
       }
       constantsBuffer.write(field.name);
       var invocation = field.instanceCreation;
@@ -264,8 +265,8 @@
 
     // Insert the declarations of the enum constants.
     var semicolon = ';';
-    var prefix = '${utils.endOfLine}$indent';
-    var suffix = '$semicolon${utils.endOfLine}';
+    var prefix = '$eol$indent';
+    var suffix = '$semicolon$eol';
     builder.addSimpleInsertion(bodyOffset, '$prefix$constantsBuffer$suffix');
 
     // Delete any members that are no longer needed.