示例#1
0
        public Scrollable(
            Key key = null,
            AxisDirection axisDirection     = AxisDirection.down,
            ScrollController controller     = null,
            ScrollPhysics physics           = null,
            ViewportBuilder viewportBuilder = null
            ) : base(key: key)
        {
            D.assert(viewportBuilder != null);

            this.axisDirection   = axisDirection;
            this.controller      = controller;
            this.physics         = physics;
            this.viewportBuilder = viewportBuilder;
        }
示例#2
0
 public _FixedExtentScrollable(
     float itemExtent,
     ViewportBuilder viewportBuilder,
     Key key = null,
     AxisDirection axisDirection = AxisDirection.down,
     ScrollController controller = null,
     ScrollPhysics physics       = null
     ) : base(
         key: key,
         axisDirection: axisDirection,
         controller: controller,
         physics: physics,
         viewportBuilder: viewportBuilder
         )
 {
     this.itemExtent = itemExtent;
 }
示例#3
0
        public Scrollable(
            Key key = null,
            AxisDirection?axisDirection     = AxisDirection.down,
            ScrollController controller     = null,
            ScrollPhysics physics           = null,
            ViewportBuilder viewportBuilder = null,
            ScrollIncrementCalculator incrementCalculator = null,
            DragStartBehavior dragStartBehavior           = DragStartBehavior.start
            ) : base(key: key)
        {
            D.assert(axisDirection != null);
            D.assert(viewportBuilder != null);

            this.axisDirection       = axisDirection.Value;
            this.controller          = controller;
            this.physics             = physics;
            this.viewportBuilder     = viewportBuilder;
            this.incrementCalculator = incrementCalculator;
            this.dragStartBehavior   = dragStartBehavior;
        }