From 19a835498ea87828309310ec06d7b1074e8ea2d2 Mon Sep 17 00:00:00 2001 From: creativecreatorormaybenot Date: Fri, 25 Dec 2020 05:24:03 +0000 Subject: [PATCH] Correct typos in RenderParagraph (#72930) --- packages/flutter/lib/src/rendering/paragraph.dart | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/packages/flutter/lib/src/rendering/paragraph.dart b/packages/flutter/lib/src/rendering/paragraph.dart index 62f8dd78f7..2e203a6311 100644 --- a/packages/flutter/lib/src/rendering/paragraph.dart +++ b/packages/flutter/lib/src/rendering/paragraph.dart @@ -266,11 +266,10 @@ class RenderParagraph extends RenderBox /// Used by this paragraph's internal [TextPainter] to select a /// locale-specific font. /// - /// In some cases the same Unicode character may be rendered differently - /// depending - /// on the locale. For example the '骨' character is rendered differently in - /// the Chinese and Japanese locales. In these cases the [locale] may be used - /// to select a locale-specific font. + /// In some cases, the same Unicode character may be rendered differently + /// depending on the locale. For example, the '骨' character is rendered + /// differently in the Chinese and Japanese locales. In these cases, the + /// [locale] may be used to select a locale-specific font. Locale? get locale => _textPainter.locale; /// The value may be null. set locale(Locale? value) { @@ -378,7 +377,7 @@ class RenderParagraph extends RenderBox case ui.PlaceholderAlignment.belowBaseline: { assert(RenderObject.debugCheckingIntrinsics, 'Intrinsics are not available for PlaceholderAlignment.baseline, ' - 'PlaceholderAlignment.aboveBaseline, or PlaceholderAlignment.belowBaseline,'); + 'PlaceholderAlignment.aboveBaseline, or PlaceholderAlignment.belowBaseline.'); return false; } case ui.PlaceholderAlignment.top: @@ -432,7 +431,7 @@ class RenderParagraph extends RenderBox final List placeholderDimensions = List.filled(childCount, PlaceholderDimensions.empty, growable: false); int childIndex = 0; // Takes textScaleFactor into account because the content of the placeholder - // span will be scale up when it paints. + // span will be scaled up when it paints. width = width / textScaleFactor; while (child != null) { final Size size = child.getDryLayout(BoxConstraints(maxWidth: width)); @@ -556,7 +555,7 @@ class RenderParagraph extends RenderBox // Leave height unconstrained, which will overflow if expanded past. BoxConstraints boxConstraints = BoxConstraints(maxWidth: constraints.maxWidth); // The content will be enlarged by textScaleFactor during painting phase. - // We reduce constraint by textScaleFactor so that the content will fit + // We reduce constraints by textScaleFactor, so that the content will fit // into the box once it is enlarged. boxConstraints = boxConstraints / textScaleFactor; while (child != null) {