handleBarrages method

void handleBarrages()

Implementation

void handleBarrages() {
  double totalSpaceWidth = (widget.rowNum - 1) * widget.itemSpaceWidth;
  _controller.totalMapBarrageItems.forEach((key, value) {
    BarrageLineController ctrl = controllers[key];
    dispatch(ctrl, value, key, _controller.slideWidth + totalSpaceWidth);
  });

  if (_controller.totalBarrageItems.isNotEmpty) {
    for (int i = 0; i < controllers.length; i++) {
      List<BarrageItem> templist = [];
      templist.addAll(_controller.totalBarrageItems);
      dispatch(controllers[i], templist, i, _controller.slideWidth + totalSpaceWidth);
    }
  }
}