Unverified Commit 162d914d authored by creativecreatorormaybenot's avatar creativecreatorormaybenot Committed by GitHub

Fix typos and formatting in framework.dart (#88926)

parent 86fd222f
...@@ -1097,7 +1097,7 @@ abstract class State<T extends StatefulWidget> with Diagnosticable { ...@@ -1097,7 +1097,7 @@ abstract class State<T extends StatefulWidget> with Diagnosticable {
ErrorHint( ErrorHint(
'Instead of performing asynchronous work inside a call to setState(), first ' 'Instead of performing asynchronous work inside a call to setState(), first '
'execute the work (without updating the widget state), and then synchronously ' '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 { ...@@ -1781,8 +1781,8 @@ abstract class MultiChildRenderObjectWidget extends RenderObjectWidget {
// TODO(a14n): remove this check to have a lot more const widget // TODO(a14n): remove this check to have a lot more const widget
if (children[index] == null) { if (children[index] == null) {
throw FlutterError( throw FlutterError(
"$runtimeType's children must not contain any null values, " "$runtimeType's children must not contain any null values, "
'but a null value was found at index $index', 'but a null value was found at index $index',
); );
} }
} }
...@@ -2738,20 +2738,20 @@ class BuildOwner { ...@@ -2738,20 +2738,20 @@ class BuildOwner {
error = FlutterError.fromParts(<DiagnosticsNode>[ error = FlutterError.fromParts(<DiagnosticsNode>[
ErrorSummary('Multiple widgets used the same GlobalKey.'), ErrorSummary('Multiple widgets used the same GlobalKey.'),
ErrorDescription( ErrorDescription(
'The key $key was used by multiple widgets. The parents of those widgets were:\n' 'The key $key was used by multiple widgets. The parents of those widgets were:\n'
'- ${older.toString()}\n' '- ${older.toString()}\n'
'- ${newer.toString()}\n' '- ${newer.toString()}\n'
'A GlobalKey can only be specified on one widget at a time in the widget tree.', 'A GlobalKey can only be specified on one widget at a time in the widget tree.',
), ),
]); ]);
} else { } else {
error = FlutterError.fromParts(<DiagnosticsNode>[ error = FlutterError.fromParts(<DiagnosticsNode>[
ErrorSummary('Multiple widgets used the same GlobalKey.'), ErrorSummary('Multiple widgets used the same GlobalKey.'),
ErrorDescription( ErrorDescription(
'The key $key was used by multiple widgets. The parents of those widgets were ' 'The key $key was used by multiple widgets. The parents of those widgets were '
'different widgets that both had the following description:\n' 'different widgets that both had the following description:\n'
' ${parent.toString()}\n' ' ${parent.toString()}\n'
'A GlobalKey can only be specified on one widget at a time in the widget tree.', '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 { ...@@ -3949,7 +3949,7 @@ abstract class Element extends DiagnosticableTree implements BuildContext {
'this render object has not yet been through layout, which typically ' 'this render object has not yet been through layout, which typically '
'means that the size getter was called too early in the pipeline ' 'means that the size getter was called too early in the pipeline '
'(e.g., during the build phase) before the framework has determined ' '(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'), describeElement('The size getter was called for the following element'),
box.describeForError('The render object from which the size was to be obtained was'), 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 { ...@@ -4247,16 +4247,14 @@ abstract class Element extends DiagnosticableTree implements BuildContext {
ErrorSummary('setState() or markNeedsBuild() called during build.'), ErrorSummary('setState() or markNeedsBuild() called during build.'),
ErrorDescription( ErrorDescription(
'This ${widget.runtimeType} widget cannot be marked as needing to build because the framework ' '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 ' 'needing to be built during the build phase only if one of its ancestors '
'is currently building. This exception is allowed because the framework ' 'is currently building. This exception is allowed because the framework '
'builds parent widgets before children, which means a dirty descendant ' 'builds parent widgets before children, which means a dirty descendant '
'will always be built. Otherwise, the framework might not visit this ' 'will always be built. Otherwise, the framework might not visit this '
'widget during this build phase.', 'widget during this build phase.',
), ),
describeElement( describeElement('The widget on which setState() or markNeedsBuild() was called was'),
'The widget on which setState() or markNeedsBuild() was called was',
),
]; ];
if (owner!._debugCurrentBuildTarget != null) if (owner!._debugCurrentBuildTarget != null)
information.add(owner!._debugCurrentBuildTarget!.describeWidget('The widget which was currently being built when the offending call was made was')); 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 { ...@@ -4830,7 +4828,7 @@ class StatefulElement extends ComponentElement {
ErrorSummary('${state.runtimeType}.dispose failed to call super.dispose.'), ErrorSummary('${state.runtimeType}.dispose failed to call super.dispose.'),
ErrorDescription( ErrorDescription(
'dispose() implementations must always call their superclass dispose() method, to ensure ' '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.',
), ),
]); ]);
}()); }());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment