|
|
|
|
@ -31,7 +31,7 @@ class MarathonProgressContainer extends StatelessWidget {
|
|
|
|
|
padding: const EdgeInsets.symmetric(vertical: 5, horizontal: 8),
|
|
|
|
|
child: "${provider.currentQuestionNumber.toString()} / ${provider.marathonDetailModel.totalQuestions.toString()} ${LocaleKeys.question.tr()}".toText12(color: MyColors.white),
|
|
|
|
|
),
|
|
|
|
|
"${provider.totalMarathoners} ${LocaleKeys.marathoners.tr()}".toText14(),
|
|
|
|
|
"${provider.totalMarathoners} ${provider.totalMarathoners == 1 ? LocaleKeys.marathoner.tr() : LocaleKeys.marathoners.tr()}".toText14(),
|
|
|
|
|
provider.questionCardStatus == QuestionCardStatus.question
|
|
|
|
|
? "00:${(provider.totalCurrentQuestionTime - provider.currentGapTime) < 10 ? "0${provider.totalCurrentQuestionTime - provider.currentGapTime}" : provider.totalCurrentQuestionTime - provider.currentGapTime}"
|
|
|
|
|
.toText18(color: provider.totalCurrentQuestionTime - provider.currentGapTime < 5 ? MyColors.redColor : MyColors.black)
|
|
|
|
|
@ -46,9 +46,7 @@ class MarathonProgressContainer extends StatelessWidget {
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
"${provider.currentQuestionNumber == 1 ? 0 : (((provider.currentQuestionNumber - 1) / provider.marathonDetailModel.totalQuestions!) * 100).toInt()}% ${LocaleKeys.completed.tr()}"
|
|
|
|
|
.toText14(),
|
|
|
|
|
provider.isUserOutOfGame
|
|
|
|
|
? LocaleKeys.youAreOutOfContest.tr().toText14(color: MyColors.redColor)
|
|
|
|
|
: const SizedBox(),
|
|
|
|
|
provider.isUserOutOfGame ? LocaleKeys.youAreOutOfContest.tr().toText14(color: MyColors.redColor) : const SizedBox(),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
@ -97,21 +95,28 @@ class MarathonProgressContainer extends StatelessWidget {
|
|
|
|
|
Widget roundContainer(Color color, bool isNeedLeftBorder) {
|
|
|
|
|
if (isNeedLeftBorder) {
|
|
|
|
|
return Row(
|
|
|
|
|
children: [
|
|
|
|
|
Divider(thickness: 6, color: color).expanded,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Divider(
|
|
|
|
|
thickness: 6,
|
|
|
|
|
color: color,
|
|
|
|
|
).expanded,
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.zero,
|
|
|
|
|
padding: EdgeInsets.zero,
|
|
|
|
|
width: 10,
|
|
|
|
|
height: 10,
|
|
|
|
|
decoration: BoxDecoration(shape: BoxShape.circle, color: color),
|
|
|
|
|
decoration: BoxDecoration(shape: BoxShape.circle, color: color, border: Border.all(color: color, width: 2)),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
).expanded;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return Container(
|
|
|
|
|
margin: EdgeInsets.zero,
|
|
|
|
|
padding: EdgeInsets.zero,
|
|
|
|
|
width: 10,
|
|
|
|
|
height: 10,
|
|
|
|
|
decoration: BoxDecoration(shape: BoxShape.circle, color: color),
|
|
|
|
|
decoration: BoxDecoration(shape: BoxShape.circle, color: color, border: Border.all(color: color, width: 2)),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|