Merge branch 'faiz_cs' into 'master'

Updating with the DEMO MARATHON

See merge request Cloud_Solution/mohemm-flutter-app!134
merge-requests/135/merge
haroon amjad 3 years ago
commit ed220b80a0

@ -172,8 +172,8 @@
{ {
"id": "dce4999c-5629-45f4-e4f6-08dae8b36b35", "id": "dce4999c-5629-45f4-e4f6-08dae8b36b35",
"titleEn": "1", "titleEn": "1",
"titleAr": "null", "titleAr": "1",
"questionId": 1, "questionId": "253fc396-dab9-41ca-82bd-511f98c5dee8",
"sequence": 1, "sequence": 1,
"image": "null", "image": "null",
"isCorrectOption": false "isCorrectOption": false

@ -508,8 +508,8 @@
"favorite": "My Favorites", "favorite": "My Favorites",
"searchfromchat": "Search from chat", "searchfromchat": "Search from chat",
"yourAnswerCorrect": "Your answer is correct", "yourAnswerCorrect": "Your answer is correct",
"youMissedTheQuestion": "You ran out of time. You are out of the game. But you can continue and as a viewer.", "youMissedTheQuestion": "You ran out of time. You are out of the game. But you can continue as a viewer.",
"wrongAnswer": "Your answer is Incorrect. You are out of the game. But you can continue and as a viewer.", "wrongAnswer": "Your answer is Incorrect. You are out of the game. But you can continue as a viewer.",
"oops": "Ooopsss!!!!", "oops": "Ooopsss!!!!",
"winner": "WINNER", "winner": "WINNER",
"youWantToLeaveMarathon": "Are you sure you want to go back? You will be out of the contest.", "youWantToLeaveMarathon": "Are you sure you want to go back? You will be out of the contest.",

@ -17,6 +17,7 @@ class DemoMarathonRepo {
} }
Future<QuestionModel> getDemoNextQuestion({required int currentQuestionNumber}) async { Future<QuestionModel> getDemoNextQuestion({required int currentQuestionNumber}) async {
print("currentNumber: $currentQuestionNumber");
String response = await rootBundle.loadString('assets/json/demo_questions_marathon'); String response = await rootBundle.loadString('assets/json/demo_questions_marathon');
List json = jsonDecode(response); List json = jsonDecode(response);
logger.i("json in getDemoNextQuestion: $json"); logger.i("json in getDemoNextQuestion: $json");

@ -1034,8 +1034,8 @@ class CodegenLoader extends AssetLoader {
"favorite": "My Favorites", "favorite": "My Favorites",
"searchfromchat": "Search from chat", "searchfromchat": "Search from chat",
"yourAnswerCorrect": "Your answer is correct", "yourAnswerCorrect": "Your answer is correct",
"youMissedTheQuestion": "You ran out of time. You are out of the game. But you can continue and as a viewer.", "youMissedTheQuestion": "You ran out of time. You are out of the game. But you can continue as a viewer.",
"wrongAnswer": "Your answer is Incorrect. You are out of the game. But you can continue and as a viewer.", "wrongAnswer": "Your answer is Incorrect. You are out of the game. But you can continue as a viewer.",
"oops": "Ooopsss!!!!", "oops": "Ooopsss!!!!",
"winner": "WINNER", "winner": "WINNER",
"youWantToLeaveMarathon": "Are you sure you want to go back? You will be out of the contest.", "youWantToLeaveMarathon": "Are you sure you want to go back? You will be out of the contest.",

@ -125,7 +125,7 @@ class CountdownTimerForDetailScreen extends StatelessWidget {
int remainingTimeInMinutes = DateTime.parse(provider.marathonDetailModel.startTime!).difference(DateTime.now()).inMinutes; int remainingTimeInMinutes = DateTime.parse(provider.marathonDetailModel.startTime!).difference(DateTime.now()).inMinutes;
if (remainingTimeInMinutes <= 30) { if (remainingTimeInMinutes <= 30) {
scheduleMicrotask(() { scheduleMicrotask(() {
provider.canPlayDemo = true; provider.canPlayDemo = false;
}); });
} }
} }

Loading…
Cancel
Save