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"); }
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"); }
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"); }