Unverified Commit 3fc364cf authored by zmtzawqlp's avatar zmtzawqlp Committed by GitHub

add missing arguments for all constructors of ListView and GridView (#58746)

parent d25b9c80
...@@ -1087,6 +1087,7 @@ class ListView extends BoxScrollView { ...@@ -1087,6 +1087,7 @@ class ListView extends BoxScrollView {
double cacheExtent, double cacheExtent,
int semanticChildCount, int semanticChildCount,
DragStartBehavior dragStartBehavior = DragStartBehavior.start, DragStartBehavior dragStartBehavior = DragStartBehavior.start,
ScrollViewKeyboardDismissBehavior keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual,
}) : assert(itemCount == null || itemCount >= 0), }) : assert(itemCount == null || itemCount >= 0),
assert(semanticChildCount == null || semanticChildCount <= itemCount), assert(semanticChildCount == null || semanticChildCount <= itemCount),
childrenDelegate = SliverChildBuilderDelegate( childrenDelegate = SliverChildBuilderDelegate(
...@@ -1108,6 +1109,7 @@ class ListView extends BoxScrollView { ...@@ -1108,6 +1109,7 @@ class ListView extends BoxScrollView {
cacheExtent: cacheExtent, cacheExtent: cacheExtent,
semanticChildCount: semanticChildCount ?? itemCount, semanticChildCount: semanticChildCount ?? itemCount,
dragStartBehavior: dragStartBehavior, dragStartBehavior: dragStartBehavior,
keyboardDismissBehavior: keyboardDismissBehavior,
); );
/// Creates a fixed-length scrollable linear array of list "items" separated /// Creates a fixed-length scrollable linear array of list "items" separated
...@@ -1173,6 +1175,7 @@ class ListView extends BoxScrollView { ...@@ -1173,6 +1175,7 @@ class ListView extends BoxScrollView {
bool addRepaintBoundaries = true, bool addRepaintBoundaries = true,
bool addSemanticIndexes = true, bool addSemanticIndexes = true,
double cacheExtent, double cacheExtent,
DragStartBehavior dragStartBehavior = DragStartBehavior.start,
ScrollViewKeyboardDismissBehavior keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual, ScrollViewKeyboardDismissBehavior keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual,
}) : assert(itemBuilder != null), }) : assert(itemBuilder != null),
assert(separatorBuilder != null), assert(separatorBuilder != null),
...@@ -1214,6 +1217,7 @@ class ListView extends BoxScrollView { ...@@ -1214,6 +1217,7 @@ class ListView extends BoxScrollView {
padding: padding, padding: padding,
cacheExtent: cacheExtent, cacheExtent: cacheExtent,
semanticChildCount: itemCount, semanticChildCount: itemCount,
dragStartBehavior: dragStartBehavior,
keyboardDismissBehavior: keyboardDismissBehavior, keyboardDismissBehavior: keyboardDismissBehavior,
); );
...@@ -1312,6 +1316,8 @@ class ListView extends BoxScrollView { ...@@ -1312,6 +1316,8 @@ class ListView extends BoxScrollView {
@required this.childrenDelegate, @required this.childrenDelegate,
double cacheExtent, double cacheExtent,
int semanticChildCount, int semanticChildCount,
DragStartBehavior dragStartBehavior = DragStartBehavior.start,
ScrollViewKeyboardDismissBehavior keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual,
}) : assert(childrenDelegate != null), }) : assert(childrenDelegate != null),
super( super(
key: key, key: key,
...@@ -1324,6 +1330,8 @@ class ListView extends BoxScrollView { ...@@ -1324,6 +1330,8 @@ class ListView extends BoxScrollView {
padding: padding, padding: padding,
cacheExtent: cacheExtent, cacheExtent: cacheExtent,
semanticChildCount: semanticChildCount, semanticChildCount: semanticChildCount,
dragStartBehavior: dragStartBehavior,
keyboardDismissBehavior: keyboardDismissBehavior,
); );
/// If non-null, forces the children to have the given extent in the scroll /// If non-null, forces the children to have the given extent in the scroll
...@@ -1583,6 +1591,8 @@ class GridView extends BoxScrollView { ...@@ -1583,6 +1591,8 @@ class GridView extends BoxScrollView {
double cacheExtent, double cacheExtent,
List<Widget> children = const <Widget>[], List<Widget> children = const <Widget>[],
int semanticChildCount, int semanticChildCount,
DragStartBehavior dragStartBehavior = DragStartBehavior.start,
ScrollViewKeyboardDismissBehavior keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual,
}) : assert(gridDelegate != null), }) : assert(gridDelegate != null),
childrenDelegate = SliverChildListDelegate( childrenDelegate = SliverChildListDelegate(
children, children,
...@@ -1601,6 +1611,8 @@ class GridView extends BoxScrollView { ...@@ -1601,6 +1611,8 @@ class GridView extends BoxScrollView {
padding: padding, padding: padding,
cacheExtent: cacheExtent, cacheExtent: cacheExtent,
semanticChildCount: semanticChildCount ?? children.length, semanticChildCount: semanticChildCount ?? children.length,
dragStartBehavior: dragStartBehavior,
keyboardDismissBehavior: keyboardDismissBehavior,
); );
/// Creates a scrollable, 2D array of widgets that are created on demand. /// Creates a scrollable, 2D array of widgets that are created on demand.
...@@ -1639,6 +1651,8 @@ class GridView extends BoxScrollView { ...@@ -1639,6 +1651,8 @@ class GridView extends BoxScrollView {
bool addSemanticIndexes = true, bool addSemanticIndexes = true,
double cacheExtent, double cacheExtent,
int semanticChildCount, int semanticChildCount,
DragStartBehavior dragStartBehavior = DragStartBehavior.start,
ScrollViewKeyboardDismissBehavior keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual,
}) : assert(gridDelegate != null), }) : assert(gridDelegate != null),
childrenDelegate = SliverChildBuilderDelegate( childrenDelegate = SliverChildBuilderDelegate(
itemBuilder, itemBuilder,
...@@ -1658,6 +1672,8 @@ class GridView extends BoxScrollView { ...@@ -1658,6 +1672,8 @@ class GridView extends BoxScrollView {
padding: padding, padding: padding,
cacheExtent: cacheExtent, cacheExtent: cacheExtent,
semanticChildCount: semanticChildCount ?? itemCount, semanticChildCount: semanticChildCount ?? itemCount,
dragStartBehavior: dragStartBehavior,
keyboardDismissBehavior: keyboardDismissBehavior,
); );
/// Creates a scrollable, 2D array of widgets with both a custom /// Creates a scrollable, 2D array of widgets with both a custom
...@@ -1681,6 +1697,7 @@ class GridView extends BoxScrollView { ...@@ -1681,6 +1697,7 @@ class GridView extends BoxScrollView {
double cacheExtent, double cacheExtent,
int semanticChildCount, int semanticChildCount,
DragStartBehavior dragStartBehavior = DragStartBehavior.start, DragStartBehavior dragStartBehavior = DragStartBehavior.start,
ScrollViewKeyboardDismissBehavior keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual,
}) : assert(gridDelegate != null), }) : assert(gridDelegate != null),
assert(childrenDelegate != null), assert(childrenDelegate != null),
super( super(
...@@ -1695,6 +1712,7 @@ class GridView extends BoxScrollView { ...@@ -1695,6 +1712,7 @@ class GridView extends BoxScrollView {
cacheExtent: cacheExtent, cacheExtent: cacheExtent,
semanticChildCount: semanticChildCount, semanticChildCount: semanticChildCount,
dragStartBehavior: dragStartBehavior, dragStartBehavior: dragStartBehavior,
keyboardDismissBehavior: keyboardDismissBehavior,
); );
/// Creates a scrollable, 2D array of widgets with a fixed number of tiles in /// Creates a scrollable, 2D array of widgets with a fixed number of tiles in
...@@ -1731,6 +1749,7 @@ class GridView extends BoxScrollView { ...@@ -1731,6 +1749,7 @@ class GridView extends BoxScrollView {
List<Widget> children = const <Widget>[], List<Widget> children = const <Widget>[],
int semanticChildCount, int semanticChildCount,
DragStartBehavior dragStartBehavior = DragStartBehavior.start, DragStartBehavior dragStartBehavior = DragStartBehavior.start,
ScrollViewKeyboardDismissBehavior keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual,
}) : gridDelegate = SliverGridDelegateWithFixedCrossAxisCount( }) : gridDelegate = SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: crossAxisCount, crossAxisCount: crossAxisCount,
mainAxisSpacing: mainAxisSpacing, mainAxisSpacing: mainAxisSpacing,
...@@ -1755,6 +1774,7 @@ class GridView extends BoxScrollView { ...@@ -1755,6 +1774,7 @@ class GridView extends BoxScrollView {
cacheExtent: cacheExtent, cacheExtent: cacheExtent,
semanticChildCount: semanticChildCount ?? children.length, semanticChildCount: semanticChildCount ?? children.length,
dragStartBehavior: dragStartBehavior, dragStartBehavior: dragStartBehavior,
keyboardDismissBehavior: keyboardDismissBehavior,
); );
/// Creates a scrollable, 2D array of widgets with tiles that each have a /// Creates a scrollable, 2D array of widgets with tiles that each have a
...@@ -1790,6 +1810,7 @@ class GridView extends BoxScrollView { ...@@ -1790,6 +1810,7 @@ class GridView extends BoxScrollView {
List<Widget> children = const <Widget>[], List<Widget> children = const <Widget>[],
int semanticChildCount, int semanticChildCount,
DragStartBehavior dragStartBehavior = DragStartBehavior.start, DragStartBehavior dragStartBehavior = DragStartBehavior.start,
ScrollViewKeyboardDismissBehavior keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual,
}) : gridDelegate = SliverGridDelegateWithMaxCrossAxisExtent( }) : gridDelegate = SliverGridDelegateWithMaxCrossAxisExtent(
maxCrossAxisExtent: maxCrossAxisExtent, maxCrossAxisExtent: maxCrossAxisExtent,
mainAxisSpacing: mainAxisSpacing, mainAxisSpacing: mainAxisSpacing,
...@@ -1813,6 +1834,7 @@ class GridView extends BoxScrollView { ...@@ -1813,6 +1834,7 @@ class GridView extends BoxScrollView {
padding: padding, padding: padding,
semanticChildCount: semanticChildCount ?? children.length, semanticChildCount: semanticChildCount ?? children.length,
dragStartBehavior: dragStartBehavior, dragStartBehavior: dragStartBehavior,
keyboardDismissBehavior: keyboardDismissBehavior,
); );
/// A delegate that controls the layout of the children within the [GridView]. /// A delegate that controls the layout of the children within the [GridView].
......
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