buildButton method

Widget buildButton(
  1. SwiperPluginConfig config,
  2. Color color,
  3. IconData iconDaga,
  4. int quarterTurns,
  5. bool previous,
)

Implementation

Widget buildButton(SwiperPluginConfig config, Color color, IconData iconDaga,
    int quarterTurns, bool previous) {
  return new GestureDetector(
    behavior: HitTestBehavior.opaque,
    onTap: () {
      if (previous) {
        config.controller.previous(animation: true);
      } else {
        config.controller.next(animation: true);
      }
    },
    child: Padding(
        padding: padding,
        child: RotatedBox(
            quarterTurns: quarterTurns,
            child: Icon(
              iconDaga,
              semanticLabel: previous ? "Previous" : "Next",
              size: size,
              color: color,
            ))),
  );
}