コード例 #1
0
        public static AxisDirection applyGrowthDirectionToAxisDirection(
            AxisDirection axisDirection, GrowthDirection growthDirection)
        {
            switch (growthDirection)
            {
            case GrowthDirection.forward:
                return(axisDirection);

            case GrowthDirection.reverse:
                return(AxisUtils.flipAxisDirection(axisDirection));
            }

            throw new Exception("unknown growthDirection");
        }
コード例 #2
0
        AxisDirection?_getDirection(BuildContext context)
        {
            switch (widget.scrollDirection)
            {
            case Axis.horizontal:
                D.assert(WidgetsD.debugCheckHasDirectionality(context));
                TextDirection textDirection = Directionality.of(context);
                AxisDirection?axisDirection = AxisUtils.textDirectionToAxisDirection(textDirection);
                return(widget.reverse ? AxisUtils.flipAxisDirection(axisDirection) : axisDirection);

            case Axis.vertical:
                return(widget.reverse ? AxisDirection.up : AxisDirection.down);
            }

            throw new UIWidgetsError("fail to get axis direction");
        }
コード例 #3
0
        public static AxisDirection?applyGrowthDirectionToAxisDirection(
            AxisDirection?axisDirection, GrowthDirection?growthDirection)
        {
            D.assert(axisDirection != null);
            D.assert(growthDirection != null);
            switch (growthDirection)
            {
            case GrowthDirection.forward:
                return(axisDirection);

            case GrowthDirection.reverse:
                return(AxisUtils.flipAxisDirection(axisDirection));
            }

            throw new Exception("unknown growthDirection");
        }