Skip to content

Commit c161ac8

Browse files
brandondiamondgoderbauer
authored andcommitted
Fix typos / errors in doc comments (flutter#38558)
1 parent a11d731 commit c161ac8

13 files changed

+29
-27
lines changed

packages/flutter/lib/src/gestures/arena.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ abstract class GestureArenaMember {
3333
void rejectGesture(int pointer);
3434
}
3535

36-
/// An interface to information to an arena.
36+
/// An interface to pass information to an arena.
3737
///
3838
/// A given [GestureArenaMember] can have multiple entries in multiple arenas
3939
/// with different pointer ids.

packages/flutter/lib/src/gestures/binding.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ mixin GestureBinding on BindingBase implements HitTestable, HitTestDispatcher, H
8888

8989
/// Dispatch a [PointerCancelEvent] for the given pointer soon.
9090
///
91-
/// The pointer event will be dispatch before the next pointer event and
91+
/// The pointer event will be dispatched before the next pointer event and
9292
/// before the end of the microtask but not within this function call.
9393
void cancelPointer(int pointer) {
9494
if (_pendingPointerEvents.isEmpty && !locked)

packages/flutter/lib/src/gestures/tap.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ typedef GestureTapCancelCallback = void Function();
102102
///
103103
/// Gesture recognizers take part in gesture arenas to enable potential gestures
104104
/// to be disambiguated from each other. This process is managed by a
105-
/// [GestureArenaManager] (q.v.).
105+
/// [GestureArenaManager].
106106
///
107107
/// [TapGestureRecognizer] considers all the pointers involved in the pointer
108108
/// event sequence as contributing to one gesture. For this reason, extra

packages/flutter/lib/src/rendering/box.dart

+6-6
Original file line numberDiff line numberDiff line change
@@ -1142,7 +1142,7 @@ class _IntrinsicDimensionsCacheEntry {
11421142
/// [constraints] given by the parent to the child were tight constraints.)
11431143
///
11441144
/// For [RenderBox] classes that do not inherit from [RenderProxyBox], once they
1145-
/// have laid out their children, should also position them, by setting the
1145+
/// have laid out their children, they should also position them, by setting the
11461146
/// [BoxParentData.offset] field of each child's [parentData] object.
11471147
///
11481148
/// #### Layout of non-RenderBox children
@@ -2076,11 +2076,11 @@ abstract class RenderBox extends RenderObject {
20762076
/// This [RenderBox] is responsible for checking whether the given position is
20772077
/// within its bounds.
20782078
///
2079-
/// If transforming is necessary, [HitTestResult.addWithPaintTransform],
2080-
/// [HitTestResult.addWithPaintOffset], or [HitTestResult.addWithRawTransform] need
2081-
/// to be invoked by the caller to record the required transform operations
2082-
/// in the [HitTestResult]. These methods will also help with applying the
2083-
/// transform to `position`.
2079+
/// If transforming is necessary, [BoxHitTestResult.addWithPaintTransform],
2080+
/// [BoxHitTestResult.addWithPaintOffset], or
2081+
/// [BoxHitTestResult.addWithRawTransform] need to be invoked by the caller
2082+
/// to record the required transform operations in the [HitTestResult]. These
2083+
/// methods will also help with applying the transform to `position`.
20842084
///
20852085
/// Hit testing requires layout to be up-to-date but does not require painting
20862086
/// to be up-to-date. That means a render object can rely upon [performLayout]

packages/flutter/lib/src/rendering/layer.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ abstract class Layer extends AbstractNode with DiagnosticableTreeMixin {
9090

9191
/// Traverse the layer tree and compute if any subtree needs [addToScene].
9292
///
93-
/// A subtree needs [addToScene] if any of its layer needs [addToScene].
93+
/// A subtree needs [addToScene] if any of its layers need [addToScene].
9494
/// The [ContainerLayer] will override this to respect its children.
9595
@protected
9696
@visibleForTesting

packages/flutter/lib/src/rendering/object.dart

+6-4
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ class PaintingContext extends ClipContext {
380380
///
381381
/// * `needsCompositing` is whether the child needs compositing. Typically
382382
/// matches the value of [RenderObject.needsCompositing] for the caller.
383-
/// * `offset` is the offset from the origin of the canvas' coordinate system
383+
/// * `offset` is the offset from the origin of the canvas's coordinate system
384384
/// to the origin of the caller's coordinate system.
385385
/// * `clipRect` is rectangle (in the caller's coordinate system) to use to
386386
/// clip the painting done by [painter].
@@ -1405,7 +1405,8 @@ abstract class RenderObject extends AbstractNode with DiagnosticableTreeMixin im
14051405
///
14061406
/// Some subclasses of [RenderObject], notably [RenderBox], have other
14071407
/// situations in which the parent needs to be notified if the child is
1408-
/// dirtied. Such subclasses override markNeedsLayout and either call
1408+
/// dirtied (e.g., if the child's intrinsic dimensions or baseline changes).
1409+
/// Such subclasses override markNeedsLayout and either call
14091410
/// `super.markNeedsLayout()`, in the normal case, or call
14101411
/// [markParentNeedsLayout], in the case where the parent needs to be laid out
14111412
/// as well as the child.
@@ -1532,7 +1533,7 @@ abstract class RenderObject extends AbstractNode with DiagnosticableTreeMixin im
15321533
///
15331534
/// This method is the main entry point for parents to ask their children to
15341535
/// update their layout information. The parent passes a constraints object,
1535-
/// which informs the child as which layouts are permissible. The child is
1536+
/// which informs the child as to which layouts are permissible. The child is
15361537
/// required to obey the given constraints.
15371538
///
15381539
/// If the parent reads information computed during the child's layout, the
@@ -1836,7 +1837,8 @@ abstract class RenderObject extends AbstractNode with DiagnosticableTreeMixin im
18361837
/// Mark the compositing state for this render object as dirty.
18371838
///
18381839
/// This is called to indicate that the value for [needsCompositing] needs to
1839-
/// be recomputed during the next [flushCompositingBits] engine phase.
1840+
/// be recomputed during the next [PipelineOwner.flushCompositingBits] engine
1841+
/// phase.
18401842
///
18411843
/// When the subtree is mutated, we need to recompute our
18421844
/// [needsCompositing] bit, and some of our ancestors need to do the

packages/flutter/lib/src/scheduler/binding.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ enum SchedulerPhase {
150150
/// Microtasks scheduled during the processing of transient callbacks are
151151
/// current executing.
152152
///
153-
/// This may include, for instance, callbacks from futures resulted during the
153+
/// This may include, for instance, callbacks from futures resolved during the
154154
/// [transientCallbacks] phase.
155155
midFrameMicrotasks,
156156

packages/flutter/lib/src/widgets/binding.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,7 @@ mixin WidgetsBinding on BindingBase, SchedulerBinding, GestureBinding, RendererB
713713
/// sent to the GPU.
714714
///
715715
/// 8. The semantics phase: All the dirty [RenderObject]s in the system have
716-
/// their semantics updated (see [RenderObject.semanticsAnnotator]). This
716+
/// their semantics updated (see [RenderObject.assembleSemanticsNode]). This
717717
/// generates the [SemanticsNode] tree. See
718718
/// [RenderObject.markNeedsSemanticsUpdate] for further details on marking an
719719
/// object dirty for semantics.

packages/flutter/lib/src/widgets/draggable_scrollable_sheet.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ typedef ScrollableWidgetBuilder = Widget Function(
4444
/// between the range of minChildSize and maxChildSize (as percentages of the
4545
/// parent container's height) as long as the builder creates a widget which
4646
/// uses the provided [ScrollController]. If the widget created by the
47-
/// [ScrollableWidgetBuilder] does not use provided [ScrollController], the
47+
/// [ScrollableWidgetBuilder] does not use the provided [ScrollController], the
4848
/// sheet will remain at the initialChildSize.
4949
///
5050
/// By default, the widget will expand its non-occupied area to fill available

packages/flutter/lib/src/widgets/focus_manager.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -825,7 +825,7 @@ class FocusNode with DiagnosticableTreeMixin, ChangeNotifier {
825825
/// as the [focusedChild] of this node, adopting if it isn't already part of the
826826
/// focus tree.
827827
///
828-
/// {@macro flutter.widgets.focusManager.lifecycle}
828+
/// {@macro flutter.widgets.focus_manager.focus.lifecycle}
829829
/// {@macro flutter.widgets.focus_manager.focus.keyEvents}
830830
///
831831
/// See also:
@@ -999,7 +999,7 @@ enum FocusHighlightStrategy {
999999
/// See also:
10001000
///
10011001
/// * [FocusNode], which is a node in the focus tree that can receive focus.
1002-
/// * [FocusScopeNode], which is an node in the focus tree used to collect
1002+
/// * [FocusScopeNode], which is a node in the focus tree used to collect
10031003
/// subtrees into groups.
10041004
/// * [Focus.of], which provides the nearest ancestor [FocusNode] for a given
10051005
/// [BuildContext].

packages/flutter/lib/src/widgets/framework.dart

+6-6
Original file line numberDiff line numberDiff line change
@@ -1246,8 +1246,8 @@ abstract class State<T extends StatefulWidget> extends Diagnosticable {
12461246
/// ### Why is the [build] method on [State], and not [StatefulWidget]?
12471247
///
12481248
/// Putting a `Widget build(BuildContext context)` method on [State] rather
1249-
/// putting a `Widget build(BuildContext context, State state)` method on
1250-
/// [StatefulWidget] gives developers more flexibility when subclassing
1249+
/// than putting a `Widget build(BuildContext context, State state)` method
1250+
/// on [StatefulWidget] gives developers more flexibility when subclassing
12511251
/// [StatefulWidget].
12521252
///
12531253
/// For example, [AnimatedWidget] is a subclass of [StatefulWidget] that
@@ -2569,7 +2569,7 @@ class BuildOwner {
25692569
/// state. When this happens, the framework will call [update] with the new
25702570
/// widget. The new widget will always have the same [runtimeType] and key as
25712571
/// old widget. If the parent wishes to change the [runtimeType] or key of
2572-
/// the widget at this location in the tree, can do so by unmounting this
2572+
/// the widget at this location in the tree, it can do so by unmounting this
25732573
/// element and inflating the new widget at this location.
25742574
/// * At some point, an ancestor might decide to remove this element (or an
25752575
/// intermediate ancestor) from the tree, which the ancestor does by calling
@@ -4411,7 +4411,7 @@ class InheritedElement extends ProxyElement {
44114411
///
44124412
/// Subclasses can manage these values with [updateDependencies]
44134413
/// so that they can selectively rebuild dependents in
4414-
/// [notifyDependents].
4414+
/// [notifyDependent].
44154415
///
44164416
/// This method is typically only called in overrides of [updateDependencies].
44174417
///
@@ -4438,7 +4438,7 @@ class InheritedElement extends ProxyElement {
44384438
/// null by default so that dependent elements are rebuilt unconditionally.
44394439
///
44404440
/// Subclasses can manage these values with [updateDependencies]
4441-
/// so that they can selectively rebuild dependents in [notifyDependents].
4441+
/// so that they can selectively rebuild dependents in [notifyDependent].
44424442
///
44434443
/// This method is typically only called in overrides of [updateDependencies].
44444444
///
@@ -4468,7 +4468,7 @@ class InheritedElement extends ProxyElement {
44684468
/// [dependent].
44694469
///
44704470
/// Subclasses can manage their own dependencies values so that they
4471-
/// can selectively rebuild dependents in [notifyDependents].
4471+
/// can selectively rebuild dependents in [notifyDependent].
44724472
///
44734473
/// See also:
44744474
///

packages/flutter/lib/src/widgets/media_query.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ enum Orientation {
7272
/// Widgets whose layouts consume space defined by [viewInsets], [viewPadding],
7373
/// or [padding] should enclose their children in secondary MediaQuery
7474
/// widgets that reduce those properties by the same amount.
75-
/// The [removePadding], [removeViewPadding], and [removeInsets] methods are
75+
/// The [removePadding], [removeViewPadding], and [removeViewInsets] methods are
7676
/// useful for this.
7777
/// See also:
7878
///

packages/flutter/lib/src/widgets/nested_scroll_view.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ typedef NestedScrollViewHeaderSliversBuilder = List<Widget> Function(BuildContex
4141
/// their scroll positions being intrinsically linked.
4242
///
4343
/// The most common use case for this widget is a scrollable view with a
44-
/// flexible [SliverAppBar] containing a [TabBar] in the header (build by
44+
/// flexible [SliverAppBar] containing a [TabBar] in the header (built by
4545
/// [headerSliverBuilder], and with a [TabBarView] in the [body], such that the
4646
/// scrollable view's contents vary based on which tab is visible.
4747
///

0 commit comments

Comments
 (0)