|
|
|
@ -279,8 +279,8 @@ class MarathonProvider extends ChangeNotifier {
|
|
|
|
oneSec,
|
|
|
|
oneSec,
|
|
|
|
(Timer timer) async {
|
|
|
|
(Timer timer) async {
|
|
|
|
if (totalSecondsToWaitForWinner == 1) {
|
|
|
|
if (totalSecondsToWaitForWinner == 1) {
|
|
|
|
await callGetSelectedWinnersApi().whenComplete(() => updateQuestionCardStatus(QuestionCardStatus.winnerFound));
|
|
|
|
|
|
|
|
timer.cancel();
|
|
|
|
timer.cancel();
|
|
|
|
|
|
|
|
await callGetSelectedWinnersApi().whenComplete(() => updateQuestionCardStatus(QuestionCardStatus.winnerFound));
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
} else if (totalSecondsToWaitForWinner == 15) {
|
|
|
|
} else if (totalSecondsToWaitForWinner == 15) {
|
|
|
|
totalSecondsToWaitForWinner--;
|
|
|
|
totalSecondsToWaitForWinner--;
|
|
|
|
@ -353,12 +353,15 @@ class MarathonProvider extends ChangeNotifier {
|
|
|
|
gapTimeImage = currentQuestion.gapImage;
|
|
|
|
gapTimeImage = currentQuestion.gapImage;
|
|
|
|
gapTimeText = currentQuestion.gapText;
|
|
|
|
gapTimeText = currentQuestion.gapText;
|
|
|
|
gapTimeType = currentQuestion.gapType;
|
|
|
|
gapTimeType = currentQuestion.gapType;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
startTimerForQuestion();
|
|
|
|
|
|
|
|
updateCardData();
|
|
|
|
if (Utils.isLoading) {
|
|
|
|
if (Utils.isLoading) {
|
|
|
|
Utils.hideLoading(AppRoutes.navigatorKey.currentContext!);
|
|
|
|
Utils.hideLoading(AppRoutes.navigatorKey.currentContext!);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
startTimerForQuestion();
|
|
|
|
if (!AppState().getIsDemoMarathon) {
|
|
|
|
updateCardData();
|
|
|
|
totalMarathoners = await MarathonApiClient().getMarathonersCount(marathonId: marathonDetailModel.id!);
|
|
|
|
totalMarathoners = await MarathonApiClient().getMarathonersCount(marathonId: marathonDetailModel.id!);
|
|
|
|
}
|
|
|
|
Navigator.pushReplacementNamed(AppRoutes.navigatorKey.currentContext!, AppRoutes.marathonScreen);
|
|
|
|
Navigator.pushReplacementNamed(AppRoutes.navigatorKey.currentContext!, AppRoutes.marathonScreen);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
currentQuestion = AppState().getIsDemoMarathon
|
|
|
|
currentQuestion = AppState().getIsDemoMarathon
|
|
|
|
|