From 162d914d457ac359feb0ffe44fe93dd5bacd7e98 Mon Sep 17 00:00:00 2001 From: creativecreatorormaybenot Date: Thu, 26 Aug 2021 19:56:02 +0000 Subject: [PATCH] Fix typos and formatting in framework.dart (#88926) --- .../flutter/lib/src/widgets/framework.dart | 32 +++++++++---------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/packages/flutter/lib/src/widgets/framework.dart b/packages/flutter/lib/src/widgets/framework.dart index 56522108227..23832ab4a93 100644 --- a/packages/flutter/lib/src/widgets/framework.dart +++ b/packages/flutter/lib/src/widgets/framework.dart @@ -1097,7 +1097,7 @@ abstract class State with Diagnosticable { ErrorHint( 'Instead of performing asynchronous work inside a call to setState(), first ' 'execute the work (without updating the widget state), and then synchronously ' - 'update the state inside a call to setState().', + 'update the state inside a call to setState().', ), ]); } @@ -1781,8 +1781,8 @@ abstract class MultiChildRenderObjectWidget extends RenderObjectWidget { // TODO(a14n): remove this check to have a lot more const widget if (children[index] == null) { throw FlutterError( - "$runtimeType's children must not contain any null values, " - 'but a null value was found at index $index', + "$runtimeType's children must not contain any null values, " + 'but a null value was found at index $index', ); } } @@ -2738,20 +2738,20 @@ class BuildOwner { error = FlutterError.fromParts([ ErrorSummary('Multiple widgets used the same GlobalKey.'), ErrorDescription( - 'The key $key was used by multiple widgets. The parents of those widgets were:\n' - '- ${older.toString()}\n' - '- ${newer.toString()}\n' - 'A GlobalKey can only be specified on one widget at a time in the widget tree.', + 'The key $key was used by multiple widgets. The parents of those widgets were:\n' + '- ${older.toString()}\n' + '- ${newer.toString()}\n' + 'A GlobalKey can only be specified on one widget at a time in the widget tree.', ), ]); } else { error = FlutterError.fromParts([ ErrorSummary('Multiple widgets used the same GlobalKey.'), ErrorDescription( - 'The key $key was used by multiple widgets. The parents of those widgets were ' - 'different widgets that both had the following description:\n' - ' ${parent.toString()}\n' - 'A GlobalKey can only be specified on one widget at a time in the widget tree.', + 'The key $key was used by multiple widgets. The parents of those widgets were ' + 'different widgets that both had the following description:\n' + ' ${parent.toString()}\n' + 'A GlobalKey can only be specified on one widget at a time in the widget tree.', ), ]); } @@ -3949,7 +3949,7 @@ abstract class Element extends DiagnosticableTree implements BuildContext { 'this render object has not yet been through layout, which typically ' 'means that the size getter was called too early in the pipeline ' '(e.g., during the build phase) before the framework has determined ' - 'the size and position of the render objects during layout.', + 'the size and position of the render objects during layout.', ), describeElement('The size getter was called for the following element'), box.describeForError('The render object from which the size was to be obtained was'), @@ -4247,16 +4247,14 @@ abstract class Element extends DiagnosticableTree implements BuildContext { ErrorSummary('setState() or markNeedsBuild() called during build.'), ErrorDescription( 'This ${widget.runtimeType} widget cannot be marked as needing to build because the framework ' - 'is already in the process of building widgets. A widget can be marked as ' + 'is already in the process of building widgets. A widget can be marked as ' 'needing to be built during the build phase only if one of its ancestors ' 'is currently building. This exception is allowed because the framework ' 'builds parent widgets before children, which means a dirty descendant ' 'will always be built. Otherwise, the framework might not visit this ' 'widget during this build phase.', ), - describeElement( - 'The widget on which setState() or markNeedsBuild() was called was', - ), + describeElement('The widget on which setState() or markNeedsBuild() was called was'), ]; if (owner!._debugCurrentBuildTarget != null) information.add(owner!._debugCurrentBuildTarget!.describeWidget('The widget which was currently being built when the offending call was made was')); @@ -4830,7 +4828,7 @@ class StatefulElement extends ComponentElement { ErrorSummary('${state.runtimeType}.dispose failed to call super.dispose.'), ErrorDescription( 'dispose() implementations must always call their superclass dispose() method, to ensure ' - 'that all the resources used by the widget are fully released.', + 'that all the resources used by the widget are fully released.', ), ]); }());