fix missing spaces in adjacent strings (#49159)

This commit is contained in:
Alexandre Ardhuin 2020-01-22 01:43:03 +01:00 committed by Flutter GitHub Bot
parent def2205ee4
commit 3800bb7b10
55 changed files with 141 additions and 139 deletions

View File

@ -1,7 +1,7 @@
<<skip until matching line>> <<skip until matching line>>
══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════ ══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════
The following assertion was thrown during layout: 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: The relevant error-causing widget was:
Row Row

View File

@ -132,8 +132,7 @@ void main() {
expect(html, contains('<div>HTML Bits</div>')); expect(html, contains('<div>HTML Bits</div>'));
expect(html, contains('<div>More HTML Bits</div>')); expect(html, contains('<div>More HTML Bits</div>'));
expect(html, contains(' print(&#39;The actual \$name.&#39;);')); expect(html, contains(' print(&#39;The actual \$name.&#39;);'));
expect(html, contains('<div class="snippet-description">' expect(html, contains('<div class="snippet-description">{@end-inject-html}A description of the snippet.\n\n'
'{@end-inject-html}A description of the snippet.\n\n'
'On several lines.{@inject-html}</div>\n')); 'On several lines.{@inject-html}</div>\n'));
expect(html, contains('main() {')); expect(html, contains('main() {'));
}); });

View File

@ -544,7 +544,7 @@ String genPluralMethod(Map<String, dynamic> arbBundle, String resourceId) {
} }
String genSupportedLocaleProperty(Set<LocaleInfo> supportedLocales) { 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 ];'; const String suffix = '),\n ];';
String resultingProperty = prefix; String resultingProperty = prefix;

View File

@ -503,19 +503,20 @@ class SliverConstraints extends Constraints {
@override @override
String toString() { String toString() {
return 'SliverConstraints(' final List<String> properties = <String>[
'$axisDirection, ' '$axisDirection',
'$growthDirection, ' '$growthDirection',
'$userScrollDirection, ' '$userScrollDirection',
'scrollOffset: ${scrollOffset.toStringAsFixed(1)}, ' 'scrollOffset: ${scrollOffset.toStringAsFixed(1)}',
'remainingPaintExtent: ${remainingPaintExtent.toStringAsFixed(1)}, ' + 'remainingPaintExtent: ${remainingPaintExtent.toStringAsFixed(1)}',
(overlap != 0.0 ? 'overlap: ${overlap.toStringAsFixed(1)}, ' : '') + if (overlap != 0.0) 'overlap: ${overlap.toStringAsFixed(1)}',
'crossAxisExtent: ${crossAxisExtent.toStringAsFixed(1)}, ' 'crossAxisExtent: ${crossAxisExtent.toStringAsFixed(1)}',
'crossAxisDirection: $crossAxisDirection, ' 'crossAxisDirection: $crossAxisDirection',
'viewportMainAxisExtent: ${viewportMainAxisExtent.toStringAsFixed(1)}, ' 'viewportMainAxisExtent: ${viewportMainAxisExtent.toStringAsFixed(1)}',
'remainingCacheExtent: ${remainingCacheExtent.toStringAsFixed(1)} ' 'remainingCacheExtent: ${remainingCacheExtent.toStringAsFixed(1)}',
'cacheOrigin: ${cacheOrigin.toStringAsFixed(1)} ' 'cacheOrigin: ${cacheOrigin.toStringAsFixed(1)}',
')'; ];
return 'SliverConstraints(${properties.join(', ')})';
} }
} }

View File

@ -71,12 +71,13 @@ class SliverGridGeometry {
@override @override
String toString() { String toString() {
return 'SliverGridGeometry(' final List<String> properties = <String>[
'scrollOffset: $scrollOffset, ' 'scrollOffset: $scrollOffset',
'crossAxisOffset: $crossAxisOffset, ' 'crossAxisOffset: $crossAxisOffset',
'mainAxisExtent: $mainAxisExtent, ' 'mainAxisExtent: $mainAxisExtent',
'crossAxisExtent: $crossAxisExtent' 'crossAxisExtent: $crossAxisExtent',
')'; ];
return 'SliverGridGeometry(${properties.join(', ')})';
} }
} }

View File

@ -574,22 +574,23 @@ class MediaQueryData {
@override @override
String toString() { String toString() {
return '${objectRuntimeType(this, 'MediaQueryData')}(' final List<String> properties = <String>[
'size: $size, ' 'size: $size',
'devicePixelRatio: ${devicePixelRatio.toStringAsFixed(1)}, ' 'devicePixelRatio: ${devicePixelRatio.toStringAsFixed(1)}',
'textScaleFactor: ${textScaleFactor.toStringAsFixed(1)}, ' 'textScaleFactor: ${textScaleFactor.toStringAsFixed(1)}',
'platformBrightness: $platformBrightness, ' 'platformBrightness: $platformBrightness',
'padding: $padding, ' 'padding: $padding',
'viewPadding: $viewPadding, ' 'viewPadding: $viewPadding',
'viewInsets: $viewInsets, ' 'viewInsets: $viewInsets',
'physicalDepth: $physicalDepth, ' 'physicalDepth: $physicalDepth',
'alwaysUse24HourFormat: $alwaysUse24HourFormat, ' 'alwaysUse24HourFormat: $alwaysUse24HourFormat',
'accessibleNavigation: $accessibleNavigation, ' 'accessibleNavigation: $accessibleNavigation',
'highContrast: $highContrast,' 'highContrast: $highContrast',
'disableAnimations: $disableAnimations, ' 'disableAnimations: $disableAnimations',
'invertColors: $invertColors, ' 'invertColors: $invertColors',
'boldText: $boldText' 'boldText: $boldText',
')'; ];
return '${objectRuntimeType(this, 'MediaQueryData')}(${properties.join(', ')})';
} }
} }

View File

@ -1720,8 +1720,8 @@ void main() {
expect(error, isNotNull); expect(error, isNotNull);
expect(error.toStringDeep(), equalsIgnoringHashCodes( expect(error.toStringDeep(), equalsIgnoringHashCodes(
'FlutterError\n' 'FlutterError\n'
' Scaffold.bottomSheet cannot be specified while a bottom\n' ' Scaffold.bottomSheet cannot be specified while a bottom sheet\n'
' sheetdisplayed with showBottomSheet() is still visible.\n' ' displayed with showBottomSheet() is still visible.\n'
' Rebuild the Scaffold with a null bottomSheet before calling\n' ' Rebuild the Scaffold with a null bottomSheet before calling\n'
' showBottomSheet().\n', ' showBottomSheet().\n',
)); ));

View File

@ -92,7 +92,7 @@ void main() {
' │ │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n' ' │ │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n'
' │ │ 0.0, remainingPaintExtent: 600.0, crossAxisExtent: 800.0,\n' ' │ │ 0.0, remainingPaintExtent: 600.0, crossAxisExtent: 800.0,\n'
' │ │ crossAxisDirection: AxisDirection.right,\n' ' │ │ crossAxisDirection: AxisDirection.right,\n'
' │ │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 850.0\n' ' │ │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 850.0,\n'
' │ │ cacheOrigin: 0.0)\n' ' │ │ cacheOrigin: 0.0)\n'
' │ │ geometry: SliverGeometry(scrollExtent: 400.0, paintExtent: 400.0,\n' ' │ │ geometry: SliverGeometry(scrollExtent: 400.0, paintExtent: 400.0,\n'
' │ │ maxPaintExtent: 400.0, cacheExtent: 400.0)\n' ' │ │ maxPaintExtent: 400.0, cacheExtent: 400.0)\n'
@ -108,7 +108,7 @@ void main() {
' │ │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n' ' │ │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n'
' │ │ 0.0, remainingPaintExtent: 200.0, crossAxisExtent: 800.0,\n' ' │ │ 0.0, remainingPaintExtent: 200.0, crossAxisExtent: 800.0,\n'
' │ │ crossAxisDirection: AxisDirection.right,\n' ' │ │ crossAxisDirection: AxisDirection.right,\n'
' │ │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 450.0\n' ' │ │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 450.0,\n'
' │ │ cacheOrigin: 0.0)\n' ' │ │ cacheOrigin: 0.0)\n'
' │ │ geometry: SliverGeometry(scrollExtent: 400.0, paintExtent: 200.0,\n' ' │ │ geometry: SliverGeometry(scrollExtent: 400.0, paintExtent: 200.0,\n'
' │ │ maxPaintExtent: 400.0, hasVisualOverflow: true, cacheExtent:\n' ' │ │ maxPaintExtent: 400.0, hasVisualOverflow: true, cacheExtent:\n'
@ -125,7 +125,7 @@ void main() {
' │ │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n' ' │ │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n'
' │ │ 0.0, remainingPaintExtent: 0.0, crossAxisExtent: 800.0,\n' ' │ │ 0.0, remainingPaintExtent: 0.0, crossAxisExtent: 800.0,\n'
' │ │ crossAxisDirection: AxisDirection.right,\n' ' │ │ crossAxisDirection: AxisDirection.right,\n'
' │ │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 50.0\n' ' │ │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 50.0,\n'
' │ │ cacheOrigin: 0.0)\n' ' │ │ cacheOrigin: 0.0)\n'
' │ │ geometry: SliverGeometry(scrollExtent: 400.0, hidden,\n' ' │ │ geometry: SliverGeometry(scrollExtent: 400.0, hidden,\n'
' │ │ maxPaintExtent: 400.0, hasVisualOverflow: true, cacheExtent:\n' ' │ │ maxPaintExtent: 400.0, hasVisualOverflow: true, cacheExtent:\n'
@ -142,7 +142,7 @@ void main() {
' │ │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n' ' │ │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n'
' │ │ 0.0, remainingPaintExtent: 0.0, crossAxisExtent: 800.0,\n' ' │ │ 0.0, remainingPaintExtent: 0.0, crossAxisExtent: 800.0,\n'
' │ │ crossAxisDirection: AxisDirection.right,\n' ' │ │ crossAxisDirection: AxisDirection.right,\n'
' │ │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 0.0\n' ' │ │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 0.0,\n'
' │ │ cacheOrigin: 0.0)\n' ' │ │ cacheOrigin: 0.0)\n'
' │ │ geometry: SliverGeometry(scrollExtent: 400.0, hidden,\n' ' │ │ geometry: SliverGeometry(scrollExtent: 400.0, hidden,\n'
' │ │ maxPaintExtent: 400.0, hasVisualOverflow: true)\n' ' │ │ maxPaintExtent: 400.0, hasVisualOverflow: true)\n'
@ -158,7 +158,7 @@ void main() {
' │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n' ' │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n'
' │ 0.0, remainingPaintExtent: 0.0, crossAxisExtent: 800.0,\n' ' │ 0.0, remainingPaintExtent: 0.0, crossAxisExtent: 800.0,\n'
' │ crossAxisDirection: AxisDirection.right,\n' ' │ crossAxisDirection: AxisDirection.right,\n'
' │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 0.0\n' ' │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 0.0,\n'
' │ cacheOrigin: 0.0)\n' ' │ cacheOrigin: 0.0)\n'
' │ geometry: SliverGeometry(scrollExtent: 400.0, hidden,\n' ' │ geometry: SliverGeometry(scrollExtent: 400.0, hidden,\n'
' │ maxPaintExtent: 400.0, hasVisualOverflow: true)\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 "precedingScrollExtent" is NaN, expected greater than or equal to zero.\n'
' The constraints are not normalized.\n' ' The constraints are not normalized.\n'
'The offending constraints were:\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; threw = true;
} }
@ -992,7 +992,7 @@ void main() {
' The "precedingScrollExtent" is negative.\n' ' The "precedingScrollExtent" is negative.\n'
' The constraints are not normalized.\n' ' The constraints are not normalized.\n'
'The offending constraints were:\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; threw = true;
} }

View File

@ -299,7 +299,7 @@ void main() {
' │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n' ' │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n'
' │ 0.0, remainingPaintExtent: 600.0, crossAxisExtent: 800.0,\n' ' │ 0.0, remainingPaintExtent: 600.0, crossAxisExtent: 800.0,\n'
' │ crossAxisDirection: AxisDirection.right,\n' ' │ crossAxisDirection: AxisDirection.right,\n'
' │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 850.0\n' ' │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 850.0,\n'
' │ cacheOrigin: 0.0)\n' ' │ cacheOrigin: 0.0)\n'
' │ geometry: SliverGeometry(scrollExtent: 40000.0, paintExtent:\n' ' │ geometry: SliverGeometry(scrollExtent: 40000.0, paintExtent:\n'
' │ 600.0, maxPaintExtent: 40000.0, hasVisualOverflow: true,\n' ' │ 600.0, maxPaintExtent: 40000.0, hasVisualOverflow: true,\n'
@ -446,7 +446,7 @@ void main() {
' │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n' ' │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n'
' │ 2000.0, remainingPaintExtent: 600.0, crossAxisExtent: 800.0,\n' ' │ 2000.0, remainingPaintExtent: 600.0, crossAxisExtent: 800.0,\n'
' │ crossAxisDirection: AxisDirection.right,\n' ' │ crossAxisDirection: AxisDirection.right,\n'
' │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 1100.0\n' ' │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 1100.0,\n'
' │ cacheOrigin: -250.0)\n' ' │ cacheOrigin: -250.0)\n'
' │ geometry: SliverGeometry(scrollExtent: 40000.0, paintExtent:\n' ' │ geometry: SliverGeometry(scrollExtent: 40000.0, paintExtent:\n'
' │ 600.0, maxPaintExtent: 40000.0, hasVisualOverflow: true,\n' ' │ 600.0, maxPaintExtent: 40000.0, hasVisualOverflow: true,\n'

View File

@ -335,7 +335,7 @@ void main() {
' │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n' ' │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n'
' │ 0.0, remainingPaintExtent: 600.0, crossAxisExtent: 800.0,\n' ' │ 0.0, remainingPaintExtent: 600.0, crossAxisExtent: 800.0,\n'
' │ crossAxisDirection: AxisDirection.right,\n' ' │ crossAxisDirection: AxisDirection.right,\n'
' │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 850.0\n' ' │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 850.0,\n'
' │ cacheOrigin: 0.0)\n' ' │ cacheOrigin: 0.0)\n'
' │ geometry: SliverGeometry(scrollExtent: 300.0, paintExtent: 300.0,\n' ' │ geometry: SliverGeometry(scrollExtent: 300.0, paintExtent: 300.0,\n'
' │ maxPaintExtent: 300.0, cacheExtent: 300.0)\n' ' │ maxPaintExtent: 300.0, cacheExtent: 300.0)\n'

View File

@ -72,7 +72,7 @@ void main() {
' │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n' ' │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n'
' │ 0.0, remainingPaintExtent: 600.0, crossAxisExtent: 800.0,\n' ' │ 0.0, remainingPaintExtent: 600.0, crossAxisExtent: 800.0,\n'
' │ crossAxisDirection: AxisDirection.right,\n' ' │ crossAxisDirection: AxisDirection.right,\n'
' │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 850.0\n' ' │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 850.0,\n'
' │ cacheOrigin: 0.0)\n' ' │ cacheOrigin: 0.0)\n'
' │ geometry: SliverGeometry(scrollExtent: 12000.0, paintExtent:\n' ' │ geometry: SliverGeometry(scrollExtent: 12000.0, paintExtent:\n'
' │ 600.0, maxPaintExtent: 12000.0, hasVisualOverflow: true,\n' ' │ 600.0, maxPaintExtent: 12000.0, hasVisualOverflow: true,\n'
@ -85,7 +85,7 @@ void main() {
' │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n' ' │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n'
' │ 0.0, remainingPaintExtent: 600.0, crossAxisExtent: 800.0,\n' ' │ 0.0, remainingPaintExtent: 600.0, crossAxisExtent: 800.0,\n'
' │ crossAxisDirection: AxisDirection.right,\n' ' │ crossAxisDirection: AxisDirection.right,\n'
' │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 850.0\n' ' │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 850.0,\n'
' │ cacheOrigin: 0.0)\n' ' │ cacheOrigin: 0.0)\n'
' │ geometry: SliverGeometry(scrollExtent: 12000.0, paintExtent:\n' ' │ geometry: SliverGeometry(scrollExtent: 12000.0, paintExtent:\n'
' │ 600.0, maxPaintExtent: 12000.0, hasVisualOverflow: true,\n' ' │ 600.0, maxPaintExtent: 12000.0, hasVisualOverflow: true,\n'

View File

@ -90,7 +90,7 @@ void main() {
' │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n' ' │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n'
' │ 0.0, remainingPaintExtent: 600.0, crossAxisExtent: 800.0,\n' ' │ 0.0, remainingPaintExtent: 600.0, crossAxisExtent: 800.0,\n'
' │ crossAxisDirection: AxisDirection.right,\n' ' │ crossAxisDirection: AxisDirection.right,\n'
' │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 850.0\n' ' │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 850.0,\n'
' │ cacheOrigin: 0.0)\n' ' │ cacheOrigin: 0.0)\n'
' │ geometry: SliverGeometry(scrollExtent: 200.0, paintExtent: 200.0,\n' ' │ geometry: SliverGeometry(scrollExtent: 200.0, paintExtent: 200.0,\n'
' │ maxPaintExtent: 200.0, hasVisualOverflow: true, cacheExtent:\n' ' │ maxPaintExtent: 200.0, hasVisualOverflow: true, cacheExtent:\n'

View File

@ -772,8 +772,7 @@ void main() {
// Each word takes up more than a half of a line. Together they // Each word takes up more than a half of a line. Together they
// wrap onto two lines, but leave a lot of extra space. // wrap onto two lines, but leave a lot of extra space.
child: Text( child: Text(
'twowordsthateachtakeupmorethanhalfof alineoftextsothattheywr' 'twowordsthateachtakeupmorethanhalfof alineoftextsothattheywrapwithlotsofextraspace',
'apwithlotsofextraspace',
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
textWidthBasis: textWidthBasis, textWidthBasis: textWidthBasis,
), ),

View File

@ -195,16 +195,17 @@ class TestAsyncUtils {
final _StackEntry originalGuarder = _findResponsibleMethod(scope.creationStack, 'guard', information); final _StackEntry originalGuarder = _findResponsibleMethod(scope.creationStack, 'guard', information);
final _StackEntry collidingGuarder = _findResponsibleMethod(StackTrace.current, 'guardSync', information); final _StackEntry collidingGuarder = _findResponsibleMethod(StackTrace.current, 'guardSync', information);
if (originalGuarder != null && collidingGuarder != null) { if (originalGuarder != null && collidingGuarder != null) {
final String originalKind = originalGuarder.className == null ? 'function' : 'method';
String originalName; String originalName;
if (originalGuarder.className == null) { if (originalGuarder.className == null) {
originalName = '(${originalGuarder.methodName}) '; originalName = '$originalKind (${originalGuarder.methodName})';
information.add(ErrorDescription( information.add(ErrorDescription(
'The guarded "${originalGuarder.methodName}" function ' 'The guarded "${originalGuarder.methodName}" function '
'was called from ${originalGuarder.callerFile} ' 'was called from ${originalGuarder.callerFile} '
'on line ${originalGuarder.callerLine}.' 'on line ${originalGuarder.callerLine}.'
)); ));
} else { } else {
originalName = '(${originalGuarder.className}.${originalGuarder.methodName}) '; originalName = '$originalKind (${originalGuarder.className}.${originalGuarder.methodName})';
information.add(ErrorDescription( information.add(ErrorDescription(
'The guarded method "${originalGuarder.methodName}" ' 'The guarded method "${originalGuarder.methodName}" '
'from class ${originalGuarder.className} ' 'from class ${originalGuarder.className} '
@ -215,25 +216,26 @@ class TestAsyncUtils {
final String again = (originalGuarder.callerFile == collidingGuarder.callerFile) && final String again = (originalGuarder.callerFile == collidingGuarder.callerFile) &&
(originalGuarder.callerLine == collidingGuarder.callerLine) ? (originalGuarder.callerLine == collidingGuarder.callerLine) ?
'again ' : ''; 'again ' : '';
final String collidingKind = collidingGuarder.className == null ? 'function' : 'method';
String collidingName; String collidingName;
if ((originalGuarder.className == collidingGuarder.className) && if ((originalGuarder.className == collidingGuarder.className) &&
(originalGuarder.methodName == collidingGuarder.methodName)) { (originalGuarder.methodName == collidingGuarder.methodName)) {
originalName = ''; originalName = originalKind;
collidingName = ''; collidingName = collidingKind;
information.add(ErrorDescription( information.add(ErrorDescription(
'Then, it ' 'Then, it '
'was called ${again}from ${collidingGuarder.callerFile} ' 'was called ${again}from ${collidingGuarder.callerFile} '
'on line ${collidingGuarder.callerLine}.' 'on line ${collidingGuarder.callerLine}.'
)); ));
} else if (collidingGuarder.className == null) { } else if (collidingGuarder.className == null) {
collidingName = '(${collidingGuarder.methodName}) '; collidingName = '$collidingKind (${collidingGuarder.methodName})';
information.add(ErrorDescription( information.add(ErrorDescription(
'Then, the "${collidingGuarder.methodName}" function ' 'Then, the "${collidingGuarder.methodName}" function '
'was called ${again}from ${collidingGuarder.callerFile} ' 'was called ${again}from ${collidingGuarder.callerFile} '
'on line ${collidingGuarder.callerLine}.' 'on line ${collidingGuarder.callerLine}.'
)); ));
} else { } else {
collidingName = '(${collidingGuarder.className}.${collidingGuarder.methodName}) '; collidingName = '$collidingKind (${collidingGuarder.className}.${collidingGuarder.methodName})';
information.add(ErrorDescription( information.add(ErrorDescription(
'Then, the "${collidingGuarder.methodName}" method ' 'Then, the "${collidingGuarder.methodName}" method '
'${originalGuarder.className == collidingGuarder.className ? "(also from class ${collidingGuarder.className})" '${originalGuarder.className == collidingGuarder.className ? "(also from class ${collidingGuarder.className})"
@ -243,9 +245,9 @@ class TestAsyncUtils {
)); ));
} }
information.add(ErrorDescription( information.add(ErrorDescription(
'The first ${originalGuarder.className == null ? "function" : "method"} $originalName' 'The first $originalName '
'had not yet finished executing at the time that ' '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 ' '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 ' '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.' 'putting an "await" statement in front of the call to the first.'
@ -259,9 +261,7 @@ class TestAsyncUtils {
)); ));
} }
information.add(DiagnosticsStackTrace( information.add(DiagnosticsStackTrace(
'\nWhen the first ${originalGuarder.className == null ? "function" : "method"} ' '\nWhen the first $originalName was called, this was the stack',
'$originalName'
'was called, this was the stack',
scope.creationStack, scope.creationStack,
)); ));
} }

View File

@ -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) { String _hex(List<int> bytes) {

View File

@ -236,8 +236,7 @@ final GradleHandledError licenseNotAcceptedHandler = GradleHandledError(
bool shouldBuildPluginAsAar, bool shouldBuildPluginAsAar,
}) async { }) async {
const String licenseNotAcceptedMatcher = const String licenseNotAcceptedMatcher =
r'You have not accepted the license agreements of the following SDK components:' r'You have not accepted the license agreements of the following SDK components:\s*\[(.+)\]';
r'\s*\[(.+)\]';
final RegExp licenseFailure = RegExp(licenseNotAcceptedMatcher, multiLine: true); final RegExp licenseFailure = RegExp(licenseNotAcceptedMatcher, multiLine: true);
assert(licenseFailure != null); assert(licenseFailure != null);

View File

@ -857,8 +857,10 @@ String _validateProjectDir(String dirPath, { String flutterRoot, bool overwrite
// If the destination directory is actually a file, then we refuse to // 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. // overwrite, on the theory that the user probably didn't expect it to exist.
if (globals.fs.isFileSync(dirPath)) { if (globals.fs.isFileSync(dirPath)) {
return "Invalid project name: '$dirPath' - refers to an existing file." final String message = "Invalid project name: '$dirPath' - refers to an existing file.";
'${overwrite ? ' Refusing to overwrite a file with a directory.' : ''}'; return overwrite
? '$message Refusing to overwrite a file with a directory.'
: message;
} }
if (overwrite) { if (overwrite) {