@ -1,4 +1,5 @@
 
		
	
		
			
				import  ' dart:async ' ;  
		
	
		
			
				import  ' dart:developer ' ;  
		
	
		
			
				
 
		
	
		
			
				import  ' package:appinio_swiper/appinio_swiper.dart ' ;  
		
	
		
			
				import  ' package:easy_localization/easy_localization.dart ' ;  
		
	
	
		
			
				
					
						
							
								 
						
						
							
								 
						
						
					 
				
			
			@ -414,13 +415,16 @@ class MarathonProvider extends ChangeNotifier {
 
		
	
		
			
				    notifyListeners ( ) ; 
 
		
	
		
			
				  } 
 
		
	
		
			
				
 
		
	
		
			
				  void  updateCurrentQuestionOptionStatus ( QuestionsOptionStatus  status ,  int  )  { 
 
		
	
		
			
				  void  updateCurrentQuestionOptionStatus ( { required  QuestionsOptionStatus  status ,  required  int  selectedOptIndex,  required   int correctOptionIn  dex} )  { 
 
		
	
		
			
				    for  ( int  i  =  0 ;  i  <  currentQuestion . questionOptions ! . length ;  i + + )  { 
 
		
	
		
			
				      currentQuestion . questionOptions ! [ i ] . optionStatus  =  QuestionsOptionStatus . unSelected ; 
 
		
	
		
			
				    } 
 
		
	
		
			
				    currentQuestion . questionOptions ! [ index ] . optionStatus  =  status ; 
 
		
	
		
			
				    selectedOptionId  =  currentQuestion . questionOptions ! [ index ] . id ; 
 
		
	
		
			
				    selectedOptionIndex  =  index ; 
 
		
	
		
			
				    if  ( status  = =  QuestionsOptionStatus . wrong )  { 
 
		
	
		
			
				      currentQuestion . questionOptions ! [ correctOptionIndex ] . optionStatus  =  QuestionsOptionStatus . correct ;  / /  if  person ' s answer is wrong we have to show him the actual right answer 
 
		
	
		
			
				    } 
 
		
	
		
			
				    currentQuestion . questionOptions ! [ selectedOptIndex ] . optionStatus  =  status ; 
 
		
	
		
			
				    selectedOptionId  =  currentQuestion . questionOptions ! [ selectedOptIndex ] . id ; 
 
		
	
		
			
				    selectedOptionIndex  =  selectedOptIndex ; 
 
		
	
		
			
				    notifyListeners ( ) ; 
 
		
	
		
			
				  } 
 
		
	
		
			
				
 
		
	
	
		
			
				
					
						
						
						
							
								 
						
					 
				
			
			@ -435,22 +439,30 @@ class MarathonProvider extends ChangeNotifier {
 
		
	
		
			
				  } 
 
		
	
		
			
				
 
		
	
		
			
				  void  getCorrectAnswerAndUpdateAnswerColor ( )  { 
 
		
	
		
			
				    log ( " correctOptionIndex " ) ; 
 
		
	
		
			
				
 
		
	
		
			
				    callCountThreshold  =  1 ; 
 
		
	
		
			
				    int  correctOptionIndex  =  - 1 ; 
 
		
	
		
			
				    if  ( demoMarathonDetailModel . displayCorrectAnswer  ? ?  false )  { 
 
		
	
		
			
				      correctOptionIndex  =  currentQuestion . questionOptions ! . indexWhere ( ( QuestionOptions  element )  = >  element . isCorrectOption  ? ?  false ) ; 
 
		
	
		
			
				      log ( " correctOptionIndex:  $ correctOptionIndex " ) ; 
 
		
	
		
			
				    } 
 
		
	
		
			
				
 
		
	
		
			
				    if  ( selectedOptionIndex  ! =  null )  { 
 
		
	
		
			
				      scheduleMicrotask ( ( )  async  { 
 
		
	
		
			
				        if  ( AppState ( ) . getIsDemoMarathon )  { 
 
		
	
		
			
				          if  ( currentQuestion . questionOptions ! [ selectedOptionIndex ! ] . isCorrectOption ! )  { 
 
		
	
		
			
				            updateCurrentQuestionOptionStatus ( QuestionsOptionStatus . correct ,  selectedOptionIndex ! ) ; 
 
		
	
		
			
				            updateCurrentQuestionOptionStatus ( status:  QuestionsOptionStatus . correct ,  selectedOptIndex:  selectedOptionIndex ! ,  correctOptionIndex:  correctOptionIndex ) ; 
 
		
	
		
			
				          }  else  { 
 
		
	
		
			
				            updateCurrentQuestionOptionStatus ( QuestionsOptionStatus . wrong ,  selectedOptionIndex ! ) ; 
 
		
	
		
			
				            updateCurrentQuestionOptionStatus ( status:  QuestionsOptionStatus . wrong ,  selectedOptIndex:  selectedOptionIndex ! ,  correctOptionIndex:  correctOptionIndex ) ; 
 
		
	
		
			
				          } 
 
		
	
		
			
				        }  else  { 
 
		
	
		
			
				          await  callSubmitOptionApi ( ) . then ( ( bool  value )  async  { 
 
		
	
		
			
				            updateIsUserOutOfGame  =  ! value ; 
 
		
	
		
			
				            if  ( value )  { 
 
		
	
		
			
				              updateCurrentQuestionOptionStatus ( QuestionsOptionStatus . correct ,  selectedOptionIndex ! ) ; 
 
		
	
		
			
				              updateCurrentQuestionOptionStatus ( status:  QuestionsOptionStatus . correct ,  selectedOptIndex:  selectedOptionIndex ! ,  correctOptionIndex:  correctOptionIndex ) ; 
 
		
	
		
			
				            }  else  { 
 
		
	
		
			
				              updateCurrentQuestionOptionStatus ( QuestionsOptionStatus . wrong ,  selectedOptionIndex ! ) ; 
 
		
	
		
			
				              updateCurrentQuestionOptionStatus ( status:  QuestionsOptionStatus . wrong ,  selectedOptIndex:  selectedOptionIndex ! ,  correctOptionIndex:  correctOptionIndex ) ; 
 
		
	
		
			
				            } 
 
		
	
		
			
				          } ) ; 
 
		
	
		
			
				        } 
 
		
	
	
		
			
				
					
						
							
								 
						
						
							
								 
						
						
					 
				
			
			@ -551,7 +563,6 @@ class MarathonProvider extends ChangeNotifier {
 
		
	
		
			
				    notifyListeners ( ) ; 
 
		
	
		
			
				    isPrivilegedWithMarathon  =  checkIfPrivilegedForMarathon ( ) ; 
 
		
	
		
			
				    demoMarathonDetailModel  =  await  DemoMarathonRepo ( ) . getDemoMarathonDetails ( ) ; 
 
		
	
		
			
				
 
		
	
		
			
				    if  ( isPrivilegedWithMarathon )  { 
 
		
	
		
			
				      marathonDetailModel  =  await  MarathonApiClient ( ) . getMarathonDetails ( ) ; 
 
		
	
		
			
				      updateTotalSecondsToWaitForMarathon  =  marathonDetailModel . marathonBufferTime  ? ?  30 ;