|
|
|
@ -78,7 +78,12 @@ class MarathonScreen extends StatelessWidget {
|
|
|
|
16.height,
|
|
|
|
16.height,
|
|
|
|
Column(
|
|
|
|
Column(
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
(AppState().isArabic(context) ? AppState().memberInformationList!.eMPLOYEEDISPLAYNAMEAr : AppState().memberInformationList!.eMPLOYEEDISPLAYNAMEEn)!.toText22(
|
|
|
|
displayLocalizedContent(
|
|
|
|
|
|
|
|
isPhoneLangArabic: AppState().isArabic(context),
|
|
|
|
|
|
|
|
selectedLanguage: provider.demoMarathonDetailModel.selectedLanguage!,
|
|
|
|
|
|
|
|
arabicContent: AppState().memberInformationList!.eMPLOYEEDISPLAYNAMEAr!,
|
|
|
|
|
|
|
|
englishContent: AppState().memberInformationList!.eMPLOYEEDISPLAYNAMEEn!,
|
|
|
|
|
|
|
|
).toText22(
|
|
|
|
color: MyColors.grey3AColor,
|
|
|
|
color: MyColors.grey3AColor,
|
|
|
|
isCentered: true,
|
|
|
|
isCentered: true,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -92,7 +97,12 @@ class MarathonScreen extends StatelessWidget {
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
"${LocaleKeys.sponsoredBy.tr()} ".toText14(color: MyColors.grey77Color),
|
|
|
|
"${LocaleKeys.sponsoredBy.tr()} ".toText14(color: MyColors.grey77Color),
|
|
|
|
(AppState().isArabic(context) ? provider.demoMarathonDetailModel.sponsors!.first.nameAr ?? "" : provider.demoMarathonDetailModel.sponsors!.first.nameEn ?? "").toText14(
|
|
|
|
displayLocalizedContent(
|
|
|
|
|
|
|
|
isPhoneLangArabic: AppState().isArabic(context),
|
|
|
|
|
|
|
|
selectedLanguage: provider.demoMarathonDetailModel.selectedLanguage!,
|
|
|
|
|
|
|
|
englishContent: provider.demoMarathonDetailModel.sponsors!.first.nameEn!,
|
|
|
|
|
|
|
|
arabicContent: provider.demoMarathonDetailModel.sponsors!.first.nameAr!,
|
|
|
|
|
|
|
|
).toText14(
|
|
|
|
color: MyColors.darkTextColor,
|
|
|
|
color: MyColors.darkTextColor,
|
|
|
|
isBold: true,
|
|
|
|
isBold: true,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -160,7 +170,12 @@ class MarathonScreen extends StatelessWidget {
|
|
|
|
provider.iAmWinner
|
|
|
|
provider.iAmWinner
|
|
|
|
? Column(
|
|
|
|
? Column(
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
(AppState().isArabic(context) ? AppState().memberInformationList!.eMPLOYEEDISPLAYNAMEAr : AppState().memberInformationList!.eMPLOYEEDISPLAYNAMEEn)!.toText22(
|
|
|
|
displayLocalizedContent(
|
|
|
|
|
|
|
|
isPhoneLangArabic: AppState().isArabic(context),
|
|
|
|
|
|
|
|
selectedLanguage: provider.marathonDetailModel.selectedLanguage ?? 0,
|
|
|
|
|
|
|
|
arabicContent: AppState().memberInformationList!.eMPLOYEEDISPLAYNAMEAr ?? "",
|
|
|
|
|
|
|
|
englishContent: AppState().memberInformationList!.eMPLOYEEDISPLAYNAMEEn ?? "",
|
|
|
|
|
|
|
|
).toText22(
|
|
|
|
color: MyColors.grey3AColor,
|
|
|
|
color: MyColors.grey3AColor,
|
|
|
|
isCentered: true,
|
|
|
|
isCentered: true,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -173,7 +188,12 @@ class MarathonScreen extends StatelessWidget {
|
|
|
|
provider.selectedWinners!.length == 1
|
|
|
|
provider.selectedWinners!.length == 1
|
|
|
|
? Column(
|
|
|
|
? Column(
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
(AppState().isArabic(context) ? provider.selectedWinners![0].nameEn : provider.selectedWinners![0].nameEn)!.toText24(
|
|
|
|
displayLocalizedContent(
|
|
|
|
|
|
|
|
isPhoneLangArabic: AppState().isArabic(context),
|
|
|
|
|
|
|
|
selectedLanguage: provider.marathonDetailModel.selectedLanguage ?? 0,
|
|
|
|
|
|
|
|
arabicContent: provider.selectedWinners![0].nameAr ?? "",
|
|
|
|
|
|
|
|
englishContent: provider.selectedWinners![0].nameEn ?? "",
|
|
|
|
|
|
|
|
).toText24(
|
|
|
|
color: MyColors.grey3AColor,
|
|
|
|
color: MyColors.grey3AColor,
|
|
|
|
isCentered: true,
|
|
|
|
isCentered: true,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -191,7 +211,12 @@ class MarathonScreen extends StatelessWidget {
|
|
|
|
return Column(
|
|
|
|
return Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
(AppState().isArabic(context) ? provider.selectedWinners![index].nameEn : provider.selectedWinners![index].nameEn)!.toText16(
|
|
|
|
displayLocalizedContent(
|
|
|
|
|
|
|
|
isPhoneLangArabic: AppState().isArabic(context),
|
|
|
|
|
|
|
|
selectedLanguage: provider.marathonDetailModel.selectedLanguage ?? 0,
|
|
|
|
|
|
|
|
arabicContent: provider.selectedWinners![index].nameAr ?? "",
|
|
|
|
|
|
|
|
englishContent: provider.selectedWinners![index].nameEn ?? "",
|
|
|
|
|
|
|
|
).toText16(
|
|
|
|
color: MyColors.grey3AColor,
|
|
|
|
color: MyColors.grey3AColor,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
provider.selectedWinners![index].employeeId!.toText16(color: MyColors.grey57Color),
|
|
|
|
provider.selectedWinners![index].employeeId!.toText16(color: MyColors.grey57Color),
|
|
|
|
@ -206,7 +231,12 @@ class MarathonScreen extends StatelessWidget {
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
"${LocaleKeys.sponsoredBy.tr()} ".toText14(color: MyColors.grey77Color),
|
|
|
|
"${LocaleKeys.sponsoredBy.tr()} ".toText14(color: MyColors.grey77Color),
|
|
|
|
(AppState().isArabic(context) ? provider.marathonDetailModel.sponsors!.first.nameAr ?? "" : provider.marathonDetailModel.sponsors!.first.nameEn ?? "").toText14(
|
|
|
|
displayLocalizedContent(
|
|
|
|
|
|
|
|
isPhoneLangArabic: AppState().isArabic(context),
|
|
|
|
|
|
|
|
selectedLanguage: provider.marathonDetailModel.selectedLanguage!,
|
|
|
|
|
|
|
|
arabicContent: provider.marathonDetailModel.sponsors!.first.nameAr ?? "",
|
|
|
|
|
|
|
|
englishContent: provider.marathonDetailModel.sponsors!.first.nameEn ?? "",
|
|
|
|
|
|
|
|
).toText14(
|
|
|
|
color: MyColors.darkTextColor,
|
|
|
|
color: MyColors.darkTextColor,
|
|
|
|
isBold: true,
|
|
|
|
isBold: true,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -231,7 +261,7 @@ class MarathonScreen extends StatelessWidget {
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Widget getNameContainer(BuildContext context) {
|
|
|
|
Widget getNameContainer(BuildContext context, MarathonProvider provider) {
|
|
|
|
return Container(
|
|
|
|
return Container(
|
|
|
|
height: 50,
|
|
|
|
height: 50,
|
|
|
|
padding: const EdgeInsets.symmetric(horizontal: 20),
|
|
|
|
padding: const EdgeInsets.symmetric(horizontal: 20),
|
|
|
|
@ -243,8 +273,12 @@ class MarathonScreen extends StatelessWidget {
|
|
|
|
child: Row(
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
(AppState().isArabic(context) ? AppState().memberInformationList!.eMPLOYEEDISPLAYNAMEAr! : AppState().memberInformationList!.eMPLOYEEDISPLAYNAMEEn!)
|
|
|
|
displayLocalizedContent(
|
|
|
|
.toText17(isBold: true, color: MyColors.white),
|
|
|
|
isPhoneLangArabic: AppState().isArabic(context),
|
|
|
|
|
|
|
|
selectedLanguage: (!AppState().getIsDemoMarathon ? provider.marathonDetailModel.selectedLanguage : provider.demoMarathonDetailModel.selectedLanguage) ?? 0,
|
|
|
|
|
|
|
|
arabicContent: AppState().memberInformationList!.eMPLOYEEDISPLAYNAMEAr ?? "",
|
|
|
|
|
|
|
|
englishContent: AppState().memberInformationList!.eMPLOYEEDISPLAYNAMEEn ?? "",
|
|
|
|
|
|
|
|
).toText17(isBold: true, color: MyColors.white),
|
|
|
|
AppState().memberInformationList!.eMPLOYEENUMBER!.toText17(isBold: true, color: MyColors.white),
|
|
|
|
AppState().memberInformationList!.eMPLOYEENUMBER!.toText17(isBold: true, color: MyColors.white),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -310,7 +344,7 @@ class MarathonScreen extends StatelessWidget {
|
|
|
|
MarathonProgressContainer(provider: provider).paddingOnly(left: 21, right: 21),
|
|
|
|
MarathonProgressContainer(provider: provider).paddingOnly(left: 21, right: 21),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
if (provider.questionCardStatus == QuestionCardStatus.findingWinner && !provider.isUserOutOfGame) ...<Widget>[
|
|
|
|
if (provider.questionCardStatus == QuestionCardStatus.findingWinner && !provider.isUserOutOfGame) ...<Widget>[
|
|
|
|
getNameContainer(context),
|
|
|
|
getNameContainer(context, provider),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
QuestionCardBuilder(
|
|
|
|
QuestionCardBuilder(
|
|
|
|
onQuestion: (BuildContext context) => const QuestionCard(),
|
|
|
|
onQuestion: (BuildContext context) => const QuestionCard(),
|
|
|
|
|