redoWhiteBoard method

  1. @override
Future<void> redoWhiteBoard()
override

Implementation

@override
Future<void> redoWhiteBoard() async {
  if (_cachedPaints.length == _localPaints.length || roomId == null) {
    return;
  }

  final redoModel = _cachedPaints[_localPaints.length];
  _localPaints.add(redoModel);

  _socketEmiter.updateWhiteBoard(
    roomId!,
    DrawActionEnum.updateAdd.action,
    redoModel,
  );
  _emitWhiteBoard();
}