Exemplo n.º 1
0
 public GridView(
     Key key = null,
     Axis scrollDirection            = Axis.vertical,
     bool reverse                    = false,
     ScrollController controller     = null,
     bool?primary                    = null,
     ScrollPhysics physics           = null,
     bool shrinkWrap                 = false,
     EdgeInsetsGeometry 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);
     childrenDelegate = new SliverChildListDelegate(
         children ?? new List <Widget>(),
         addAutomaticKeepAlives: addAutomaticKeepAlives,
         addRepaintBoundaries: addRepaintBoundaries
         );
 }
Exemplo n.º 2
0
 public GridView(
     Key key = null,
     Axis scrollDirection                = Axis.vertical,
     bool reverse                        = false,
     ScrollController controller         = null,
     bool?primary                        = null,
     ScrollPhysics physics               = null,
     bool shrinkWrap                     = false,
     EdgeInsetsGeometry padding          = null,
     float?maxCrossAxisExtent            = null,
     float mainAxisSpacing               = 0.0f,
     float crossAxisSpacing              = 0.0f,
     float childAspectRatio              = 1.0f,
     bool addAutomaticKeepAlives         = true,
     bool addRepaintBoundaries           = true,
     bool addSemanticIndexes             = true,
     List <Widget> children              = null,
     DragStartBehavior dragStartBehavior = DragStartBehavior.start
     ) : base(
         key: key,
         scrollDirection: scrollDirection,
         reverse: reverse,
         controller: controller,
         primary: primary,
         physics: physics,
         shrinkWrap: shrinkWrap,
         padding: padding,
         dragStartBehavior: dragStartBehavior
         )
 {
     gridDelegate = new SliverGridDelegateWithMaxCrossAxisExtent(
         maxCrossAxisExtent: maxCrossAxisExtent ?? 0,
         mainAxisSpacing: mainAxisSpacing,
         crossAxisSpacing: crossAxisSpacing,
         childAspectRatio: childAspectRatio
         );
     childrenDelegate = new SliverChildListDelegate(
         children ?? new List <Widget> {
     },
         addAutomaticKeepAlives: addAutomaticKeepAlives,
         addRepaintBoundaries: addRepaintBoundaries
         );
 }
Exemplo n.º 3
0
 public PageView(
     Key key = null,
     Axis scrollDirection                = Axis.horizontal,
     bool reverse                        = false,
     PageController controller           = null,
     ScrollPhysics physics               = null,
     bool pageSnapping                   = true,
     ValueChanged <int> onPageChanged    = null,
     List <Widget> children              = null,
     DragStartBehavior dragStartBehavior = DragStartBehavior.start,
     bool allowImplicitScrolling         = false
     ) : base(key: key)
 {
     this.scrollDirection        = scrollDirection;
     this.reverse                = reverse;
     this.physics                = physics;
     this.pageSnapping           = pageSnapping;
     this.onPageChanged          = onPageChanged;
     this.dragStartBehavior      = dragStartBehavior;
     this.controller             = controller ?? PageViewUtils._defaultPageController;
     this.allowImplicitScrolling = allowImplicitScrolling;
     childrenDelegate            = new SliverChildListDelegate(children ?? new List <Widget>());
 }
Exemplo n.º 4
0
 public ListView(
     Key key = null,
     Axis scrollDirection                = Axis.vertical,
     bool reverse                        = false,
     ScrollController controller         = null,
     bool?primary                        = null,
     ScrollPhysics physics               = null,
     bool shrinkWrap                     = false,
     EdgeInsetsGeometry padding          = null,
     float?itemExtent                    = null,
     bool addAutomaticKeepAlives         = true,
     bool addRepaintBoundaries           = true,
     float?cacheExtent                   = null,
     List <Widget> children              = null,
     DragStartBehavior dragStartBehavior = DragStartBehavior.start,
     ScrollViewKeyboardDismissBehavior keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual
     ) : base(
         key: key,
         scrollDirection: scrollDirection,
         reverse: reverse,
         controller: controller,
         primary: primary,
         physics: physics,
         shrinkWrap: shrinkWrap,
         padding: padding,
         cacheExtent: cacheExtent,
         dragStartBehavior: dragStartBehavior,
         keyboardDismissBehavior: keyboardDismissBehavior
         )
 {
     this.itemExtent  = itemExtent;
     childrenDelegate = new SliverChildListDelegate(
         children,
         addAutomaticKeepAlives: addAutomaticKeepAlives,
         addRepaintBoundaries: addRepaintBoundaries
         );
 }