fix missing spaces in adjacent strings (#49159)
This commit is contained in:
parent
def2205ee4
commit
3800bb7b10
@ -1,7 +1,7 @@
|
||||
<<skip until matching line>>
|
||||
══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════
|
||||
The following assertion was thrown during layout:
|
||||
A RenderFlex overflowed by 2844 pixels on the right\.
|
||||
A RenderFlex overflowed by 2858 pixels on the right\.
|
||||
|
||||
The relevant error-causing widget was:
|
||||
Row
|
||||
|
@ -132,8 +132,7 @@ void main() {
|
||||
expect(html, contains('<div>HTML Bits</div>'));
|
||||
expect(html, contains('<div>More HTML Bits</div>'));
|
||||
expect(html, contains(' print('The actual \$name.');'));
|
||||
expect(html, contains('<div class="snippet-description">'
|
||||
'{@end-inject-html}A description of the snippet.\n\n'
|
||||
expect(html, contains('<div class="snippet-description">{@end-inject-html}A description of the snippet.\n\n'
|
||||
'On several lines.{@inject-html}</div>\n'));
|
||||
expect(html, contains('main() {'));
|
||||
});
|
||||
|
@ -544,7 +544,7 @@ String genPluralMethod(Map<String, dynamic> arbBundle, String resourceId) {
|
||||
}
|
||||
|
||||
String genSupportedLocaleProperty(Set<LocaleInfo> supportedLocales) {
|
||||
const String prefix = 'static const List<Locale> supportedLocales = <Locale>[\n Locale(''';
|
||||
const String prefix = 'static const List<Locale> supportedLocales = <Locale>[\n Locale(';
|
||||
const String suffix = '),\n ];';
|
||||
|
||||
String resultingProperty = prefix;
|
||||
|
@ -503,19 +503,20 @@ class SliverConstraints extends Constraints {
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SliverConstraints('
|
||||
'$axisDirection, '
|
||||
'$growthDirection, '
|
||||
'$userScrollDirection, '
|
||||
'scrollOffset: ${scrollOffset.toStringAsFixed(1)}, '
|
||||
'remainingPaintExtent: ${remainingPaintExtent.toStringAsFixed(1)}, ' +
|
||||
(overlap != 0.0 ? 'overlap: ${overlap.toStringAsFixed(1)}, ' : '') +
|
||||
'crossAxisExtent: ${crossAxisExtent.toStringAsFixed(1)}, '
|
||||
'crossAxisDirection: $crossAxisDirection, '
|
||||
'viewportMainAxisExtent: ${viewportMainAxisExtent.toStringAsFixed(1)}, '
|
||||
'remainingCacheExtent: ${remainingCacheExtent.toStringAsFixed(1)} '
|
||||
'cacheOrigin: ${cacheOrigin.toStringAsFixed(1)} '
|
||||
')';
|
||||
final List<String> properties = <String>[
|
||||
'$axisDirection',
|
||||
'$growthDirection',
|
||||
'$userScrollDirection',
|
||||
'scrollOffset: ${scrollOffset.toStringAsFixed(1)}',
|
||||
'remainingPaintExtent: ${remainingPaintExtent.toStringAsFixed(1)}',
|
||||
if (overlap != 0.0) 'overlap: ${overlap.toStringAsFixed(1)}',
|
||||
'crossAxisExtent: ${crossAxisExtent.toStringAsFixed(1)}',
|
||||
'crossAxisDirection: $crossAxisDirection',
|
||||
'viewportMainAxisExtent: ${viewportMainAxisExtent.toStringAsFixed(1)}',
|
||||
'remainingCacheExtent: ${remainingCacheExtent.toStringAsFixed(1)}',
|
||||
'cacheOrigin: ${cacheOrigin.toStringAsFixed(1)}',
|
||||
];
|
||||
return 'SliverConstraints(${properties.join(', ')})';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -71,12 +71,13 @@ class SliverGridGeometry {
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SliverGridGeometry('
|
||||
'scrollOffset: $scrollOffset, '
|
||||
'crossAxisOffset: $crossAxisOffset, '
|
||||
'mainAxisExtent: $mainAxisExtent, '
|
||||
'crossAxisExtent: $crossAxisExtent'
|
||||
')';
|
||||
final List<String> properties = <String>[
|
||||
'scrollOffset: $scrollOffset',
|
||||
'crossAxisOffset: $crossAxisOffset',
|
||||
'mainAxisExtent: $mainAxisExtent',
|
||||
'crossAxisExtent: $crossAxisExtent',
|
||||
];
|
||||
return 'SliverGridGeometry(${properties.join(', ')})';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -574,22 +574,23 @@ class MediaQueryData {
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return '${objectRuntimeType(this, 'MediaQueryData')}('
|
||||
'size: $size, '
|
||||
'devicePixelRatio: ${devicePixelRatio.toStringAsFixed(1)}, '
|
||||
'textScaleFactor: ${textScaleFactor.toStringAsFixed(1)}, '
|
||||
'platformBrightness: $platformBrightness, '
|
||||
'padding: $padding, '
|
||||
'viewPadding: $viewPadding, '
|
||||
'viewInsets: $viewInsets, '
|
||||
'physicalDepth: $physicalDepth, '
|
||||
'alwaysUse24HourFormat: $alwaysUse24HourFormat, '
|
||||
'accessibleNavigation: $accessibleNavigation, '
|
||||
'highContrast: $highContrast,'
|
||||
'disableAnimations: $disableAnimations, '
|
||||
'invertColors: $invertColors, '
|
||||
'boldText: $boldText'
|
||||
')';
|
||||
final List<String> properties = <String>[
|
||||
'size: $size',
|
||||
'devicePixelRatio: ${devicePixelRatio.toStringAsFixed(1)}',
|
||||
'textScaleFactor: ${textScaleFactor.toStringAsFixed(1)}',
|
||||
'platformBrightness: $platformBrightness',
|
||||
'padding: $padding',
|
||||
'viewPadding: $viewPadding',
|
||||
'viewInsets: $viewInsets',
|
||||
'physicalDepth: $physicalDepth',
|
||||
'alwaysUse24HourFormat: $alwaysUse24HourFormat',
|
||||
'accessibleNavigation: $accessibleNavigation',
|
||||
'highContrast: $highContrast',
|
||||
'disableAnimations: $disableAnimations',
|
||||
'invertColors: $invertColors',
|
||||
'boldText: $boldText',
|
||||
];
|
||||
return '${objectRuntimeType(this, 'MediaQueryData')}(${properties.join(', ')})';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1720,8 +1720,8 @@ void main() {
|
||||
expect(error, isNotNull);
|
||||
expect(error.toStringDeep(), equalsIgnoringHashCodes(
|
||||
'FlutterError\n'
|
||||
' Scaffold.bottomSheet cannot be specified while a bottom\n'
|
||||
' sheetdisplayed with showBottomSheet() is still visible.\n'
|
||||
' Scaffold.bottomSheet cannot be specified while a bottom sheet\n'
|
||||
' displayed with showBottomSheet() is still visible.\n'
|
||||
' Rebuild the Scaffold with a null bottomSheet before calling\n'
|
||||
' showBottomSheet().\n',
|
||||
));
|
||||
|
@ -92,7 +92,7 @@ void main() {
|
||||
' │ │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n'
|
||||
' │ │ 0.0, remainingPaintExtent: 600.0, crossAxisExtent: 800.0,\n'
|
||||
' │ │ crossAxisDirection: AxisDirection.right,\n'
|
||||
' │ │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 850.0\n'
|
||||
' │ │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 850.0,\n'
|
||||
' │ │ cacheOrigin: 0.0)\n'
|
||||
' │ │ geometry: SliverGeometry(scrollExtent: 400.0, paintExtent: 400.0,\n'
|
||||
' │ │ maxPaintExtent: 400.0, cacheExtent: 400.0)\n'
|
||||
@ -108,7 +108,7 @@ void main() {
|
||||
' │ │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n'
|
||||
' │ │ 0.0, remainingPaintExtent: 200.0, crossAxisExtent: 800.0,\n'
|
||||
' │ │ crossAxisDirection: AxisDirection.right,\n'
|
||||
' │ │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 450.0\n'
|
||||
' │ │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 450.0,\n'
|
||||
' │ │ cacheOrigin: 0.0)\n'
|
||||
' │ │ geometry: SliverGeometry(scrollExtent: 400.0, paintExtent: 200.0,\n'
|
||||
' │ │ maxPaintExtent: 400.0, hasVisualOverflow: true, cacheExtent:\n'
|
||||
@ -125,7 +125,7 @@ void main() {
|
||||
' │ │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n'
|
||||
' │ │ 0.0, remainingPaintExtent: 0.0, crossAxisExtent: 800.0,\n'
|
||||
' │ │ crossAxisDirection: AxisDirection.right,\n'
|
||||
' │ │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 50.0\n'
|
||||
' │ │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 50.0,\n'
|
||||
' │ │ cacheOrigin: 0.0)\n'
|
||||
' │ │ geometry: SliverGeometry(scrollExtent: 400.0, hidden,\n'
|
||||
' │ │ maxPaintExtent: 400.0, hasVisualOverflow: true, cacheExtent:\n'
|
||||
@ -142,7 +142,7 @@ void main() {
|
||||
' │ │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n'
|
||||
' │ │ 0.0, remainingPaintExtent: 0.0, crossAxisExtent: 800.0,\n'
|
||||
' │ │ crossAxisDirection: AxisDirection.right,\n'
|
||||
' │ │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 0.0\n'
|
||||
' │ │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 0.0,\n'
|
||||
' │ │ cacheOrigin: 0.0)\n'
|
||||
' │ │ geometry: SliverGeometry(scrollExtent: 400.0, hidden,\n'
|
||||
' │ │ maxPaintExtent: 400.0, hasVisualOverflow: true)\n'
|
||||
@ -158,7 +158,7 @@ void main() {
|
||||
' │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n'
|
||||
' │ 0.0, remainingPaintExtent: 0.0, crossAxisExtent: 800.0,\n'
|
||||
' │ crossAxisDirection: AxisDirection.right,\n'
|
||||
' │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 0.0\n'
|
||||
' │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 0.0,\n'
|
||||
' │ cacheOrigin: 0.0)\n'
|
||||
' │ geometry: SliverGeometry(scrollExtent: 400.0, hidden,\n'
|
||||
' │ maxPaintExtent: 400.0, hasVisualOverflow: true)\n'
|
||||
@ -956,7 +956,7 @@ void main() {
|
||||
' The "precedingScrollExtent" is NaN, expected greater than or equal to zero.\n'
|
||||
' The constraints are not normalized.\n'
|
||||
'The offending constraints were:\n'
|
||||
' SliverConstraints(AxisDirection.down, GrowthDirection.forward, ScrollDirection.idle, scrollOffset: NaN, remainingPaintExtent: NaN, overlap: NaN, crossAxisExtent: NaN, crossAxisDirection: AxisDirection.left, viewportMainAxisExtent: NaN, remainingCacheExtent: NaN cacheOrigin: NaN )',
|
||||
' SliverConstraints(AxisDirection.down, GrowthDirection.forward, ScrollDirection.idle, scrollOffset: NaN, remainingPaintExtent: NaN, overlap: NaN, crossAxisExtent: NaN, crossAxisDirection: AxisDirection.left, viewportMainAxisExtent: NaN, remainingCacheExtent: NaN, cacheOrigin: NaN)',
|
||||
);
|
||||
threw = true;
|
||||
}
|
||||
@ -992,7 +992,7 @@ void main() {
|
||||
' The "precedingScrollExtent" is negative.\n'
|
||||
' The constraints are not normalized.\n'
|
||||
'The offending constraints were:\n'
|
||||
' SliverConstraints(AxisDirection.down, GrowthDirection.forward, ScrollDirection.idle, scrollOffset: -1.0, remainingPaintExtent: -1.0, crossAxisExtent: 0.0, crossAxisDirection: AxisDirection.left, viewportMainAxisExtent: 0.0, remainingCacheExtent: -1.0 cacheOrigin: 1.0 )',
|
||||
' SliverConstraints(AxisDirection.down, GrowthDirection.forward, ScrollDirection.idle, scrollOffset: -1.0, remainingPaintExtent: -1.0, crossAxisExtent: 0.0, crossAxisDirection: AxisDirection.left, viewportMainAxisExtent: 0.0, remainingCacheExtent: -1.0, cacheOrigin: 1.0)',
|
||||
);
|
||||
threw = true;
|
||||
}
|
||||
|
@ -299,7 +299,7 @@ void main() {
|
||||
' │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n'
|
||||
' │ 0.0, remainingPaintExtent: 600.0, crossAxisExtent: 800.0,\n'
|
||||
' │ crossAxisDirection: AxisDirection.right,\n'
|
||||
' │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 850.0\n'
|
||||
' │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 850.0,\n'
|
||||
' │ cacheOrigin: 0.0)\n'
|
||||
' │ geometry: SliverGeometry(scrollExtent: 40000.0, paintExtent:\n'
|
||||
' │ 600.0, maxPaintExtent: 40000.0, hasVisualOverflow: true,\n'
|
||||
@ -446,7 +446,7 @@ void main() {
|
||||
' │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n'
|
||||
' │ 2000.0, remainingPaintExtent: 600.0, crossAxisExtent: 800.0,\n'
|
||||
' │ crossAxisDirection: AxisDirection.right,\n'
|
||||
' │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 1100.0\n'
|
||||
' │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 1100.0,\n'
|
||||
' │ cacheOrigin: -250.0)\n'
|
||||
' │ geometry: SliverGeometry(scrollExtent: 40000.0, paintExtent:\n'
|
||||
' │ 600.0, maxPaintExtent: 40000.0, hasVisualOverflow: true,\n'
|
||||
|
@ -335,7 +335,7 @@ void main() {
|
||||
' │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n'
|
||||
' │ 0.0, remainingPaintExtent: 600.0, crossAxisExtent: 800.0,\n'
|
||||
' │ crossAxisDirection: AxisDirection.right,\n'
|
||||
' │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 850.0\n'
|
||||
' │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 850.0,\n'
|
||||
' │ cacheOrigin: 0.0)\n'
|
||||
' │ geometry: SliverGeometry(scrollExtent: 300.0, paintExtent: 300.0,\n'
|
||||
' │ maxPaintExtent: 300.0, cacheExtent: 300.0)\n'
|
||||
|
@ -72,7 +72,7 @@ void main() {
|
||||
' │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n'
|
||||
' │ 0.0, remainingPaintExtent: 600.0, crossAxisExtent: 800.0,\n'
|
||||
' │ crossAxisDirection: AxisDirection.right,\n'
|
||||
' │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 850.0\n'
|
||||
' │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 850.0,\n'
|
||||
' │ cacheOrigin: 0.0)\n'
|
||||
' │ geometry: SliverGeometry(scrollExtent: 12000.0, paintExtent:\n'
|
||||
' │ 600.0, maxPaintExtent: 12000.0, hasVisualOverflow: true,\n'
|
||||
@ -85,7 +85,7 @@ void main() {
|
||||
' │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n'
|
||||
' │ 0.0, remainingPaintExtent: 600.0, crossAxisExtent: 800.0,\n'
|
||||
' │ crossAxisDirection: AxisDirection.right,\n'
|
||||
' │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 850.0\n'
|
||||
' │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 850.0,\n'
|
||||
' │ cacheOrigin: 0.0)\n'
|
||||
' │ geometry: SliverGeometry(scrollExtent: 12000.0, paintExtent:\n'
|
||||
' │ 600.0, maxPaintExtent: 12000.0, hasVisualOverflow: true,\n'
|
||||
|
@ -90,7 +90,7 @@ void main() {
|
||||
' │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n'
|
||||
' │ 0.0, remainingPaintExtent: 600.0, crossAxisExtent: 800.0,\n'
|
||||
' │ crossAxisDirection: AxisDirection.right,\n'
|
||||
' │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 850.0\n'
|
||||
' │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 850.0,\n'
|
||||
' │ cacheOrigin: 0.0)\n'
|
||||
' │ geometry: SliverGeometry(scrollExtent: 200.0, paintExtent: 200.0,\n'
|
||||
' │ maxPaintExtent: 200.0, hasVisualOverflow: true, cacheExtent:\n'
|
||||
|
@ -772,8 +772,7 @@ void main() {
|
||||
// Each word takes up more than a half of a line. Together they
|
||||
// wrap onto two lines, but leave a lot of extra space.
|
||||
child: Text(
|
||||
'twowordsthateachtakeupmorethanhalfof alineoftextsothattheywr'
|
||||
'apwithlotsofextraspace',
|
||||
'twowordsthateachtakeupmorethanhalfof alineoftextsothattheywrapwithlotsofextraspace',
|
||||
textDirection: TextDirection.ltr,
|
||||
textWidthBasis: textWidthBasis,
|
||||
),
|
||||
|
@ -195,16 +195,17 @@ class TestAsyncUtils {
|
||||
final _StackEntry originalGuarder = _findResponsibleMethod(scope.creationStack, 'guard', information);
|
||||
final _StackEntry collidingGuarder = _findResponsibleMethod(StackTrace.current, 'guardSync', information);
|
||||
if (originalGuarder != null && collidingGuarder != null) {
|
||||
final String originalKind = originalGuarder.className == null ? 'function' : 'method';
|
||||
String originalName;
|
||||
if (originalGuarder.className == null) {
|
||||
originalName = '(${originalGuarder.methodName}) ';
|
||||
originalName = '$originalKind (${originalGuarder.methodName})';
|
||||
information.add(ErrorDescription(
|
||||
'The guarded "${originalGuarder.methodName}" function '
|
||||
'was called from ${originalGuarder.callerFile} '
|
||||
'on line ${originalGuarder.callerLine}.'
|
||||
));
|
||||
} else {
|
||||
originalName = '(${originalGuarder.className}.${originalGuarder.methodName}) ';
|
||||
originalName = '$originalKind (${originalGuarder.className}.${originalGuarder.methodName})';
|
||||
information.add(ErrorDescription(
|
||||
'The guarded method "${originalGuarder.methodName}" '
|
||||
'from class ${originalGuarder.className} '
|
||||
@ -215,25 +216,26 @@ class TestAsyncUtils {
|
||||
final String again = (originalGuarder.callerFile == collidingGuarder.callerFile) &&
|
||||
(originalGuarder.callerLine == collidingGuarder.callerLine) ?
|
||||
'again ' : '';
|
||||
final String collidingKind = collidingGuarder.className == null ? 'function' : 'method';
|
||||
String collidingName;
|
||||
if ((originalGuarder.className == collidingGuarder.className) &&
|
||||
(originalGuarder.methodName == collidingGuarder.methodName)) {
|
||||
originalName = '';
|
||||
collidingName = '';
|
||||
originalName = originalKind;
|
||||
collidingName = collidingKind;
|
||||
information.add(ErrorDescription(
|
||||
'Then, it '
|
||||
'was called ${again}from ${collidingGuarder.callerFile} '
|
||||
'on line ${collidingGuarder.callerLine}.'
|
||||
));
|
||||
} else if (collidingGuarder.className == null) {
|
||||
collidingName = '(${collidingGuarder.methodName}) ';
|
||||
collidingName = '$collidingKind (${collidingGuarder.methodName})';
|
||||
information.add(ErrorDescription(
|
||||
'Then, the "${collidingGuarder.methodName}" function '
|
||||
'was called ${again}from ${collidingGuarder.callerFile} '
|
||||
'on line ${collidingGuarder.callerLine}.'
|
||||
));
|
||||
} else {
|
||||
collidingName = '(${collidingGuarder.className}.${collidingGuarder.methodName}) ';
|
||||
collidingName = '$collidingKind (${collidingGuarder.className}.${collidingGuarder.methodName})';
|
||||
information.add(ErrorDescription(
|
||||
'Then, the "${collidingGuarder.methodName}" method '
|
||||
'${originalGuarder.className == collidingGuarder.className ? "(also from class ${collidingGuarder.className})"
|
||||
@ -243,9 +245,9 @@ class TestAsyncUtils {
|
||||
));
|
||||
}
|
||||
information.add(ErrorDescription(
|
||||
'The first ${originalGuarder.className == null ? "function" : "method"} $originalName'
|
||||
'The first $originalName '
|
||||
'had not yet finished executing at the time that '
|
||||
'the second ${collidingGuarder.className == null ? "function" : "method"} $collidingName'
|
||||
'the second $collidingName '
|
||||
'was called. Since both are guarded, and the second was not a nested call inside the first, the '
|
||||
'first must complete its execution before the second can be called. Typically, this is achieved by '
|
||||
'putting an "await" statement in front of the call to the first.'
|
||||
@ -259,9 +261,7 @@ class TestAsyncUtils {
|
||||
));
|
||||
}
|
||||
information.add(DiagnosticsStackTrace(
|
||||
'\nWhen the first ${originalGuarder.className == null ? "function" : "method"} '
|
||||
'$originalName'
|
||||
'was called, this was the stack',
|
||||
'\nWhen the first $originalName was called, this was the stack',
|
||||
scope.creationStack,
|
||||
));
|
||||
}
|
||||
|
@ -642,7 +642,7 @@ ${globals.terminal.bolden('Consuming the Module')}
|
||||
''');
|
||||
}
|
||||
|
||||
globals.printStatus('To learn more, visit https://flutter.dev/go/build-aar''');
|
||||
globals.printStatus('To learn more, visit https://flutter.dev/go/build-aar');
|
||||
}
|
||||
|
||||
String _hex(List<int> bytes) {
|
||||
|
@ -236,8 +236,7 @@ final GradleHandledError licenseNotAcceptedHandler = GradleHandledError(
|
||||
bool shouldBuildPluginAsAar,
|
||||
}) async {
|
||||
const String licenseNotAcceptedMatcher =
|
||||
r'You have not accepted the license agreements of the following SDK components:'
|
||||
r'\s*\[(.+)\]';
|
||||
r'You have not accepted the license agreements of the following SDK components:\s*\[(.+)\]';
|
||||
|
||||
final RegExp licenseFailure = RegExp(licenseNotAcceptedMatcher, multiLine: true);
|
||||
assert(licenseFailure != null);
|
||||
|
@ -857,8 +857,10 @@ String _validateProjectDir(String dirPath, { String flutterRoot, bool overwrite
|
||||
// If the destination directory is actually a file, then we refuse to
|
||||
// overwrite, on the theory that the user probably didn't expect it to exist.
|
||||
if (globals.fs.isFileSync(dirPath)) {
|
||||
return "Invalid project name: '$dirPath' - refers to an existing file."
|
||||
'${overwrite ? ' Refusing to overwrite a file with a directory.' : ''}';
|
||||
final String message = "Invalid project name: '$dirPath' - refers to an existing file.";
|
||||
return overwrite
|
||||
? '$message Refusing to overwrite a file with a directory.'
|
||||
: message;
|
||||
}
|
||||
|
||||
if (overwrite) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user