public static GridView custom(
     Key key = null,
     Axis scrollDirection                 = Axis.vertical,
     bool reverse                         = false,
     ScrollController controller          = null,
     bool?primary                         = null,
     ScrollPhysics physics                = null,
     bool shrinkWrap                      = false,
     EdgeInsets padding                   = null,
     SliverGridDelegate gridDelegate      = null,
     SliverChildDelegate childrenDelegate = null,
     float?cacheExtent                    = null,
     DragStartBehavior dragStartBehavior  = DragStartBehavior.start
     )
 {
     return(new GridView(
                key: key,
                scrollDirection: scrollDirection,
                reverse: reverse,
                controller: controller,
                primary: primary,
                physics: physics,
                shrinkWrap: shrinkWrap,
                padding: padding,
                gridDelegate: gridDelegate,
                childrenDelegate: childrenDelegate,
                cacheExtent: cacheExtent,
                dragStartBehavior: dragStartBehavior
                ));
 }
 public static GridView builder(
     Key key = null,
     Axis scrollDirection             = Axis.vertical,
     bool reverse                     = false,
     ScrollController controller      = null,
     bool?primary                     = null,
     ScrollPhysics physics            = null,
     bool shrinkWrap                  = false,
     EdgeInsets padding               = null,
     SliverGridDelegate gridDelegate  = null,
     IndexedWidgetBuilder itemBuilder = null,
     int?itemCount                    = null,
     bool addAutomaticKeepAlives      = true,
     bool addRepaintBoundaries        = true,
     float?cacheExtent                = null
     )
 {
     return(new GridView(
                key: key,
                scrollDirection: scrollDirection,
                reverse: reverse,
                controller: controller,
                primary: primary,
                physics: physics,
                shrinkWrap: shrinkWrap,
                padding: padding,
                gridDelegate: gridDelegate,
                itemBuilder: itemBuilder,
                itemCount: itemCount,
                addAutomaticKeepAlives: addAutomaticKeepAlives,
                addRepaintBoundaries: addRepaintBoundaries,
                cacheExtent: cacheExtent
                ));
 }
 public GridView(
     Key key = null,
     Axis scrollDirection                 = Axis.vertical,
     bool reverse                         = false,
     ScrollController controller          = null,
     bool?primary                         = null,
     ScrollPhysics physics                = null,
     bool shrinkWrap                      = false,
     EdgeInsets padding                   = null,
     SliverGridDelegate gridDelegate      = null,
     SliverChildDelegate childrenDelegate = null,
     float?cacheExtent                    = null,
     DragStartBehavior dragStartBehavior  = DragStartBehavior.start
     ) : base(
         key: key,
         scrollDirection: scrollDirection,
         reverse: reverse,
         controller: controller,
         primary: primary,
         physics: physics,
         shrinkWrap: shrinkWrap,
         padding: padding,
         cacheExtent: cacheExtent,
         dragStartBehavior: dragStartBehavior
         )
 {
     D.assert(gridDelegate != null);
     D.assert(childrenDelegate != null);
     this.gridDelegate     = gridDelegate;
     this.childrenDelegate = childrenDelegate;
 }
 public GridView(
     Key key = null,
     Axis scrollDirection             = Axis.vertical,
     bool reverse                     = false,
     ScrollController controller      = null,
     bool?primary                     = null,
     ScrollPhysics physics            = null,
     bool shrinkWrap                  = false,
     EdgeInsets padding               = null,
     SliverGridDelegate gridDelegate  = null,
     IndexedWidgetBuilder itemBuilder = null,
     int?itemCount                    = null,
     bool addAutomaticKeepAlives      = true,
     bool addRepaintBoundaries        = true,
     float?cacheExtent                = null
     ) : base(
         key: key,
         scrollDirection: scrollDirection,
         reverse: reverse,
         controller: controller,
         primary: primary,
         physics: physics,
         shrinkWrap: shrinkWrap,
         padding: padding,
         cacheExtent: cacheExtent
         )
 {
     this.gridDelegate     = gridDelegate;
     this.childrenDelegate = new SliverChildBuilderDelegate(
         itemBuilder,
         childCount: itemCount,
         addAutomaticKeepAlives: addAutomaticKeepAlives,
         addRepaintBoundaries: addRepaintBoundaries
         );
 }
 public GridView(
     Key key = null,
     Axis scrollDirection            = Axis.vertical,
     bool reverse                    = false,
     ScrollController controller     = null,
     bool?primary                    = null,
     ScrollPhysics physics           = null,
     bool shrinkWrap                 = false,
     EdgeInsets padding              = null,
     SliverGridDelegate gridDelegate = null,
     bool addAutomaticKeepAlives     = true,
     bool addRepaintBoundaries       = true,
     float?cacheExtent               = null,
     List <Widget> children          = null
     ) : base(
         key: key,
         scrollDirection: scrollDirection,
         reverse: reverse,
         controller: controller,
         primary: primary,
         physics: physics,
         shrinkWrap: shrinkWrap,
         padding: padding,
         cacheExtent: cacheExtent
         )
 {
     D.assert(gridDelegate != null);
     this.childrenDelegate = new SliverChildListDelegate(
         children ?? new List <Widget>(),
         addAutomaticKeepAlives: addAutomaticKeepAlives,
         addRepaintBoundaries: addRepaintBoundaries
         );
 }
 public SliverGrid(
     Key key = null,
     SliverChildDelegate layoutDelegate = null,
     SliverGridDelegate gridDelegate    = null
     ) : base(key: key, del: layoutDelegate)
 {
     D.assert(layoutDelegate != null);
     D.assert(gridDelegate != null);
     this.gridDelegate = gridDelegate;
 }
 public override bool shouldRelayout(SliverGridDelegate oldDelegate)
 {
     return(false);
 }
Exemple #8
0
 public override bool shouldRelayout(SliverGridDelegate sliverGridDelegate) => false;