scrollHorizontal method

Widget scrollHorizontal(
  1. {Key key,
  2. ScrollController controller,
  3. ScrollPhysics physics,
  4. EdgeInsetsGeometry padding}
)

Extension method to directly access SingleChildScrollView horizontally with any widget without wrapping or with dot operator.

Implementation

Widget scrollHorizontal(
        {Key key,
        ScrollController controller,
        ScrollPhysics physics,
        EdgeInsetsGeometry padding}) =>
    SingleChildScrollView(
      key: key,
      child: this,
      scrollDirection: Axis.horizontal,
    );