updateTimerLabelText method

void updateTimerLabelText()

Implementation

void updateTimerLabelText() {
  int currentTimeStamp = DateTime.now().millisecondsSinceEpoch;
  int totalSeconds =
      ((currentTimeStamp - RoomStore.to.timeStampOnEnterRoom) / 1000)
          .abs()
          .floor();

  updateTimer(totalSeconds: totalSeconds);

  topMenuTimer = Timer.periodic(const Duration(seconds: 1), (timer) {
    totalSeconds += 1;
    updateTimer(totalSeconds: totalSeconds);
  });
}