diff --git a/packages/flutter/lib/src/widgets/scroll_view.dart b/packages/flutter/lib/src/widgets/scroll_view.dart index c6a2354b677..85a7260b24e 100644 --- a/packages/flutter/lib/src/widgets/scroll_view.dart +++ b/packages/flutter/lib/src/widgets/scroll_view.dart @@ -715,8 +715,10 @@ class ListView extends BoxScrollView { /// The `addAutomaticKeepAlives` argument corresponds to the /// [SliverChildListDelegate.addAutomaticKeepAlives] property. The /// `addRepaintBoundaries` argument corresponds to the - /// [SliverChildListDelegate.addRepaintBoundaries] property. Both must not be - /// null. + /// [SliverChildListDelegate.addRepaintBoundaries] property. The + /// `addSemanticIndexes` argument corresponds to the + /// [SliverChildListDelegate.addSemanticIndexes] property. None + /// may be null. ListView({ Key key, Axis scrollDirection = Axis.vertical, @@ -773,8 +775,10 @@ class ListView extends BoxScrollView { /// The `addAutomaticKeepAlives` argument corresponds to the /// [SliverChildBuilderDelegate.addAutomaticKeepAlives] property. The /// `addRepaintBoundaries` argument corresponds to the - /// [SliverChildBuilderDelegate.addRepaintBoundaries] property. Both must not - /// be null. + /// [SliverChildBuilderDelegate.addRepaintBoundaries] property. The + /// `addSemanticIndexes` argument corresponds to the + /// [SliverChildBuilderDelegate.addSemanticIndexes] property. None may be + /// null. ListView.builder({ Key key, Axis scrollDirection = Axis.vertical, @@ -853,8 +857,10 @@ class ListView extends BoxScrollView { /// The `addAutomaticKeepAlives` argument corresponds to the /// [SliverChildBuilderDelegate.addAutomaticKeepAlives] property. The /// `addRepaintBoundaries` argument corresponds to the - /// [SliverChildBuilderDelegate.addRepaintBoundaries] property. Both must not - /// be null. + /// [SliverChildBuilderDelegate.addRepaintBoundaries] property. The + /// `addSemanticIndexes` argument corresponds to the + /// [SliverChildBuilderDelegate.addSemanticIndexes] property. None may be + /// null. ListView.separated({ Key key, Axis scrollDirection = Axis.vertical, diff --git a/packages/flutter/lib/src/widgets/sliver.dart b/packages/flutter/lib/src/widgets/sliver.dart index 0ef5ffd1271..f7ead1fc226 100644 --- a/packages/flutter/lib/src/widgets/sliver.dart +++ b/packages/flutter/lib/src/widgets/sliver.dart @@ -301,8 +301,9 @@ class SliverChildBuilderDelegate extends SliverChildDelegate { /// Creates a delegate that supplies children for slivers using the given /// builder callback. /// - /// The [builder], [addAutomaticKeepAlives], and [addRepaintBoundaries] - /// arguments must not be null. + /// The [builder], [addAutomaticKeepAlives], [addRepaintBoundaries], + /// [addSemanticIndexes], and [semanticIndexCallback] arguments must not be + /// null. const SliverChildBuilderDelegate( this.builder, { this.childCount, @@ -313,7 +314,9 @@ class SliverChildBuilderDelegate extends SliverChildDelegate { this.semanticIndexOffset = 0, }) : assert(builder != null), assert(addAutomaticKeepAlives != null), - assert(addRepaintBoundaries != null); + assert(addRepaintBoundaries != null), + assert(addSemanticIndexes != null), + assert(semanticIndexCallback != null); /// Called to build children for the sliver. /// @@ -363,10 +366,13 @@ class SliverChildBuilderDelegate extends SliverChildDelegate { /// Typically, children in a scrolling container must be annotated with a /// semantic index in order to generate the correct accessibility /// announcements. This should only be set to false if the indexes have - /// already been provided by wrapping the correct child widgets in an - /// indexed child semantics widget. + /// already been provided by an [IndexedChildSemantics] widget. /// /// Defaults to true. + /// + /// See also: + /// * [IndexedChildSemantics], for an explanation of how to manually + /// provide semantic indexes. final bool addSemanticIndexes; /// An initial offset to add to the semantic indexes generated by this widget. @@ -461,8 +467,9 @@ class SliverChildListDelegate extends SliverChildDelegate { /// Creates a delegate that supplies children for slivers using the given /// list. /// - /// The [children], [addAutomaticKeepAlives], and [addRepaintBoundaries] - /// arguments must not be null. + /// The [children], [addAutomaticKeepAlives], [addRepaintBoundaries], + /// [addSemanticIndexes], and [semanticIndexCallback] arguments must not be + /// null. const SliverChildListDelegate( this.children, { this.addAutomaticKeepAlives = true, @@ -472,7 +479,9 @@ class SliverChildListDelegate extends SliverChildDelegate { this.semanticIndexOffset = 0, }) : assert(children != null), assert(addAutomaticKeepAlives != null), - assert(addRepaintBoundaries != null); + assert(addRepaintBoundaries != null), + assert(addSemanticIndexes != null), + assert(semanticIndexCallback != null); /// Whether to wrap each child in an [AutomaticKeepAlive]. /// @@ -504,10 +513,13 @@ class SliverChildListDelegate extends SliverChildDelegate { /// Typically, children in a scrolling container must be annotated with a /// semantic index in order to generate the correct accessibility /// announcements. This should only be set to false if the indexes have - /// already been provided by wrapping the correct child widgets in an - /// indexed child semantics widget. + /// already been provided by an [IndexedChildSemantics] widget. /// /// Defaults to true. + /// + /// See also: + /// * [IndexedChildSemantics], for an explanation of how to manually + /// provide semantic indexes. final bool addSemanticIndexes; /// An initial offset to add to the semantic indexes generated by this widget.