Class GridView
Inheritance
GridView
Inherited Members
Namespace: Unity.UIWidgets.widgets
Syntax
public class GridView : BoxScrollView
Constructors
GridView(Key, Axis, Boolean, ScrollController, Nullable<Boolean>, ScrollPhysics, Boolean, EdgeInsets, SliverGridDelegate, Boolean, Boolean, Nullable<Single>, List<Widget>)
Declaration
public GridView(Key key = null, Axis scrollDirection = Axis.vertical, bool reverse = false, ScrollController controller = null, bool? primary = default(bool? ), ScrollPhysics physics = null, bool shrinkWrap = false, EdgeInsets padding = null, SliverGridDelegate gridDelegate = null, bool addAutomaticKeepAlives = true, bool addRepaintBoundaries = true, float? cacheExtent = default(float? ), List<Widget> children = null)
Parameters
Type | Name | Description |
---|---|---|
Key | key | |
Axis | scrollDirection | |
Boolean | reverse | |
ScrollController | controller | |
Nullable<Boolean> | primary | |
ScrollPhysics | physics | |
Boolean | shrinkWrap | |
EdgeInsets | padding | |
SliverGridDelegate | gridDelegate | |
Boolean | addAutomaticKeepAlives | |
Boolean | addRepaintBoundaries | |
Nullable<Single> | cacheExtent | |
List<Widget> | children |
GridView(Key, Axis, Boolean, ScrollController, Nullable<Boolean>, ScrollPhysics, Boolean, EdgeInsets, SliverGridDelegate, IndexedWidgetBuilder, Nullable<Int32>, Boolean, Boolean, Nullable<Single>)
Declaration
public GridView(Key key = null, Axis scrollDirection = Axis.vertical, bool reverse = false, ScrollController controller = null, bool? primary = default(bool? ), ScrollPhysics physics = null, bool shrinkWrap = false, EdgeInsets padding = null, SliverGridDelegate gridDelegate = null, IndexedWidgetBuilder itemBuilder = null, int? itemCount = default(int? ), bool addAutomaticKeepAlives = true, bool addRepaintBoundaries = true, float? cacheExtent = default(float? ))
Parameters
Type | Name | Description |
---|---|---|
Key | key | |
Axis | scrollDirection | |
Boolean | reverse | |
ScrollController | controller | |
Nullable<Boolean> | primary | |
ScrollPhysics | physics | |
Boolean | shrinkWrap | |
EdgeInsets | padding | |
SliverGridDelegate | gridDelegate | |
IndexedWidgetBuilder | itemBuilder | |
Nullable<Int32> | itemCount | |
Boolean | addAutomaticKeepAlives | |
Boolean | addRepaintBoundaries | |
Nullable<Single> | cacheExtent |
GridView(Key, Axis, Boolean, ScrollController, Nullable<Boolean>, ScrollPhysics, Boolean, EdgeInsets, SliverGridDelegate, SliverChildDelegate, Nullable<Single>, DragStartBehavior)
Declaration
public GridView(Key key = null, Axis scrollDirection = Axis.vertical, bool reverse = false, ScrollController controller = null, bool? primary = default(bool? ), ScrollPhysics physics = null, bool shrinkWrap = false, EdgeInsets padding = null, SliverGridDelegate gridDelegate = null, SliverChildDelegate childrenDelegate = null, float? cacheExtent = default(float? ), DragStartBehavior dragStartBehavior = DragStartBehavior.start)
Parameters
Type | Name | Description |
---|---|---|
Key | key | |
Axis | scrollDirection | |
Boolean | reverse | |
ScrollController | controller | |
Nullable<Boolean> | primary | |
ScrollPhysics | physics | |
Boolean | shrinkWrap | |
EdgeInsets | padding | |
SliverGridDelegate | gridDelegate | |
SliverChildDelegate | childrenDelegate | |
Nullable<Single> | cacheExtent | |
DragStartBehavior | dragStartBehavior |
GridView(Key, Axis, Boolean, ScrollController, Nullable<Boolean>, ScrollPhysics, Boolean, EdgeInsets, Nullable<Int32>, Single, Single, Single, Boolean, Boolean, Nullable<Single>, List<Widget>, DragStartBehavior)
Declaration
public GridView(Key key = null, Axis scrollDirection = Axis.vertical, bool reverse = false, ScrollController controller = null, bool? primary = default(bool? ), ScrollPhysics physics = null, bool shrinkWrap = false, EdgeInsets padding = null, int? crossAxisCount = default(int? ), float mainAxisSpacing = 0F, float crossAxisSpacing = 0F, float childAspectRatio = 1F, bool addAutomaticKeepAlives = true, bool addRepaintBoundaries = true, float? cacheExtent = default(float? ), List<Widget> children = null, DragStartBehavior dragStartBehavior = DragStartBehavior.start)
Parameters
Type | Name | Description |
---|---|---|
Key | key | |
Axis | scrollDirection | |
Boolean | reverse | |
ScrollController | controller | |
Nullable<Boolean> | primary | |
ScrollPhysics | physics | |
Boolean | shrinkWrap | |
EdgeInsets | padding | |
Nullable<Int32> | crossAxisCount | |
Single | mainAxisSpacing | |
Single | crossAxisSpacing | |
Single | childAspectRatio | |
Boolean | addAutomaticKeepAlives | |
Boolean | addRepaintBoundaries | |
Nullable<Single> | cacheExtent | |
List<Widget> | children | |
DragStartBehavior | dragStartBehavior |
GridView(Key, Axis, Boolean, ScrollController, Nullable<Boolean>, ScrollPhysics, Boolean, EdgeInsets, Nullable<Single>, Single, Single, Single, Boolean, Boolean, Boolean, List<Widget>, DragStartBehavior)
Declaration
public GridView(Key key = null, Axis scrollDirection = Axis.vertical, bool reverse = false, ScrollController controller = null, bool? primary = default(bool? ), ScrollPhysics physics = null, bool shrinkWrap = false, EdgeInsets padding = null, float? maxCrossAxisExtent = default(float? ), float mainAxisSpacing = 0F, float crossAxisSpacing = 0F, float childAspectRatio = 1F, bool addAutomaticKeepAlives = true, bool addRepaintBoundaries = true, bool addSemanticIndexes = true, List<Widget> children = null, DragStartBehavior dragStartBehavior = DragStartBehavior.start)
Parameters
Type | Name | Description |
---|---|---|
Key | key | |
Axis | scrollDirection | |
Boolean | reverse | |
ScrollController | controller | |
Nullable<Boolean> | primary | |
ScrollPhysics | physics | |
Boolean | shrinkWrap | |
EdgeInsets | padding | |
Nullable<Single> | maxCrossAxisExtent | |
Single | mainAxisSpacing | |
Single | crossAxisSpacing | |
Single | childAspectRatio | |
Boolean | addAutomaticKeepAlives | |
Boolean | addRepaintBoundaries | |
Boolean | addSemanticIndexes | |
List<Widget> | children | |
DragStartBehavior | dragStartBehavior |
Fields
childrenDelegate
Declaration
public readonly SliverChildDelegate childrenDelegate
Field Value
Type | Description |
---|---|
SliverChildDelegate |
gridDelegate
Declaration
public readonly SliverGridDelegate gridDelegate
Field Value
Type | Description |
---|---|
SliverGridDelegate |
Methods
buildChildLayout(BuildContext)
Declaration
protected override Widget buildChildLayout(BuildContext context)
Parameters
Type | Name | Description |
---|---|---|
BuildContext | context |
Returns
Type | Description |
---|---|
Widget |
Overrides
builder(Key, Axis, Boolean, ScrollController, Nullable<Boolean>, ScrollPhysics, Boolean, EdgeInsets, SliverGridDelegate, IndexedWidgetBuilder, Nullable<Int32>, Boolean, Boolean, Nullable<Single>)
Declaration
public static GridView builder(Key key = null, Axis scrollDirection = Axis.vertical, bool reverse = false, ScrollController controller = null, bool? primary = default(bool? ), ScrollPhysics physics = null, bool shrinkWrap = false, EdgeInsets padding = null, SliverGridDelegate gridDelegate = null, IndexedWidgetBuilder itemBuilder = null, int? itemCount = default(int? ), bool addAutomaticKeepAlives = true, bool addRepaintBoundaries = true, float? cacheExtent = default(float? ))
Parameters
Type | Name | Description |
---|---|---|
Key | key | |
Axis | scrollDirection | |
Boolean | reverse | |
ScrollController | controller | |
Nullable<Boolean> | primary | |
ScrollPhysics | physics | |
Boolean | shrinkWrap | |
EdgeInsets | padding | |
SliverGridDelegate | gridDelegate | |
IndexedWidgetBuilder | itemBuilder | |
Nullable<Int32> | itemCount | |
Boolean | addAutomaticKeepAlives | |
Boolean | addRepaintBoundaries | |
Nullable<Single> | cacheExtent |
Returns
Type | Description |
---|---|
GridView |
count(Key, Axis, Boolean, ScrollController, Nullable<Boolean>, ScrollPhysics, Boolean, EdgeInsets, Nullable<Int32>, Single, Single, Single, Boolean, Boolean, Nullable<Single>, List<Widget>, DragStartBehavior)
Declaration
public static GridView count(Key key = null, Axis scrollDirection = Axis.vertical, bool reverse = false, ScrollController controller = null, bool? primary = default(bool? ), ScrollPhysics physics = null, bool shrinkWrap = false, EdgeInsets padding = null, int? crossAxisCount = default(int? ), float mainAxisSpacing = 0F, float crossAxisSpacing = 0F, float childAspectRatio = 1F, bool addAutomaticKeepAlives = true, bool addRepaintBoundaries = true, float? cacheExtent = default(float? ), List<Widget> children = null, DragStartBehavior dragStartBehavior = DragStartBehavior.start)
Parameters
Type | Name | Description |
---|---|---|
Key | key | |
Axis | scrollDirection | |
Boolean | reverse | |
ScrollController | controller | |
Nullable<Boolean> | primary | |
ScrollPhysics | physics | |
Boolean | shrinkWrap | |
EdgeInsets | padding | |
Nullable<Int32> | crossAxisCount | |
Single | mainAxisSpacing | |
Single | crossAxisSpacing | |
Single | childAspectRatio | |
Boolean | addAutomaticKeepAlives | |
Boolean | addRepaintBoundaries | |
Nullable<Single> | cacheExtent | |
List<Widget> | children | |
DragStartBehavior | dragStartBehavior |
Returns
Type | Description |
---|---|
GridView |
custom(Key, Axis, Boolean, ScrollController, Nullable<Boolean>, ScrollPhysics, Boolean, EdgeInsets, SliverGridDelegate, SliverChildDelegate, Nullable<Single>, DragStartBehavior)
Declaration
public static GridView custom(Key key = null, Axis scrollDirection = Axis.vertical, bool reverse = false, ScrollController controller = null, bool? primary = default(bool? ), ScrollPhysics physics = null, bool shrinkWrap = false, EdgeInsets padding = null, SliverGridDelegate gridDelegate = null, SliverChildDelegate childrenDelegate = null, float? cacheExtent = default(float? ), DragStartBehavior dragStartBehavior = DragStartBehavior.start)
Parameters
Type | Name | Description |
---|---|---|
Key | key | |
Axis | scrollDirection | |
Boolean | reverse | |
ScrollController | controller | |
Nullable<Boolean> | primary | |
ScrollPhysics | physics | |
Boolean | shrinkWrap | |
EdgeInsets | padding | |
SliverGridDelegate | gridDelegate | |
SliverChildDelegate | childrenDelegate | |
Nullable<Single> | cacheExtent | |
DragStartBehavior | dragStartBehavior |
Returns
Type | Description |
---|---|
GridView |
extent(Key, Axis, Boolean, ScrollController, Nullable<Boolean>, ScrollPhysics, Boolean, EdgeInsets, Nullable<Single>, Single, Single, Single, Boolean, Boolean, List<Widget>, DragStartBehavior)
Declaration
public static GridView extent(Key key = null, Axis scrollDirection = Axis.vertical, bool reverse = false, ScrollController controller = null, bool? primary = default(bool? ), ScrollPhysics physics = null, bool shrinkWrap = false, EdgeInsets padding = null, float? maxCrossAxisExtent = default(float? ), float mainAxisSpacing = 0F, float crossAxisSpacing = 0F, float childAspectRatio = 1F, bool addAutomaticKeepAlives = true, bool addRepaintBoundaries = true, List<Widget> children = null, DragStartBehavior dragStartBehavior = DragStartBehavior.start)
Parameters
Type | Name | Description |
---|---|---|
Key | key | |
Axis | scrollDirection | |
Boolean | reverse | |
ScrollController | controller | |
Nullable<Boolean> | primary | |
ScrollPhysics | physics | |
Boolean | shrinkWrap | |
EdgeInsets | padding | |
Nullable<Single> | maxCrossAxisExtent | |
Single | mainAxisSpacing | |
Single | crossAxisSpacing | |
Single | childAspectRatio | |
Boolean | addAutomaticKeepAlives | |
Boolean | addRepaintBoundaries | |
List<Widget> | children | |
DragStartBehavior | dragStartBehavior |
Returns
Type | Description |
---|---|
GridView |