merge fork
commit
2e8d6c4ede
@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
|
||||
<path style="fill:#E2E5E7;" d="M128,0c-17.6,0-32,14.4-32,32v448c0,17.6,14.4,32,32,32h320c17.6,0,32-14.4,32-32V128L352,0H128z"/>
|
||||
<path style="fill:#B0B7BD;" d="M384,128h96L352,0v96C352,113.6,366.4,128,384,128z"/>
|
||||
<polygon style="fill:#CAD1D8;" points="480,224 384,128 480,128 "/>
|
||||
<path style="fill:#F15642;" d="M416,416c0,8.8-7.2,16-16,16H48c-8.8,0-16-7.2-16-16V256c0-8.8,7.2-16,16-16h352c8.8,0,16,7.2,16,16
|
||||
V416z"/>
|
||||
<g>
|
||||
<path style="fill:#FFFFFF;" d="M88.368,384c-4.096-2.304-6.656-6.912-4.096-12.288l36.72-71.744c3.456-6.784,12.656-7.04,15.856,0
|
||||
l36.08,71.744c5.248,9.984-10.24,17.904-14.848,7.936l-5.632-11.248h-47.2l-5.52,11.248C97.712,384,92.992,384.912,88.368,384z
|
||||
M143.392,351.52l-14.464-31.616l-15.744,31.616H143.392z"/>
|
||||
<path style="fill:#FFFFFF;" d="M189.184,384c-4.096-2.304-6.656-6.912-4.096-12.288l36.704-71.744
|
||||
c3.456-6.784,12.672-7.04,15.872,0l36.064,71.744c5.248,9.984-10.24,17.904-14.832,7.936l-5.648-11.248h-47.2l-5.504,11.248
|
||||
C198.512,384,193.776,384.912,189.184,384z M244.192,351.52l-14.448-31.616l-15.728,31.616H244.192z"/>
|
||||
<path style="fill:#FFFFFF;" d="M282.416,339.088c0-24.688,15.488-45.904,44.912-45.904c11.136,0,19.952,3.312,29.296,11.376
|
||||
c3.456,3.184,3.84,8.832,0.384,12.4c-3.456,3.056-8.704,2.688-11.76-0.368c-5.248-5.504-10.624-7.024-17.92-7.024
|
||||
c-19.696,0-29.168,13.936-29.168,29.536c0,15.872,9.344,30.464,29.168,30.464c7.296,0,14.08-2.96,19.952-8.192
|
||||
c3.968-3.072,9.472-1.552,11.776,1.536c2.048,2.816,3.056,7.536-1.408,12.016c-8.96,8.336-19.696,9.984-30.336,9.984
|
||||
C296.368,384.912,282.416,363.792,282.416,339.088z"/>
|
||||
</g>
|
||||
<path style="fill:#CAD1D8;" d="M400,432H96v16h304c8.8,0,16-7.2,16-16v-16C416,424.8,408.8,432,400,432z"/>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.1 KiB |
@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
|
||||
<path style="fill:#E2E5E7;" d="M128,0c-17.6,0-32,14.4-32,32v448c0,17.616,14.4,32,32,32h320c17.6,0,32-14.384,32-32V128L352,0H128z
|
||||
"/>
|
||||
<path style="fill:#B0B7BD;" d="M384,128h96L352,0v96C352,113.6,366.4,128,384,128z"/>
|
||||
<polygon style="fill:#CAD1D8;" points="480,224 384,128 480,128 "/>
|
||||
<path style="fill:#50BEE8;" d="M416,416c0,8.8-7.2,16-16,16H48c-8.8,0-16-7.2-16-16V256c0-8.8,7.2-16,16-16h352c8.8,0,16,7.2,16,16
|
||||
V416z"/>
|
||||
<g>
|
||||
<path style="fill:#FFFFFF;" d="M117.184,327.84v47.344c0,5.632-4.592,8.832-9.216,8.832c-4.096,0-7.664-3.2-7.664-8.832v-72.032
|
||||
c0-6.64,5.632-8.832,7.664-8.832c3.712,0,5.888,2.192,8.064,4.608l28.16,38l29.152-39.408c4.24-5.248,14.592-3.2,14.592,5.632
|
||||
v72.032c0,5.632-3.6,8.832-7.68,8.832c-4.592,0-8.192-3.2-8.192-8.832V327.84l-21.232,26.88c-4.592,5.632-10.352,5.632-14.576,0
|
||||
L117.184,327.84z"/>
|
||||
<path style="fill:#FFFFFF;" d="M210.288,303.152c0-4.224,3.328-8.832,8.704-8.832h29.552c16.64,0,31.616,11.136,31.616,32.496
|
||||
c0,20.224-14.976,31.472-31.616,31.472h-21.36v16.896c0,5.632-3.584,8.832-8.192,8.832c-4.224,0-8.704-3.2-8.704-8.832V303.152z
|
||||
M227.168,310.448v31.856h21.36c8.576,0,15.36-7.552,15.36-15.488c0-8.96-6.784-16.368-15.36-16.368L227.168,310.448
|
||||
L227.168,310.448z"/>
|
||||
<path style="fill:#FFFFFF;" d="M322.064,311.472h-21.872c-10.736,0-10.096-15.984,0-15.984h39.152c7.792,0,11.376,8.96,5.632,14.72
|
||||
l-21.232,19.824c15.616-1.152,27.888,10.48,27.888,24.816c0,15.728-11.136,29.168-34.544,29.168
|
||||
c-10.24,0-20.336-4.224-26.224-13.44c-6.144-9.072,7.024-17.776,13.936-8.832c3.328,4.352,8.704,6.528,14.448,6.528
|
||||
c7.808,0,15.488-3.328,15.488-13.44c0-13.296-16.256-11.248-25.072-10.352c-10.752,2.048-13.936-9.6-7.664-14.448L322.064,311.472z
|
||||
"/>
|
||||
</g>
|
||||
<path style="fill:#CAD1D8;" d="M400,432H96v16h304c8.8,0,16-7.2,16-16v-16C416,424.8,408.8,432,400,432z"/>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.2 KiB |
@ -0,0 +1,522 @@
|
||||
[
|
||||
{
|
||||
"id": "b8f10b10-221c-495d-b99b-6a8094892549",
|
||||
"titleEn": "How many time Uruguay won FIFA World Cups?",
|
||||
"titleAr": "How many time Uruguay won FIFA World Cups?",
|
||||
"marathonId": "979813be-eafa-4d3e-d27e-08dae8a08a3b",
|
||||
"questionTypeId": 1,
|
||||
"questionTime": 10,
|
||||
"nextQuestGap": 5,
|
||||
"gapType": 0,
|
||||
"gapText": null,
|
||||
"gapImage": "Questions/51b598b6-c837-45be-8734-1374978bd426_congratulations-gif.gif",
|
||||
"questOptionsLimit": 0,
|
||||
"remainingParticipantCount": 1,
|
||||
"questionOptions": [
|
||||
{
|
||||
"id": "772e6062-543c-4ddc-e516-08dae8b36b35",
|
||||
"titleEn": "1",
|
||||
"titleAr": "1",
|
||||
"questionId": "b8f10b10-221c-495d-b99b-6a8094892549",
|
||||
"sequence": 1,
|
||||
"image": "null",
|
||||
"isCorrectOption": false
|
||||
},
|
||||
{
|
||||
"id": "ea3c673e-78c7-41dd-e517-08dae8b36b35",
|
||||
"titleEn": "2",
|
||||
"titleAr": "2",
|
||||
"questionId": "b8f10b10-221c-495d-b99b-6a8094892549",
|
||||
"sequence": 3,
|
||||
"image": "null",
|
||||
"isCorrectOption": true
|
||||
},
|
||||
{
|
||||
"id": "7adbdfec-ef77-417e-e518-08dae8b36b35",
|
||||
"titleEn": "3",
|
||||
"titleAr": "3",
|
||||
"questionId": "b8f10b10-221c-495d-b99b-6a8094892549",
|
||||
"sequence": 2,
|
||||
"image": "null",
|
||||
"isCorrectOption": false
|
||||
},
|
||||
{
|
||||
"id": "895eab85-e321-4d3e-e519-08dae8b36b35",
|
||||
"titleEn": "4",
|
||||
"titleAr": "4",
|
||||
"questionId": "b8f10b10-221c-495d-b99b-6a8094892549",
|
||||
"sequence": 4,
|
||||
"image": "null",
|
||||
"isCorrectOption": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "0d60d55f-4067-48f9-9ace-b6309c6a7cf0",
|
||||
"titleEn": "Who is the current FIFA World Cup Winner?",
|
||||
"titleAr": "Who is the current FIFA World Cup Winner?",
|
||||
"marathonId": "979813be-eafa-4d3e-d27e-08dae8a08a3b",
|
||||
"questionTypeId": 1,
|
||||
"questionTime": 10,
|
||||
"nextQuestGap": 5,
|
||||
"gapType": 0,
|
||||
"gapText": null,
|
||||
"gapImage": "Questions/24dddc50-7583-48b4-9fec-8a490d246191_great-thumbs.gif",
|
||||
"questOptionsLimit": 0,
|
||||
"remainingParticipantCount": 0,
|
||||
"questionOptions": [
|
||||
{
|
||||
"id": "dd0ba127-26ed-4308-e50e-08dae8b36b35",
|
||||
"titleEn": "Brazil",
|
||||
"titleAr": "Brazil",
|
||||
"questionId": "0d60d55f-4067-48f9-9ace-b6309c6a7cf0",
|
||||
"sequence": 1,
|
||||
"image": "null",
|
||||
"isCorrectOption": false
|
||||
},
|
||||
{
|
||||
"id": "4748df31-95f0-4fee-e50f-08dae8b36b35",
|
||||
"titleEn": "Argentina",
|
||||
"titleAr": "Argentina",
|
||||
"questionId": "0d60d55f-4067-48f9-9ace-b6309c6a7cf0",
|
||||
"sequence": 4,
|
||||
"image": "null",
|
||||
"isCorrectOption": true
|
||||
},
|
||||
{
|
||||
"id": "4079d32a-891b-4e83-e510-08dae8b36b35",
|
||||
"titleEn": "Germany",
|
||||
"titleAr": "Germany",
|
||||
"questionId": "0d60d55f-4067-48f9-9ace-b6309c6a7cf0",
|
||||
"sequence": 3,
|
||||
"image": "null",
|
||||
"isCorrectOption": false
|
||||
},
|
||||
{
|
||||
"id": "1c17cfcd-9f19-4020-e511-08dae8b36b35",
|
||||
"titleEn": "France",
|
||||
"titleAr": "France",
|
||||
"questionId": "0d60d55f-4067-48f9-9ace-b6309c6a7cf0",
|
||||
"sequence": 2,
|
||||
"image": "null",
|
||||
"isCorrectOption": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "489659b0-0400-4b64-8ce2-e6fe48db61db",
|
||||
"titleEn": "How many times England won FIFA World Cups?",
|
||||
"titleAr": "How many times England won FIFA World Cups?",
|
||||
"marathonId": "979813be-eafa-4d3e-d27e-08dae8a08a3b",
|
||||
"questionTypeId": 1,
|
||||
"questionTime": 10,
|
||||
"nextQuestGap": 5,
|
||||
"gapType": 0,
|
||||
"gapText": null,
|
||||
"gapImage": "Questions/a9ffa364-231c-4877-824f-84febac51086_thumbs-up-simon-cowell.gif",
|
||||
"questOptionsLimit": 0,
|
||||
"remainingParticipantCount": 0,
|
||||
"questionOptions": [
|
||||
{
|
||||
"id": "7f63cd45-ce2c-417f-e502-08dae8b36b35",
|
||||
"titleEn": "1",
|
||||
"titleAr": "1",
|
||||
"questionId": "489659b0-0400-4b64-8ce2-e6fe48db61db",
|
||||
"sequence": 1,
|
||||
"image": "null",
|
||||
"isCorrectOption": true
|
||||
},
|
||||
{
|
||||
"id": "34690bfa-0ffd-453f-e503-08dae8b36b35",
|
||||
"titleEn": "2",
|
||||
"titleAr": "2",
|
||||
"questionId": "489659b0-0400-4b64-8ce2-e6fe48db61db",
|
||||
"sequence": 2,
|
||||
"image": "null",
|
||||
"isCorrectOption": false
|
||||
},
|
||||
{
|
||||
"id": "4526efdd-ff6f-4340-e504-08dae8b36b35",
|
||||
"titleEn": "3",
|
||||
"titleAr": "3",
|
||||
"questionId": "489659b0-0400-4b64-8ce2-e6fe48db61db",
|
||||
"sequence": 3,
|
||||
"image": "null",
|
||||
"isCorrectOption": false
|
||||
},
|
||||
{
|
||||
"id": "65d06188-fa63-49fd-e505-08dae8b36b35",
|
||||
"titleEn": "4",
|
||||
"titleAr": "4",
|
||||
"questionId": "489659b0-0400-4b64-8ce2-e6fe48db61db",
|
||||
"sequence": 4,
|
||||
"image": "null",
|
||||
"isCorrectOption": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "253fc396-dab9-41ca-82bd-511f98c5dee8",
|
||||
"titleEn": "How many time Germany won FIFA World Cups?",
|
||||
"titleAr": "How many time Germany won FIFA World Cups?",
|
||||
"marathonId": "979813be-eafa-4d3e-d27e-08dae8a08a3b",
|
||||
"questionTypeId": 1,
|
||||
"questionTime": 10,
|
||||
"nextQuestGap": 5,
|
||||
"gapType": 0,
|
||||
"gapText": null,
|
||||
"gapImage": "Questions/012d6493-3612-42c9-8f6f-84417d4736d4_good-job-well-done.gif",
|
||||
"questOptionsLimit": 0,
|
||||
"remainingParticipantCount": 0,
|
||||
"questionOptions": [
|
||||
{
|
||||
"id": "dce4999c-5629-45f4-e4f6-08dae8b36b35",
|
||||
"titleEn": "1",
|
||||
"titleAr": "1",
|
||||
"questionId": "253fc396-dab9-41ca-82bd-511f98c5dee8",
|
||||
"sequence": 1,
|
||||
"image": "null",
|
||||
"isCorrectOption": false
|
||||
},
|
||||
{
|
||||
"id": "00913ba1-5ccc-4d7c-e4f7-08dae8b36b35",
|
||||
"titleEn": "2",
|
||||
"titleAr": "2",
|
||||
"questionId": "253fc396-dab9-41ca-82bd-511f98c5dee8",
|
||||
"sequence": 2,
|
||||
"image": "null",
|
||||
"isCorrectOption": false
|
||||
},
|
||||
{
|
||||
"id": "9e5f5e89-608e-4fc9-e4f8-08dae8b36b35",
|
||||
"titleEn": "3",
|
||||
"titleAr": "3",
|
||||
"questionId": "253fc396-dab9-41ca-82bd-511f98c5dee8",
|
||||
"sequence": 3,
|
||||
"image": "null",
|
||||
"isCorrectOption": false
|
||||
},
|
||||
{
|
||||
"id": "a535cacf-ee4d-4895-e4f9-08dae8b36b35",
|
||||
"titleEn": "4",
|
||||
"titleAr": "4",
|
||||
"questionId": "253fc396-dab9-41ca-82bd-511f98c5dee8",
|
||||
"sequence": 4,
|
||||
"image": "null",
|
||||
"isCorrectOption": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "669c4fe2-a3e6-4e29-8c56-ae09efa9ba6c",
|
||||
"titleEn": "How many times Portugal won FIFA World Cups?",
|
||||
"titleAr": "How many times Portugal won FIFA World Cups?",
|
||||
"marathonId": "979813be-eafa-4d3e-d27e-08dae8a08a3b",
|
||||
"questionTypeId": 1,
|
||||
"questionTime": 10,
|
||||
"nextQuestGap": 5,
|
||||
"gapType": 0,
|
||||
"gapText": null,
|
||||
"gapImage": "Questions/ca3f32a1-ed9f-45df-b2fb-3d1df78d5651_congrats-14.gif",
|
||||
"questOptionsLimit": 0,
|
||||
"remainingParticipantCount": 0,
|
||||
"questionOptions": [
|
||||
{
|
||||
"id": "597c308e-3f09-4a05-e506-08dae8b36b35",
|
||||
"titleEn": "0",
|
||||
"titleAr": "0",
|
||||
"questionId": "669c4fe2-a3e6-4e29-8c56-ae09efa9ba6c",
|
||||
"sequence": 1,
|
||||
"image": "null",
|
||||
"isCorrectOption": true
|
||||
},
|
||||
{
|
||||
"id": "2face927-7c8e-4945-e507-08dae8b36b35",
|
||||
"titleEn": "1",
|
||||
"titleAr": "1",
|
||||
"questionId": "669c4fe2-a3e6-4e29-8c56-ae09efa9ba6c",
|
||||
"sequence": 2,
|
||||
"image": "null",
|
||||
"isCorrectOption": false
|
||||
},
|
||||
{
|
||||
"id": "bde21640-798e-4750-e508-08dae8b36b35",
|
||||
"titleEn": "2",
|
||||
"titleAr": "2",
|
||||
"questionId": "669c4fe2-a3e6-4e29-8c56-ae09efa9ba6c",
|
||||
"sequence": 3,
|
||||
"image": "null",
|
||||
"isCorrectOption": false
|
||||
},
|
||||
{
|
||||
"id": "9312acac-f0c3-4ed4-e509-08dae8b36b35",
|
||||
"titleEn": "3",
|
||||
"titleAr": "3",
|
||||
"questionId": "669c4fe2-a3e6-4e29-8c56-ae09efa9ba6c",
|
||||
"sequence": 4,
|
||||
"image": "null",
|
||||
"isCorrectOption": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "f91774ce-14f0-4af0-9a77-e649bc013b44",
|
||||
"titleEn": "How many times Spain won FIFA World Cups?",
|
||||
"titleAr": "How many times Spain won FIFA World Cups?",
|
||||
"marathonId": "979813be-eafa-4d3e-d27e-08dae8a08a3b",
|
||||
"questionTypeId": 1,
|
||||
"questionTime": 10,
|
||||
"nextQuestGap": 5,
|
||||
"gapType": 0,
|
||||
"gapText": null,
|
||||
"gapImage": "Questions/6484c5bc-09fd-4586-8036-67868afbe27b_good-job-well-done.gif",
|
||||
"questOptionsLimit": 0,
|
||||
"remainingParticipantCount": 0,
|
||||
"questionOptions": [
|
||||
{
|
||||
"id": "2f968964-ce91-4478-e512-08dae8b36b35",
|
||||
"titleEn": "1",
|
||||
"titleAr": "1",
|
||||
"questionId": "f91774ce-14f0-4af0-9a77-e649bc013b44",
|
||||
"sequence": 1,
|
||||
"image": "null",
|
||||
"isCorrectOption": true
|
||||
},
|
||||
{
|
||||
"id": "4fed9355-2c9f-458d-e513-08dae8b36b35",
|
||||
"titleEn": "2",
|
||||
"titleAr": "2",
|
||||
"questionId": "f91774ce-14f0-4af0-9a77-e649bc013b44",
|
||||
"sequence": 2,
|
||||
"image": "null",
|
||||
"isCorrectOption": false
|
||||
},
|
||||
{
|
||||
"id": "8f232a43-3792-4cd0-e514-08dae8b36b35",
|
||||
"titleEn": "3",
|
||||
"titleAr": "3",
|
||||
"questionId": "f91774ce-14f0-4af0-9a77-e649bc013b44",
|
||||
"sequence": 3,
|
||||
"image": "null",
|
||||
"isCorrectOption": false
|
||||
},
|
||||
{
|
||||
"id": "24478e43-bf4c-4852-e515-08dae8b36b35",
|
||||
"titleEn": "4",
|
||||
"titleAr": "4",
|
||||
"questionId": "f91774ce-14f0-4af0-9a77-e649bc013b44",
|
||||
"sequence": 4,
|
||||
"image": "null",
|
||||
"isCorrectOption": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "fd3a90e6-5b35-4035-bc1c-4483facaf6d3",
|
||||
"titleEn": "How many times France won FIFA World Cups?",
|
||||
"titleAr": "How many times France won FIFA World Cups?",
|
||||
"marathonId": "979813be-eafa-4d3e-d27e-08dae8a08a3b",
|
||||
"questionTypeId": 1,
|
||||
"questionTime": 10,
|
||||
"nextQuestGap": 5,
|
||||
"gapType": 0,
|
||||
"gapText": null,
|
||||
"gapImage": "Questions/24dddc50-7583-48b4-9fec-8a490d246191_great-thumbs.gif",
|
||||
"questOptionsLimit": 0,
|
||||
"remainingParticipantCount": 0,
|
||||
"questionOptions": [
|
||||
{
|
||||
"id": "9d0743e0-9f3f-48d0-e4fa-08dae8b36b35",
|
||||
"titleEn": "1",
|
||||
"titleAr": "1",
|
||||
"questionId": "fd3a90e6-5b35-4035-bc1c-4483facaf6d3",
|
||||
"sequence": 1,
|
||||
"image": "null",
|
||||
"isCorrectOption": false
|
||||
},
|
||||
{
|
||||
"id": "a81eda99-d9ad-49e0-e4fb-08dae8b36b35",
|
||||
"titleEn": "2",
|
||||
"titleAr": "2",
|
||||
"questionId": "fd3a90e6-5b35-4035-bc1c-4483facaf6d3",
|
||||
"sequence": 2,
|
||||
"image": "null",
|
||||
"isCorrectOption": true
|
||||
},
|
||||
{
|
||||
"id": "7ca78891-890d-4023-e4fc-08dae8b36b35",
|
||||
"titleEn": "3",
|
||||
"titleAr": "3",
|
||||
"questionId": "fd3a90e6-5b35-4035-bc1c-4483facaf6d3",
|
||||
"sequence": 3,
|
||||
"image": "null",
|
||||
"isCorrectOption": false
|
||||
},
|
||||
{
|
||||
"id": "d1a98bd9-8afa-49c1-e4fd-08dae8b36b35",
|
||||
"titleEn": "4",
|
||||
"titleAr": "4",
|
||||
"questionId": "fd3a90e6-5b35-4035-bc1c-4483facaf6d3",
|
||||
"sequence": 4,
|
||||
"image": "null",
|
||||
"isCorrectOption": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "3a35855d-3ed7-4d45-8864-9135d71378de",
|
||||
"titleEn": "How many time Argentina won FIFA World Cups?",
|
||||
"titleAr": "How many time Argentina won FIFA World Cups?",
|
||||
"marathonId": "979813be-eafa-4d3e-d27e-08dae8a08a3b",
|
||||
"questionTypeId": 1,
|
||||
"questionTime": 10,
|
||||
"nextQuestGap": 5,
|
||||
"gapType": 0,
|
||||
"gapText": null,
|
||||
"gapImage": "Questions/24dddc50-7583-48b4-9fec-8a490d246191_great-thumbs.gif",
|
||||
"questOptionsLimit": 0,
|
||||
"remainingParticipantCount": 0,
|
||||
"questionOptions": [
|
||||
{
|
||||
"id": "f0766816-837f-47e6-e51a-08dae8b36b35",
|
||||
"titleEn": "1",
|
||||
"titleAr": "1",
|
||||
"questionId": "3a35855d-3ed7-4d45-8864-9135d71378de",
|
||||
"sequence": 1,
|
||||
"image": "null",
|
||||
"isCorrectOption": false
|
||||
},
|
||||
{
|
||||
"id": "dc9c68de-afa4-4b63-e51b-08dae8b36b35",
|
||||
"titleEn": "2",
|
||||
"titleAr": "2",
|
||||
"questionId": "3a35855d-3ed7-4d45-8864-9135d71378de",
|
||||
"sequence": 2,
|
||||
"image": "null",
|
||||
"isCorrectOption": false
|
||||
},
|
||||
{
|
||||
"id": "52f2d024-8a29-4781-e51c-08dae8b36b35",
|
||||
"titleEn": "3",
|
||||
"titleAr": "3",
|
||||
"questionId": "3a35855d-3ed7-4d45-8864-9135d71378de",
|
||||
"sequence": 3,
|
||||
"image": "null",
|
||||
"isCorrectOption": true
|
||||
},
|
||||
{
|
||||
"id": "122636e4-5e98-499e-e51d-08dae8b36b35",
|
||||
"titleEn": "4",
|
||||
"titleAr": "4",
|
||||
"questionId": "3a35855d-3ed7-4d45-8864-9135d71378de",
|
||||
"sequence": 4,
|
||||
"image": "null",
|
||||
"isCorrectOption": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "6c9d809d-683b-4d77-b98e-62a0d083488a",
|
||||
"titleEn": "How many times Brazil won FIFA World Cups?",
|
||||
"titleAr": "How many times Brazil won FIFA World Cups?",
|
||||
"marathonId": "979813be-eafa-4d3e-d27e-08dae8a08a3b",
|
||||
"questionTypeId": 1,
|
||||
"questionTime": 10,
|
||||
"nextQuestGap": 5,
|
||||
"gapType": 0,
|
||||
"gapText": null,
|
||||
"gapImage": "Questions/a9ffa364-231c-4877-824f-84febac51086_thumbs-up-simon-cowell.gif",
|
||||
"questOptionsLimit": 0,
|
||||
"remainingParticipantCount": 0,
|
||||
"questionOptions": [
|
||||
{
|
||||
"id": "4e94437a-b10d-46c6-e4fe-08dae8b36b35",
|
||||
"titleEn": "2",
|
||||
"titleAr": "2",
|
||||
"questionId": "6c9d809d-683b-4d77-b98e-62a0d083488a",
|
||||
"sequence": 1,
|
||||
"image": "null",
|
||||
"isCorrectOption": false
|
||||
},
|
||||
{
|
||||
"id": "6e0e8baa-c13e-45f1-e4ff-08dae8b36b35",
|
||||
"titleEn": "3",
|
||||
"titleAr": "3",
|
||||
"questionId": "6c9d809d-683b-4d77-b98e-62a0d083488a",
|
||||
"sequence": 2,
|
||||
"image": "null",
|
||||
"isCorrectOption": false
|
||||
},
|
||||
{
|
||||
"id": "3065d26a-9aa4-4626-e500-08dae8b36b35",
|
||||
"titleEn": "4",
|
||||
"titleAr": "4",
|
||||
"questionId": "6c9d809d-683b-4d77-b98e-62a0d083488a",
|
||||
"sequence": 3,
|
||||
"image": "null",
|
||||
"isCorrectOption": false
|
||||
},
|
||||
{
|
||||
"id": "6cc3ff60-02cc-4e59-e501-08dae8b36b35",
|
||||
"titleEn": "5",
|
||||
"titleAr": "5",
|
||||
"questionId": "6c9d809d-683b-4d77-b98e-62a0d083488a",
|
||||
"sequence": 4,
|
||||
"image": "null",
|
||||
"isCorrectOption": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "e8c8442e-f370-444d-bee9-f7f75d146e5c",
|
||||
"titleEn": "How many times Italy won FIFA World Cups?",
|
||||
"titleAr": "How many times Italy won FIFA World Cups?",
|
||||
"marathonId": "979813be-eafa-4d3e-d27e-08dae8a08a3b",
|
||||
"questionTypeId": 1,
|
||||
"questionTime": 10,
|
||||
"nextQuestGap": 5,
|
||||
"gapType": 0,
|
||||
"gapText": null,
|
||||
"gapImage": "Questions/34f3c402-1244-4320-98c2-751cb2a347c5_congrats-1.gif",
|
||||
"questOptionsLimit": 0,
|
||||
"remainingParticipantCount": 0,
|
||||
"questionOptions": [
|
||||
{
|
||||
"id": "53d456b7-8f56-4c58-e50a-08dae8b36b35",
|
||||
"titleEn": "1",
|
||||
"titleAr": "1",
|
||||
"questionId": "e8c8442e-f370-444d-bee9-f7f75d146e5c",
|
||||
"sequence": 1,
|
||||
"image": "null",
|
||||
"isCorrectOption": false
|
||||
},
|
||||
{
|
||||
"id": "280df6d7-ca61-4d78-e50b-08dae8b36b35",
|
||||
"titleEn": "2",
|
||||
"titleAr": "2",
|
||||
"questionId": "e8c8442e-f370-444d-bee9-f7f75d146e5c",
|
||||
"sequence": 2,
|
||||
"image": "null",
|
||||
"isCorrectOption": false
|
||||
},
|
||||
{
|
||||
"id": "769939dc-4a46-4f4f-e50c-08dae8b36b35",
|
||||
"titleEn": "3",
|
||||
"titleAr": "3",
|
||||
"questionId": "e8c8442e-f370-444d-bee9-f7f75d146e5c",
|
||||
"sequence": 3,
|
||||
"image": "null",
|
||||
"isCorrectOption": false
|
||||
},
|
||||
{
|
||||
"id": "c389fae7-0019-4922-e50d-08dae8b36b35",
|
||||
"titleEn": "4",
|
||||
"titleAr": "4",
|
||||
"questionId": "e8c8442e-f370-444d-bee9-f7f75d146e5c",
|
||||
"sequence": 4,
|
||||
"image": "null",
|
||||
"isCorrectOption": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@ -0,0 +1,46 @@
|
||||
{
|
||||
"id": "979813be-eafa-4d3e-d27e-08dae8a08a3b",
|
||||
"titleEn": "FIFA World Cup",
|
||||
"titleAr": "undefined",
|
||||
"descEn": "FIFA World Cup Description",
|
||||
"descAr": "undefined",
|
||||
"questionTime": 10,
|
||||
"winDeciderTime": 30,
|
||||
"winnersCount": 1,
|
||||
"questGapTime": 5,
|
||||
"startTime": "2022-12-28T10:44:41",
|
||||
"endTime": null,
|
||||
"marathoneStatusId": 4,
|
||||
"scheduleTime": "2022-12-28T10:14:41",
|
||||
"selectedLanguage": 0,
|
||||
"projects": {
|
||||
"id": "b1cd3fa3-bb27-422e-a4c1-08dac09254df",
|
||||
"nameEn": "Cloud Solutions",
|
||||
"nameAr": "333شركة حلول السحابة للاتصالات وتقنية المعلومات",
|
||||
"projectCode": "CS"
|
||||
},
|
||||
"sponsors": [
|
||||
{
|
||||
"id": "3272b127-b388-4f09-425b-08dac2eb788e",
|
||||
"nameEn": "Cloud Solutions",
|
||||
"nameAr": "حل السحابة",
|
||||
"image": "SponsorImage/b9aed4a8-42b2-45fc-b6f1-47ee0c7b4138_sponsor.jpeg",
|
||||
"video": "SponsorVideo/9ab678ab-1b4c-4ea4-aaf2-32ce1353d3fe_sample-10s.mp4",
|
||||
"logo": "SponsorLogo/eb029f0d-bce1-4a61-b0c0-abaa484912a0_sponsor.jpeg",
|
||||
"videoDuration": null,
|
||||
"sponsorPrizes": [
|
||||
{
|
||||
"id": "e657a18c-6fb2-4099-07c8-08dae89efcd3",
|
||||
"marathonPrizeEn": "SAR 500",
|
||||
"marathonPrizeAr": "SAR 500"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"questions": null,
|
||||
"isEmailSent": false,
|
||||
"totalQuestions": 10,
|
||||
"cancelReason": null,
|
||||
"marathonBufferTime": 30,
|
||||
"currentTime": "2022-12-28T08:03:24.3671803Z"
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 163 KiB |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,25 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:logger/logger.dart' as L;
|
||||
import 'package:mohem_flutter_app/models/marathon/marathon_model.dart';
|
||||
import 'package:mohem_flutter_app/models/marathon/question_model.dart';
|
||||
|
||||
class DemoMarathonRepo {
|
||||
L.Logger logger = L.Logger();
|
||||
|
||||
Future<MarathonDetailModel> getDemoMarathonDetails() async {
|
||||
String response = await rootBundle.loadString('assets/json/demo_upcoming_marathon');
|
||||
var json = jsonDecode(response);
|
||||
MarathonDetailModel marathonDetailModel = MarathonDetailModel.fromJson(json);
|
||||
return marathonDetailModel;
|
||||
}
|
||||
|
||||
Future<QuestionModel> getDemoNextQuestion({required int currentQuestionNumber}) async {
|
||||
String response = await rootBundle.loadString('assets/json/demo_questions_marathon');
|
||||
List json = jsonDecode(response);
|
||||
QuestionModel currentQuestion = QuestionModel.fromJson(json.elementAt(currentQuestionNumber));
|
||||
|
||||
return currentQuestion;
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@ -0,0 +1,82 @@
|
||||
import 'dart:convert';
|
||||
import 'dart:io';
|
||||
import 'package:firebase_messaging/firebase_messaging.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
|
||||
import 'package:mohem_flutter_app/app_state/app_state.dart';
|
||||
import 'package:mohem_flutter_app/classes/utils.dart';
|
||||
import 'package:mohem_flutter_app/main.dart';
|
||||
import 'package:permission_handler/permission_handler.dart';
|
||||
import 'package:firebase_core/firebase_core.dart';
|
||||
|
||||
final FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin = FlutterLocalNotificationsPlugin();
|
||||
|
||||
class AppNotifications {
|
||||
static final AppNotifications _instance = AppNotifications._internal();
|
||||
|
||||
AppNotifications._internal();
|
||||
|
||||
factory AppNotifications() => _instance;
|
||||
|
||||
Future<void> requestPermissions() async {
|
||||
if (Platform.isIOS) {
|
||||
await flutterLocalNotificationsPlugin.resolvePlatformSpecificImplementation<IOSFlutterLocalNotificationsPlugin>()?.requestPermissions(alert: true, badge: true, sound: true);
|
||||
} else if (Platform.isAndroid) {
|
||||
AndroidFlutterLocalNotificationsPlugin? androidImplementation = flutterLocalNotificationsPlugin.resolvePlatformSpecificImplementation<AndroidFlutterLocalNotificationsPlugin>();
|
||||
bool? granted = await androidImplementation?.requestPermission();
|
||||
if (granted == false) {
|
||||
if (kDebugMode) {
|
||||
print("-------------------- Permission Granted ------------------------");
|
||||
print(granted);
|
||||
}
|
||||
await Permission.notification.request();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void init(String? firebaseToken) async {
|
||||
await requestPermissions();
|
||||
AppState().setDeviceToken = firebaseToken;
|
||||
await Permission.notification.isDenied.then((bool value) {
|
||||
if (value) {
|
||||
Permission.notification.request();
|
||||
}
|
||||
});
|
||||
RemoteMessage? initialMessage = await FirebaseMessaging.instance.getInitialMessage();
|
||||
|
||||
if (initialMessage != null) _handleMessage(initialMessage);
|
||||
|
||||
FirebaseMessaging.onMessage.listen((RemoteMessage message) {
|
||||
if (message.notification != null) _handleMessage(message);
|
||||
});
|
||||
|
||||
FirebaseMessaging.onMessageOpenedApp.listen(_handleOpenApp);
|
||||
|
||||
FirebaseMessaging.onBackgroundMessage(backgroundMessageHandler);
|
||||
|
||||
FirebaseMessaging.instance.onTokenRefresh.listen((String token) {
|
||||
AppState().setDeviceToken = token;
|
||||
});
|
||||
}
|
||||
|
||||
void _handleMessage(RemoteMessage message) {
|
||||
Utils.saveStringFromPrefs("isAppOpendByChat", "false");
|
||||
}
|
||||
|
||||
void _handleOpenApp(RemoteMessage message) {
|
||||
Utils.saveStringFromPrefs("isAppOpendByChat", "true");
|
||||
Utils.saveStringFromPrefs("notificationData", message.data["user_chat_history_response"].toString());
|
||||
}
|
||||
}
|
||||
|
||||
AndroidNotificationChannel channel = const AndroidNotificationChannel(
|
||||
"high_importance_channel",
|
||||
"High Importance Notifications",
|
||||
importance: Importance.high,
|
||||
);
|
||||
|
||||
Future<dynamic> backgroundMessageHandler(RemoteMessage message) async {
|
||||
await Firebase.initializeApp();
|
||||
Utils.saveStringFromPrefs("isAppOpendByChat", "false");
|
||||
Utils.saveStringFromPrefs("notificationData", message.data["user_chat_history_response"].toString());
|
||||
}
|
||||
@ -1,96 +1,192 @@
|
||||
class OffersListModel {
|
||||
String? title;
|
||||
String? titleAR;
|
||||
String? description;
|
||||
String? descriptionAR;
|
||||
int? offersDiscountId;
|
||||
String? titleEn;
|
||||
String? titleAr;
|
||||
String? descriptionEn;
|
||||
String? descriptionAr;
|
||||
String? startDate;
|
||||
String? endDate;
|
||||
String? logo;
|
||||
String? bannerImage;
|
||||
String? discount;
|
||||
String? rowID;
|
||||
int? categoryId;
|
||||
String? categoryNameEn;
|
||||
String? categoryNameAr;
|
||||
String? categoryID;
|
||||
String? isHasLocation;
|
||||
String? discount;
|
||||
String? location;
|
||||
int? statusId;
|
||||
String? statusTitle;
|
||||
bool? isHasLocation;
|
||||
String? discountDescription;
|
||||
String? websiteUrl;
|
||||
bool? bookMarked;
|
||||
bool? isHotDeal;
|
||||
List<OffersDiscountImageColl>? offersDiscountImageColl;
|
||||
dynamic locationList;
|
||||
String? created;
|
||||
String? publishedDesc;
|
||||
String? published;
|
||||
String? expireAfter;
|
||||
String? status;
|
||||
String? isActive;
|
||||
String? totalItems;
|
||||
String? bannerImage;
|
||||
String? logo;
|
||||
bool? isActive;
|
||||
int? pageSize;
|
||||
int? pageNo;
|
||||
int? languageId;
|
||||
|
||||
OffersListModel(
|
||||
{this.title,
|
||||
this.titleAR,
|
||||
this.description,
|
||||
this.descriptionAR,
|
||||
this.startDate,
|
||||
this.endDate,
|
||||
this.logo,
|
||||
this.bannerImage,
|
||||
this.discount,
|
||||
this.rowID,
|
||||
this.categoryNameEn,
|
||||
this.categoryNameAr,
|
||||
this.categoryID,
|
||||
this.isHasLocation,
|
||||
this.created,
|
||||
this.publishedDesc,
|
||||
this.published,
|
||||
this.expireAfter,
|
||||
this.status,
|
||||
this.isActive,
|
||||
this.totalItems});
|
||||
{this.offersDiscountId,
|
||||
this.titleEn,
|
||||
this.titleAr,
|
||||
this.descriptionEn,
|
||||
this.descriptionAr,
|
||||
this.startDate,
|
||||
this.endDate,
|
||||
this.categoryId,
|
||||
this.categoryNameEn,
|
||||
this.categoryNameAr,
|
||||
this.discount,
|
||||
this.location,
|
||||
this.statusId,
|
||||
this.statusTitle,
|
||||
this.isHasLocation,
|
||||
this.discountDescription,
|
||||
this.websiteUrl,
|
||||
this.bookMarked,
|
||||
this.isHotDeal,
|
||||
this.offersDiscountImageColl,
|
||||
this.locationList,
|
||||
this.created,
|
||||
this.bannerImage,
|
||||
this.logo,
|
||||
this.isActive,
|
||||
this.pageSize,
|
||||
this.pageNo,
|
||||
this.languageId});
|
||||
|
||||
OffersListModel.fromJson(Map<String, dynamic> json) {
|
||||
title = json['Title'];
|
||||
titleAR = json['Title_AR'];
|
||||
description = json['Description'];
|
||||
descriptionAR = json['Description_AR'];
|
||||
startDate = json['Start Date'];
|
||||
endDate = json['End Date'];
|
||||
logo = json['Logo'];
|
||||
bannerImage = json['Banner_Image'];
|
||||
discount = json['Discount'];
|
||||
rowID = json['rowID'];
|
||||
offersDiscountId = json['offersDiscountId'];
|
||||
titleEn = json['titleEn'];
|
||||
titleAr = json['titleAr'];
|
||||
descriptionEn = json['descriptionEn'];
|
||||
descriptionAr = json['descriptionAr'];
|
||||
startDate = json['startDate'];
|
||||
endDate = json['endDate'];
|
||||
categoryId = json['categoryId'];
|
||||
categoryNameEn = json['categoryName_en'];
|
||||
categoryNameAr = json['categoryName_ar'];
|
||||
categoryID = json['categoryID'];
|
||||
isHasLocation = json['IsHasLocation'];
|
||||
discount = json['discount'];
|
||||
location = json['location'];
|
||||
statusId = json['statusId'];
|
||||
statusTitle = json['statusTitle'];
|
||||
isHasLocation = json['isHasLocation'];
|
||||
discountDescription = json['discountDescription'];
|
||||
websiteUrl = json['websiteUrl'];
|
||||
bookMarked = json['bookMarked'];
|
||||
isHotDeal = json['isHotDeal'];
|
||||
if (json['offersDiscountImageColl'] != null) {
|
||||
offersDiscountImageColl = <OffersDiscountImageColl>[];
|
||||
json['offersDiscountImageColl'].forEach((v) {
|
||||
offersDiscountImageColl!.add(new OffersDiscountImageColl.fromJson(v));
|
||||
});
|
||||
}
|
||||
locationList = json['locationList'];
|
||||
created = json['created'];
|
||||
publishedDesc = json['PublishedDesc'];
|
||||
published = json['Published'];
|
||||
expireAfter = json['ExpireAfter'];
|
||||
status = json['Status'];
|
||||
isActive = json['IsActive'];
|
||||
totalItems = json['TotalItems'];
|
||||
bannerImage = json['banner_Image'];
|
||||
logo = json['logo'];
|
||||
isActive = json['isActive'];
|
||||
pageSize = json['pageSize'];
|
||||
pageNo = json['pageNo'];
|
||||
languageId = json['languageId'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['Title'] = this.title;
|
||||
data['Title_AR'] = this.titleAR;
|
||||
data['Description'] = this.description;
|
||||
data['Description_AR'] = this.descriptionAR;
|
||||
data['Start Date'] = this.startDate;
|
||||
data['End Date'] = this.endDate;
|
||||
data['Logo'] = this.logo;
|
||||
data['Banner_Image'] = this.bannerImage;
|
||||
data['Discount'] = this.discount;
|
||||
data['rowID'] = this.rowID;
|
||||
data['offersDiscountId'] = this.offersDiscountId;
|
||||
data['titleEn'] = this.titleEn;
|
||||
data['titleAr'] = this.titleAr;
|
||||
data['descriptionEn'] = this.descriptionEn;
|
||||
data['descriptionAr'] = this.descriptionAr;
|
||||
data['startDate'] = this.startDate;
|
||||
data['endDate'] = this.endDate;
|
||||
data['categoryId'] = this.categoryId;
|
||||
data['categoryName_en'] = this.categoryNameEn;
|
||||
data['categoryName_ar'] = this.categoryNameAr;
|
||||
data['categoryID'] = this.categoryID;
|
||||
data['IsHasLocation'] = this.isHasLocation;
|
||||
data['discount'] = this.discount;
|
||||
data['location'] = this.location;
|
||||
data['statusId'] = this.statusId;
|
||||
data['statusTitle'] = this.statusTitle;
|
||||
data['isHasLocation'] = this.isHasLocation;
|
||||
data['discountDescription'] = this.discountDescription;
|
||||
data['websiteUrl'] = this.websiteUrl;
|
||||
data['bookMarked'] = this.bookMarked;
|
||||
data['isHotDeal'] = this.isHotDeal;
|
||||
if (this.offersDiscountImageColl != null) {
|
||||
data['offersDiscountImageColl'] = this.offersDiscountImageColl!.map((v) => v.toJson()).toList();
|
||||
}
|
||||
data['locationList'] = this.locationList;
|
||||
data['created'] = this.created;
|
||||
data['PublishedDesc'] = this.publishedDesc;
|
||||
data['Published'] = this.published;
|
||||
data['ExpireAfter'] = this.expireAfter;
|
||||
data['Status'] = this.status;
|
||||
data['IsActive'] = this.isActive;
|
||||
data['TotalItems'] = this.totalItems;
|
||||
data['banner_Image'] = this.bannerImage;
|
||||
data['logo'] = this.logo;
|
||||
data['isActive'] = this.isActive;
|
||||
data['pageSize'] = this.pageSize;
|
||||
data['pageNo'] = this.pageNo;
|
||||
data['languageId'] = this.languageId;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class OffersDiscountImageColl {
|
||||
int? imageAttachmentId;
|
||||
String? fileName;
|
||||
String? contentType;
|
||||
String? attachFileStream;
|
||||
String? base64String;
|
||||
int? referenceItemId;
|
||||
String? filePath;
|
||||
String? imageTag;
|
||||
bool? isActive;
|
||||
int? pageSize;
|
||||
int? pageNo;
|
||||
int? languageId;
|
||||
|
||||
OffersDiscountImageColl(
|
||||
{this.imageAttachmentId,
|
||||
this.fileName,
|
||||
this.contentType,
|
||||
this.attachFileStream,
|
||||
this.base64String,
|
||||
this.referenceItemId,
|
||||
this.filePath,
|
||||
this.imageTag,
|
||||
this.isActive,
|
||||
this.pageSize,
|
||||
this.pageNo,
|
||||
this.languageId});
|
||||
|
||||
OffersDiscountImageColl.fromJson(Map<String, dynamic> json) {
|
||||
imageAttachmentId = json['imageAttachmentId'];
|
||||
fileName = json['fileName'];
|
||||
contentType = json['contentType'];
|
||||
attachFileStream = json['attachFileStream'];
|
||||
base64String = json['base64String'];
|
||||
referenceItemId = json['referenceItemId'];
|
||||
filePath = json['filePath'];
|
||||
imageTag = json['imageTag'];
|
||||
isActive = json['isActive'];
|
||||
pageSize = json['pageSize'];
|
||||
pageNo = json['pageNo'];
|
||||
languageId = json['languageId'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['imageAttachmentId'] = this.imageAttachmentId;
|
||||
data['fileName'] = this.fileName;
|
||||
data['contentType'] = this.contentType;
|
||||
data['attachFileStream'] = this.attachFileStream;
|
||||
data['base64String'] = this.base64String;
|
||||
data['referenceItemId'] = this.referenceItemId;
|
||||
data['filePath'] = this.filePath;
|
||||
data['imageTag'] = this.imageTag;
|
||||
data['isActive'] = this.isActive;
|
||||
data['pageSize'] = this.pageSize;
|
||||
data['pageNo'] = this.pageNo;
|
||||
data['languageId'] = this.languageId;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,56 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:mohem_flutter_app/extensions/int_extensions.dart';
|
||||
import 'package:mohem_flutter_app/extensions/string_extensions.dart';
|
||||
import 'package:mohem_flutter_app/extensions/widget_extensions.dart';
|
||||
import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
|
||||
import 'package:mohem_flutter_app/widgets/button/default_button.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
class AppUpdateScreen extends StatefulWidget {
|
||||
const AppUpdateScreen({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<AppUpdateScreen> createState() => _UnsafeDeviceScreenState();
|
||||
}
|
||||
|
||||
class _UnsafeDeviceScreenState extends State<AppUpdateScreen> {
|
||||
String? dynamicParams;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
dynamicParams ??= ModalRoute.of(context)!.settings.arguments as String;
|
||||
return Scaffold(
|
||||
body: SafeArea(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
21.height,
|
||||
Center(child: Image.asset("assets/images/logos/main_mohemm_logo.png", width: 200, height: 50)),
|
||||
50.height,
|
||||
"Please Update Your App".toText24(isBold: true),
|
||||
48.height,
|
||||
dynamicParams.toString().toText14(isCenter: true).paddingOnly(left: 20.0, right: 20.0),
|
||||
21.height,
|
||||
DefaultButton(LocaleKeys.ok.tr(), () async {
|
||||
if (Platform.isAndroid || Platform.isIOS) {
|
||||
var appId = Platform.isAndroid ? 'hmg.cloudSolutions.mohem' : '1468856602';
|
||||
var url = Uri.parse(
|
||||
Platform.isAndroid ? "market://details?id=$appId" : "https://apps.apple.com/app/id$appId",
|
||||
);
|
||||
launchUrl(
|
||||
url,
|
||||
mode: LaunchMode.externalApplication,
|
||||
);
|
||||
}
|
||||
}).paddingAll(24)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,189 @@
|
||||
import 'dart:math';
|
||||
import 'package:audio_waveforms/audio_waveforms.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:mohem_flutter_app/classes/colors.dart';
|
||||
|
||||
class SeekBar extends StatefulWidget {
|
||||
final Duration duration;
|
||||
final Duration position;
|
||||
final Duration bufferedPosition;
|
||||
final ValueChanged<Duration>? onChanged;
|
||||
final ValueChanged<Duration>? onChangeEnd;
|
||||
|
||||
const SeekBar({
|
||||
Key? key,
|
||||
required this.duration,
|
||||
required this.position,
|
||||
required this.bufferedPosition,
|
||||
this.onChanged,
|
||||
this.onChangeEnd,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
SeekBarState createState() => SeekBarState();
|
||||
}
|
||||
|
||||
class SeekBarState extends State<SeekBar> {
|
||||
double? _dragValue;
|
||||
late SliderThemeData _sliderThemeData;
|
||||
|
||||
@override
|
||||
void didChangeDependencies() {
|
||||
super.didChangeDependencies();
|
||||
_sliderThemeData = SliderTheme.of(context).copyWith(
|
||||
// trackHeight: 2.0,
|
||||
thumbColor: MyColors.lightGreenColor,
|
||||
activeTrackColor: MyColors.lightGreenColor,
|
||||
inactiveTrackColor: MyColors.grey57Color.withOpacity(0.4),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Stack(
|
||||
children: [
|
||||
SliderTheme(
|
||||
data: _sliderThemeData.copyWith(
|
||||
thumbShape: HiddenThumbComponentShape(),
|
||||
),
|
||||
child: ExcludeSemantics(
|
||||
child: Slider(
|
||||
min: 0.0,
|
||||
max: widget.duration.inMilliseconds.toDouble(),
|
||||
value: min(widget.bufferedPosition.inMilliseconds.toDouble(), widget.duration.inMilliseconds.toDouble()),
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
_dragValue = value;
|
||||
});
|
||||
if (widget.onChanged != null) {
|
||||
widget.onChanged!(Duration(milliseconds: value.round()));
|
||||
}
|
||||
},
|
||||
onChangeEnd: (value) {
|
||||
if (widget.onChangeEnd != null) {
|
||||
widget.onChangeEnd!(Duration(milliseconds: value.round()));
|
||||
}
|
||||
_dragValue = null;
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
SliderTheme(
|
||||
data: _sliderThemeData.copyWith(
|
||||
inactiveTrackColor: Colors.transparent,
|
||||
),
|
||||
child: Slider(
|
||||
min: 0.0,
|
||||
max: widget.duration.inMilliseconds.toDouble(),
|
||||
value: min(_dragValue ?? widget.position.inMilliseconds.toDouble(), widget.duration.inMilliseconds.toDouble()),
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
_dragValue = value;
|
||||
});
|
||||
if (widget.onChanged != null) {
|
||||
widget.onChanged!(Duration(milliseconds: value.round()));
|
||||
}
|
||||
},
|
||||
onChangeEnd: (value) {
|
||||
if (widget.onChangeEnd != null) {
|
||||
widget.onChangeEnd!(Duration(milliseconds: value.round()));
|
||||
}
|
||||
_dragValue = null;
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class PositionData {
|
||||
final Duration position;
|
||||
final Duration bufferedPosition;
|
||||
final Duration duration;
|
||||
|
||||
PositionData(this.position, this.bufferedPosition, this.duration);
|
||||
}
|
||||
|
||||
class HiddenThumbComponentShape extends SliderComponentShape {
|
||||
@override
|
||||
Size getPreferredSize(bool isEnabled, bool isDiscrete) => Size.zero;
|
||||
|
||||
@override
|
||||
void paint(
|
||||
PaintingContext context,
|
||||
Offset center, {
|
||||
required Animation<double> activationAnimation,
|
||||
required Animation<double> enableAnimation,
|
||||
required bool isDiscrete,
|
||||
required TextPainter labelPainter,
|
||||
required RenderBox parentBox,
|
||||
required SliderThemeData sliderTheme,
|
||||
required TextDirection textDirection,
|
||||
required double value,
|
||||
required double textScaleFactor,
|
||||
required Size sizeWithOverflow,
|
||||
}) {}
|
||||
}
|
||||
|
||||
class WaveBubble extends StatelessWidget {
|
||||
final PlayerController playerController;
|
||||
final VoidCallback onTap;
|
||||
final bool isPlaying;
|
||||
|
||||
const WaveBubble({
|
||||
Key? key,
|
||||
required this.playerController,
|
||||
required this.onTap,
|
||||
required this.isPlaying,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
margin: const EdgeInsets.all(10),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(30),
|
||||
gradient: const LinearGradient(
|
||||
transform: GradientRotation(.83),
|
||||
begin: Alignment.topRight,
|
||||
end: Alignment.bottomLeft,
|
||||
colors: <Color>[
|
||||
MyColors.gradiantEndColor,
|
||||
MyColors.gradiantStartColor,
|
||||
],
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
IconButton(
|
||||
onPressed: onTap,
|
||||
icon: Icon(isPlaying ? Icons.stop : Icons.play_arrow),
|
||||
color: Colors.white,
|
||||
splashColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
),
|
||||
AudioFileWaveforms(
|
||||
size: Size(MediaQuery.of(context).size.width / 2, 10),
|
||||
playerController: playerController,
|
||||
padding: EdgeInsets.zero,
|
||||
margin: EdgeInsets.zero,
|
||||
enableSeekGesture: true,
|
||||
density: 1,
|
||||
playerWaveStyle: const PlayerWaveStyle(
|
||||
fixedWaveColor: Colors.white,
|
||||
liveWaveColor: MyColors.greenColor,
|
||||
showTop: true,
|
||||
showBottom: true,
|
||||
waveCap: StrokeCap.round,
|
||||
seekLineThickness: 2,
|
||||
visualizerHeight: 4,
|
||||
backgroundColor: Colors.transparent,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,154 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:mohem_flutter_app/provider/chat_provider_model.dart';
|
||||
import 'package:mohem_flutter_app/app_state/app_state.dart';
|
||||
import 'package:mohem_flutter_app/classes/colors.dart';
|
||||
import 'package:mohem_flutter_app/classes/utils.dart';
|
||||
import 'package:mohem_flutter_app/config/routes.dart';
|
||||
import 'package:mohem_flutter_app/extensions/string_extensions.dart';
|
||||
import 'package:mohem_flutter_app/extensions/widget_extensions.dart';
|
||||
import 'package:mohem_flutter_app/ui/chat/chat_detailed_screen.dart';
|
||||
import 'package:mohem_flutter_app/widgets/shimmer/dashboard_shimmer_widget.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class MyTeamScreen extends StatefulWidget {
|
||||
const MyTeamScreen({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<MyTeamScreen> createState() => _MyTeamScreenState();
|
||||
}
|
||||
|
||||
class _MyTeamScreenState extends State<MyTeamScreen> {
|
||||
late ChatProviderModel provider;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
provider = Provider.of<ChatProviderModel>(context, listen: false);
|
||||
loadMembers();
|
||||
}
|
||||
|
||||
|
||||
void loadMembers(){
|
||||
provider.getTeamMembers();
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: MyColors.white,
|
||||
body: Consumer<ChatProviderModel>(
|
||||
builder: (BuildContext context, ChatProviderModel m, Widget? child) {
|
||||
if (m.isLoading) {
|
||||
return ChatHomeShimmer(
|
||||
isDetailedScreen: false,
|
||||
);
|
||||
} else {
|
||||
return m.teamMembersList != null && m.teamMembersList.isNotEmpty
|
||||
? ListView.separated(
|
||||
itemCount: m.teamMembersList!.length,
|
||||
shrinkWrap: true,
|
||||
physics: const ClampingScrollPhysics(),
|
||||
padding: const EdgeInsets.only(bottom: 80.0),
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
return SizedBox(
|
||||
height: 55,
|
||||
child: Row(
|
||||
children: [
|
||||
Stack(
|
||||
children: <Widget>[
|
||||
if (m.teamMembersList![index].isImageLoading!)
|
||||
const SizedBox(
|
||||
height: 48,
|
||||
width: 48,
|
||||
).toShimmer().circle(30),
|
||||
if (!m.teamMembersList![index].isImageLoading! && m.teamMembersList![index].userLocalDownlaodedImage == null)
|
||||
SvgPicture.asset(
|
||||
"assets/images/user.svg",
|
||||
height: 48,
|
||||
width: 48,
|
||||
),
|
||||
if (!m.teamMembersList![index].isImageLoading! && m.teamMembersList![index].userLocalDownlaodedImage != null)
|
||||
Container(
|
||||
width: 48.0,
|
||||
height: 48.0,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
image: DecorationImage(
|
||||
fit: BoxFit.cover,
|
||||
image: FileImage(m.teamMembersList![index].userLocalDownlaodedImage!),
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
right: 5,
|
||||
bottom: 1,
|
||||
child: Container(
|
||||
width: 10,
|
||||
height: 10,
|
||||
decoration: BoxDecoration(
|
||||
color: m.teamMembersList![index].userStatus == 1 ? MyColors.green2DColor : Colors.red,
|
||||
),
|
||||
).circle(10),
|
||||
)
|
||||
],
|
||||
),
|
||||
Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
(m.teamMembersList[index].userName! ?? "").toText14(color: MyColors.darkTextColor).paddingOnly(left: 11, top: 13),
|
||||
],
|
||||
).expanded,
|
||||
// SizedBox(
|
||||
// width: 60,
|
||||
// child: Row(
|
||||
// crossAxisAlignment: CrossAxisAlignment.center,
|
||||
// mainAxisAlignment: MainAxisAlignment.end,
|
||||
// mainAxisSize: MainAxisSize.max,
|
||||
// children: <Widget>[
|
||||
// Icon(
|
||||
// m.teamMembersList![index].isFav! ? Icons.star : Icons.star_border,
|
||||
// color: m.teamMembersList![index].isFav! ? MyColors.yellowColor : MyColors.grey35Color,
|
||||
// ).onPress(() {
|
||||
// if (m.teamMembersList![index].isFav!) {
|
||||
// m.unFavoriteUser(
|
||||
// userID: AppState().chatDetails!.response!.id!,
|
||||
// targetUserID: m.teamMembersList![index].id!,
|
||||
// );
|
||||
// }
|
||||
// }).center,
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
],
|
||||
),
|
||||
).onPress(() {
|
||||
Navigator.pushNamed(
|
||||
context,
|
||||
AppRoutes.chatDetailed,
|
||||
arguments: ChatDetailedScreenParams(m.teamMembersList![index], true),
|
||||
).then(
|
||||
(Object? value) {
|
||||
m.clearSelections();
|
||||
},
|
||||
);
|
||||
});
|
||||
},
|
||||
separatorBuilder: (BuildContext context, int index) => const Divider(color: MyColors.lightGreyE5Color).paddingOnly(left: 70),
|
||||
).paddingAll(21)
|
||||
: Column(
|
||||
children: <Widget>[
|
||||
Utils.getNoDataWidget(context).expanded,
|
||||
],
|
||||
);
|
||||
}
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,594 @@
|
||||
// import 'dart:async';
|
||||
// import 'dart:io';
|
||||
//
|
||||
// import 'dart:ui' as ui;
|
||||
// import 'package:easy_localization/easy_localization.dart';
|
||||
// import 'package:flutter/material.dart';
|
||||
// import 'package:flutter_countdown_timer/flutter_countdown_timer.dart';
|
||||
// import 'package:flutter_svg/flutter_svg.dart';
|
||||
// import 'package:mohem_flutter_app/app_state/app_state.dart';
|
||||
// import 'package:mohem_flutter_app/classes/colors.dart';
|
||||
// import 'package:mohem_flutter_app/classes/utils.dart';
|
||||
// import 'package:mohem_flutter_app/config/env.dart';
|
||||
// import 'package:mohem_flutter_app/config/routes.dart';
|
||||
// import 'package:mohem_flutter_app/extensions/int_extensions.dart';
|
||||
// import 'package:mohem_flutter_app/extensions/string_extensions.dart';
|
||||
// import 'package:mohem_flutter_app/extensions/widget_extensions.dart';
|
||||
// import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
|
||||
// import 'package:mohem_flutter_app/models/offers_and_discounts/get_offers_list.dart';
|
||||
// import 'package:mohem_flutter_app/provider/chat_provider_model.dart';
|
||||
// import 'package:mohem_flutter_app/provider/dashboard_provider_model.dart';
|
||||
// import 'package:mohem_flutter_app/ui/landing/widget/app_drawer.dart';
|
||||
// import 'package:mohem_flutter_app/ui/landing/widget/menus_widget.dart';
|
||||
// import 'package:mohem_flutter_app/ui/landing/widget/services_widget.dart';
|
||||
// import 'package:mohem_flutter_app/ui/marathon/marathon_provider.dart';
|
||||
// import 'package:mohem_flutter_app/ui/marathon/widgets/marathon_banner.dart';
|
||||
// import 'package:mohem_flutter_app/widgets/bottom_sheet.dart';
|
||||
// import 'package:mohem_flutter_app/widgets/mark_attendance_widget.dart';
|
||||
// import 'package:mohem_flutter_app/widgets/shimmer/dashboard_shimmer_widget.dart';
|
||||
// import 'package:mohem_flutter_app/widgets/shimmer/offers_shimmer_widget.dart';
|
||||
// import 'package:provider/provider.dart';
|
||||
// import 'package:pull_to_refresh/pull_to_refresh.dart';
|
||||
// import 'package:signalr_netcore/signalr_client.dart';
|
||||
//
|
||||
// late HubConnection chatHubConnection;
|
||||
//
|
||||
// class DashboardScreen extends StatefulWidget {
|
||||
// DashboardScreen({Key? key}) : super(key: key);
|
||||
//
|
||||
// @override
|
||||
// _DashboardScreenState createState() {
|
||||
// return _DashboardScreenState();
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// class _DashboardScreenState extends State<DashboardScreen> {
|
||||
// late DashboardProviderModel data;
|
||||
// late MarathonProvider marathonProvider;
|
||||
// late ChatProviderModel cProvider;
|
||||
// final GlobalKey<ScaffoldState> _scaffoldState = GlobalKey();
|
||||
//
|
||||
// final RefreshController _refreshController = RefreshController(initialRefresh: false);
|
||||
//
|
||||
// int currentIndex = 0;
|
||||
//
|
||||
// @override
|
||||
// void initState() {
|
||||
// super.initState();
|
||||
// scheduleMicrotask(() {
|
||||
// data = Provider.of<DashboardProviderModel>(context, listen: false);
|
||||
// if (env["marathon"]) {
|
||||
// marathonProvider = Provider.of<MarathonProvider>(context, listen: false);
|
||||
// }
|
||||
// if (env["chat"]) {
|
||||
// cProvider = Provider.of<ChatProviderModel>(context, listen: false);
|
||||
// }
|
||||
// _onRefresh();
|
||||
// });
|
||||
// }
|
||||
//
|
||||
// @override
|
||||
// void dispose() {
|
||||
// super.dispose();
|
||||
// chatHubConnection.stop();
|
||||
// }
|
||||
//
|
||||
// void _bHubCon() {
|
||||
// cProvider.getUserAutoLoginToken().whenComplete(() {
|
||||
// cProvider.buildHubConnection();
|
||||
// Future.delayed(const Duration(seconds: 2), () {
|
||||
// cProvider.invokeChatCounter(userId: AppState().chatDetails!.response!.id!);
|
||||
// });
|
||||
// });
|
||||
// }
|
||||
//
|
||||
// void _onRefresh() async {
|
||||
// data.initProvider();
|
||||
// if (env["chat"]) {
|
||||
// _bHubCon();
|
||||
// }
|
||||
// // data.getITGNotification().then((value) {
|
||||
// // print("--------------------detail_1-----------------");
|
||||
// // print(value!.result!.data!.notificationMasterId);
|
||||
// // print(value.result!.data!.notificationTitle);
|
||||
// // });
|
||||
// data.fetchListMenu();
|
||||
// if (env["dashboard"]["attendance"]) {
|
||||
// data.fetchAttendanceTracking(context);
|
||||
// }
|
||||
// data.fetchWorkListCounter(context);
|
||||
// if (env["dashboard"]["missingSwipe"]) {
|
||||
// data.fetchMissingSwipe(context);
|
||||
// }
|
||||
// data.fetchLeaveTicketBalance(context, DateTime.now());
|
||||
// data.fetchMenuEntries();
|
||||
// data.getCategoryOffersListAPI(context);
|
||||
// if (env["marathon"]) {
|
||||
// marathonProvider.getMarathonDetailsFromApi();
|
||||
// }
|
||||
// _refreshController.refreshCompleted();
|
||||
// }
|
||||
//
|
||||
// @override
|
||||
// Widget build(BuildContext context) {
|
||||
// return Scaffold(
|
||||
// key: _scaffoldState,
|
||||
// // appBar: AppBar(
|
||||
// // actions: [
|
||||
// // IconButton(
|
||||
// // onPressed: () {
|
||||
// // data.getITGNotification().then((val) {
|
||||
// // if (val!.result!.data != null) {
|
||||
// // print("-------------------- Survey ----------------------------");
|
||||
// // if (val.result!.data!.notificationType == "Survey") {
|
||||
// // Navigator.pushNamed(context, AppRoutes.survey, arguments: val.result!.data);
|
||||
// // } else {
|
||||
// // print("------------------------------------------- Ads --------------------");
|
||||
// // DashboardApiClient().getAdvertisementDetail(val.result!.data!.notificationMasterId ?? "").then(
|
||||
// // (value) {
|
||||
// // if (value!.mohemmItgResponseItem!.statusCode == 200) {
|
||||
// // if (value.mohemmItgResponseItem!.result!.data != null) {
|
||||
// // Navigator.pushNamed(context, AppRoutes.advertisement, arguments: {
|
||||
// // "masterId": val.result!.data!.notificationMasterId,
|
||||
// // "advertisement": value.mohemmItgResponseItem!.result!.data!.advertisement,
|
||||
// // });
|
||||
// //
|
||||
// // // Navigator.push(
|
||||
// // // context,
|
||||
// // // MaterialPageRoute(
|
||||
// // // builder: (BuildContext context) => ITGAdsScreen(
|
||||
// // // addMasterId: val.result!.data!.notificationMasterId!,
|
||||
// // // advertisement: value.mohemmItgResponseItem!.result!.data!.advertisement!,
|
||||
// // // ),
|
||||
// // // ),
|
||||
// // // );
|
||||
// // }
|
||||
// // }
|
||||
// // },
|
||||
// // );
|
||||
// // }
|
||||
// // }
|
||||
// // });
|
||||
// // },
|
||||
// // icon: Icon(Icons.add))
|
||||
// // ],
|
||||
// // ),
|
||||
// body: Column(
|
||||
// children: [
|
||||
// Row(
|
||||
// children: [
|
||||
// Builder(builder: (BuildContext context) {
|
||||
// return Row(
|
||||
// mainAxisSize: MainAxisSize.min,
|
||||
// children: [
|
||||
// Image.memory(
|
||||
// Utils.dataFromBase64String(
|
||||
// AppState().memberInformationList!.eMPLOYEEIMAGE ?? "",
|
||||
// ),
|
||||
// errorBuilder: (BuildContext context, Object error, StackTrace? stackTrace) {
|
||||
// return SvgPicture.asset(
|
||||
// "assets/images/user.svg",
|
||||
// height: 34,
|
||||
// width: 34,
|
||||
// );
|
||||
// },
|
||||
// width: 34,
|
||||
// height: 34,
|
||||
// fit: BoxFit.cover,
|
||||
// ).circle(50),
|
||||
// // CircularAvatar(
|
||||
// // width: 34,
|
||||
// // height: 34,
|
||||
// // url: "https://cdn4.iconfinder.com/data/icons/professions-2-2/151/89-512.png",
|
||||
// // ),
|
||||
// 8.width,
|
||||
// SvgPicture.asset("assets/images/side_nav.svg"),
|
||||
// ],
|
||||
// ).onPress(() {
|
||||
// _scaffoldState.currentState!.openDrawer();
|
||||
// });
|
||||
// }),
|
||||
// Image.asset("assets/images/logos/main_mohemm_logo.png", width: 134, height: 28).expanded,
|
||||
// SvgPicture.asset(
|
||||
// "assets/images/announcements.svg",
|
||||
// matchTextDirection: true,
|
||||
// ).onPress(
|
||||
// () async {
|
||||
// await Navigator.pushNamed(context, AppRoutes.announcements);
|
||||
// },
|
||||
// )
|
||||
// ],
|
||||
// ).paddingOnly(left: 21, right: 21, top: 48, bottom: 7),
|
||||
// Expanded(
|
||||
// child: SmartRefresher(
|
||||
// enablePullDown: true,
|
||||
// enablePullUp: false,
|
||||
// header: const MaterialClassicHeader(
|
||||
// color: MyColors.gradiantEndColor,
|
||||
// ),
|
||||
// controller: _refreshController,
|
||||
// onRefresh: _onRefresh,
|
||||
// child: SingleChildScrollView(
|
||||
// child: Column(
|
||||
// children: [
|
||||
// Column(
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
// children: [
|
||||
// LocaleKeys.welcomeBack.tr().toText14(color: MyColors.grey77Color),
|
||||
// (AppState().memberInformationList!.eMPLOYEENAME ?? "").toText24(isBold: true),
|
||||
// 16.height,
|
||||
// Row(
|
||||
// children: [
|
||||
// if (env["dashboard"]["attendance"])
|
||||
// Expanded(
|
||||
// child: AspectRatio(
|
||||
// aspectRatio: 159 / 159,
|
||||
// child: Consumer<DashboardProviderModel>(
|
||||
// builder: (BuildContext context, DashboardProviderModel model, Widget? child) {
|
||||
// return (model.isAttendanceTrackingLoading
|
||||
// ? GetAttendanceTrackingShimmer()
|
||||
// : Container(
|
||||
// decoration: BoxDecoration(
|
||||
// borderRadius: BorderRadius.circular(15),
|
||||
// gradient: const LinearGradient(
|
||||
// transform: GradientRotation(.46),
|
||||
// begin: Alignment.topRight,
|
||||
// end: Alignment.bottomLeft,
|
||||
// colors: [
|
||||
// MyColors.gradiantEndColor,
|
||||
// MyColors.gradiantStartColor,
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// child: Stack(
|
||||
// alignment: Alignment.center,
|
||||
// children: [
|
||||
// if (model.isTimeRemainingInSeconds == 0) SvgPicture.asset("assets/images/thumb.svg"),
|
||||
// Column(
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
// children: [
|
||||
// Expanded(
|
||||
// child: Column(
|
||||
// mainAxisSize: MainAxisSize.min,
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
// children: [
|
||||
// LocaleKeys.markAttendance.tr().toText14(color: Colors.white, isBold: true),
|
||||
// if (model.isTimeRemainingInSeconds == 0) DateTime.now().toString().split(" ")[0].toText12(color: Colors.white),
|
||||
// if (model.isTimeRemainingInSeconds != 0)
|
||||
// Column(
|
||||
// mainAxisSize: MainAxisSize.min,
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
// children: [
|
||||
// 9.height,
|
||||
// Directionality(
|
||||
// textDirection: ui.TextDirection.ltr,
|
||||
// child: CountdownTimer(
|
||||
// endTime: model.endTime,
|
||||
// onEnd: null,
|
||||
// endWidget: "00:00:00".toText14(color: Colors.white, isBold: true),
|
||||
// textStyle: const TextStyle(color: Colors.white, fontSize: 14, letterSpacing: -0.48, fontWeight: FontWeight.bold),
|
||||
// ),
|
||||
// ),
|
||||
// LocaleKeys.timeLeftToday.tr().toText12(color: Colors.white),
|
||||
// 9.height,
|
||||
// ClipRRect(
|
||||
// borderRadius: const BorderRadius.all(Radius.circular(20)),
|
||||
// child: LinearProgressIndicator(
|
||||
// value: model.progress,
|
||||
// minHeight: 8,
|
||||
// valueColor: const AlwaysStoppedAnimation<Color>(Colors.white),
|
||||
// backgroundColor: const Color(0xff196D73),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ],
|
||||
// ).paddingOnly(top: 12, right: 15, left: 12),
|
||||
// ),
|
||||
// Row(
|
||||
// children: [
|
||||
// Expanded(
|
||||
// child: Column(
|
||||
// mainAxisSize: MainAxisSize.min,
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
// children: [
|
||||
// LocaleKeys.checkIn.tr().toText12(color: Colors.white),
|
||||
// (model.attendanceTracking!.pSwipeIn == null ? "--:--" : model.attendanceTracking!.pSwipeIn)
|
||||
// .toString()
|
||||
// .toText14(color: Colors.white, isBold: true),
|
||||
// 4.height,
|
||||
// ],
|
||||
// ).paddingOnly(left: 12, right: 12),
|
||||
// ),
|
||||
// Container(
|
||||
// margin: EdgeInsets.only(top: AppState().isArabic(context) ? 6 : 0),
|
||||
// width: 45,
|
||||
// height: 45,
|
||||
// padding: const EdgeInsets.only(left: 10, right: 10),
|
||||
// decoration: BoxDecoration(
|
||||
// color: Color(0xff259EA4),
|
||||
// borderRadius: BorderRadius.only(
|
||||
// bottomRight: AppState().isArabic(context) ? Radius.circular(0) : Radius.circular(15),
|
||||
// bottomLeft: AppState().isArabic(context) ? Radius.circular(15) : Radius.circular(0),
|
||||
// ),
|
||||
// ),
|
||||
// child: SvgPicture.asset(model.isTimeRemainingInSeconds == 0 ? "assets/images/attendance.svg" : "assets/images/attendance.svg"),
|
||||
// ).onPress(() {
|
||||
// showMyBottomSheet(
|
||||
// context,
|
||||
// callBackFunc: () {},
|
||||
// child: MarkAttendanceWidget(model, isFromDashboard: true),
|
||||
// );
|
||||
// }),
|
||||
// ],
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ).onPress(
|
||||
// () {
|
||||
// Navigator.pushNamed(context, AppRoutes.todayAttendance);
|
||||
// },
|
||||
// ))
|
||||
// .animatedSwither();
|
||||
// },
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// if (env["dashboard"]["attendance"]) 9.width,
|
||||
// Expanded(
|
||||
// child: MenusWidget(),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ],
|
||||
// ).paddingOnly(left: 21, right: 21, top: 7),
|
||||
// if (env["marathon"])
|
||||
// context.watch<MarathonProvider>().isLoading
|
||||
// ? const MarathonBannerShimmer().paddingAll(20)
|
||||
// : MarathonBanner(isMarathonUpcoming: context.watch<MarathonProvider>().isUpComingMarathon).paddingAll(20),
|
||||
// ServicesWidget(),
|
||||
// 8.height,
|
||||
// if (env["offersDiscount"])
|
||||
// Container(
|
||||
// width: double.infinity,
|
||||
// padding: const EdgeInsets.only(top: 31),
|
||||
// decoration: BoxDecoration(
|
||||
// color: Colors.white,
|
||||
// borderRadius: const BorderRadius.only(topRight: Radius.circular(50), topLeft: Radius.circular(50)),
|
||||
// border: Border.all(color: MyColors.lightGreyEDColor, width: 1),
|
||||
// ),
|
||||
// child: Column(
|
||||
// mainAxisSize: MainAxisSize.min,
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
// children: [
|
||||
// Row(
|
||||
// crossAxisAlignment: CrossAxisAlignment.center,
|
||||
// children: [
|
||||
// Expanded(
|
||||
// child: Column(
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
// mainAxisSize: MainAxisSize.min,
|
||||
// children: [
|
||||
// LocaleKeys.offers.tr().toText12(),
|
||||
// Row(
|
||||
// children: [
|
||||
// LocaleKeys.discounts.tr().toText24(isBold: true),
|
||||
// 6.width,
|
||||
// Container(
|
||||
// padding: const EdgeInsets.only(left: 8, right: 8),
|
||||
// decoration: BoxDecoration(
|
||||
// color: MyColors.yellowColor,
|
||||
// borderRadius: BorderRadius.circular(10),
|
||||
// ),
|
||||
// child: LocaleKeys.newString.tr().toText10(isBold: true)),
|
||||
// ],
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// LocaleKeys.viewAllOffers.tr().toText12(isUnderLine: true).onPress(() {
|
||||
// Navigator.pushNamed(context, AppRoutes.offersAndDiscounts);
|
||||
// })
|
||||
// ],
|
||||
// ).paddingOnly(left: 21, right: 21),
|
||||
// Consumer<DashboardProviderModel>(
|
||||
// builder: (BuildContext context, DashboardProviderModel model, Widget? child) {
|
||||
// return SizedBox(
|
||||
// height: 103 + 33,
|
||||
// child: ListView.separated(
|
||||
// shrinkWrap: true,
|
||||
// physics: const BouncingScrollPhysics(),
|
||||
// padding: const EdgeInsets.only(left: 21, right: 21, top: 13),
|
||||
// scrollDirection: Axis.horizontal,
|
||||
// itemBuilder: (BuildContext cxt, int index) {
|
||||
// return model.isOffersLoading
|
||||
// ? const OffersShimmerWidget()
|
||||
// : InkWell(
|
||||
// onTap: () {
|
||||
// navigateToDetails(data.getOffersList[index]);
|
||||
// },
|
||||
// child: SizedBox(
|
||||
// width: 73,
|
||||
// child: Column(
|
||||
// crossAxisAlignment: CrossAxisAlignment.center,
|
||||
// children: [
|
||||
// Container(
|
||||
// width: 73,
|
||||
// height: 73,
|
||||
// decoration: BoxDecoration(
|
||||
// borderRadius: const BorderRadius.all(
|
||||
// Radius.circular(100),
|
||||
// ),
|
||||
// border: Border.all(color: MyColors.lightGreyE3Color, width: 1),
|
||||
// ),
|
||||
// child: ClipRRect(
|
||||
// borderRadius: const BorderRadius.all(
|
||||
// Radius.circular(50),
|
||||
// ),
|
||||
// child: Hero(
|
||||
// tag: "ItemImage" + data.getOffersList[index].rowID!,
|
||||
// transitionOnUserGestures: true,
|
||||
// child: Image.network(
|
||||
// data.getOffersList[index].bannerImage!,
|
||||
// fit: BoxFit.contain,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// 4.height,
|
||||
// Expanded(
|
||||
// child: AppState().isArabic(context)
|
||||
// ? data.getOffersList[index].titleAR!.toText12(isCenter: true, maxLine: 1)
|
||||
// : data.getOffersList[index].title!.toText12(isCenter: true, maxLine: 1),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// );
|
||||
// },
|
||||
// separatorBuilder: (BuildContext cxt, int index) => 8.width,
|
||||
// itemCount: 6),
|
||||
// );
|
||||
// },
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// )
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// )
|
||||
// ],
|
||||
// ),
|
||||
// drawer: SafeArea(
|
||||
// child: AppDrawer(onLanguageChange: _onRefresh),
|
||||
// ),
|
||||
// bottomNavigationBar: !env["bottomBar"]
|
||||
// ? null
|
||||
// : SizedBox(
|
||||
// height: Platform.isAndroid ? 70 : 100,
|
||||
// child: BottomNavigationBar(
|
||||
// items: <BottomNavigationBarItem>[
|
||||
// BottomNavigationBarItem(
|
||||
// icon: SvgPicture.asset(
|
||||
// "assets/icons/home.svg",
|
||||
// color: currentIndex == 0 ? MyColors.grey3AColor : MyColors.grey98Color,
|
||||
// ).paddingAll(4),
|
||||
// label: LocaleKeys.home.tr(),
|
||||
// ),
|
||||
// BottomNavigationBarItem(
|
||||
// icon: SvgPicture.asset(
|
||||
// "assets/icons/create_req.svg",
|
||||
// color: currentIndex == 1 ? MyColors.grey3AColor : MyColors.grey98Color,
|
||||
// ).paddingAll(4),
|
||||
// label: LocaleKeys.createRequest.tr(),
|
||||
// ),
|
||||
// BottomNavigationBarItem(
|
||||
// icon: Stack(
|
||||
// alignment: Alignment.centerLeft,
|
||||
// children: [
|
||||
// SvgPicture.asset(
|
||||
// "assets/icons/work_list.svg",
|
||||
// color: currentIndex == 2 ? MyColors.grey3AColor : MyColors.grey98Color,
|
||||
// ).paddingAll(4),
|
||||
// Consumer<DashboardProviderModel>(
|
||||
// builder: (BuildContext cxt, DashboardProviderModel data, Widget? child) {
|
||||
// if (data.workListCounter == 0) {
|
||||
// return const SizedBox();
|
||||
// }
|
||||
// return Positioned(
|
||||
// right: 0,
|
||||
// top: 0,
|
||||
// child: Container(
|
||||
// padding: const EdgeInsets.only(left: 4, right: 4),
|
||||
// alignment: Alignment.center,
|
||||
// decoration: BoxDecoration(color: MyColors.redColor, borderRadius: BorderRadius.circular(17)),
|
||||
// child: data.workListCounter.toString().toText10(color: Colors.white),
|
||||
// ),
|
||||
// );
|
||||
// },
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// label: LocaleKeys.workList.tr(),
|
||||
// ),
|
||||
// BottomNavigationBarItem(
|
||||
// icon: SvgPicture.asset(
|
||||
// "assets/icons/item_for_sale.svg",
|
||||
// color: currentIndex == 3 ? MyColors.grey3AColor : MyColors.grey98Color,
|
||||
// ).paddingAll(4),
|
||||
// label: LocaleKeys.itemsForSale.tr(),
|
||||
// ),
|
||||
// BottomNavigationBarItem(
|
||||
// icon: Stack(
|
||||
// alignment: Alignment.centerLeft,
|
||||
// children: [
|
||||
// SvgPicture.asset(
|
||||
// "assets/icons/chat/chat.svg",
|
||||
// color: currentIndex == 4 ? MyColors.grey3AColor : MyColors.grey98Color,
|
||||
// ).paddingAll(4),
|
||||
// Consumer<ChatProviderModel>(
|
||||
// builder: (BuildContext cxt, ChatProviderModel data, Widget? child) {
|
||||
// return Positioned(
|
||||
// right: 0,
|
||||
// top: 0,
|
||||
// child: Container(
|
||||
// padding: const EdgeInsets.only(left: 4, right: 4),
|
||||
// alignment: Alignment.center,
|
||||
// decoration: BoxDecoration(color: MyColors.redColor, borderRadius: BorderRadius.circular(17)),
|
||||
// child: data.chatUConvCounter.toString().toText10(color: Colors.white),
|
||||
// ),
|
||||
// );
|
||||
// },
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// label: LocaleKeys.chat.tr(),
|
||||
// ),
|
||||
// ],
|
||||
// currentIndex: currentIndex,
|
||||
// selectedLabelStyle: const TextStyle(fontSize: 10, color: MyColors.grey3AColor, fontWeight: FontWeight.w600),
|
||||
// unselectedLabelStyle: const TextStyle(fontSize: 10, color: MyColors.grey98Color, fontWeight: FontWeight.w600),
|
||||
// type: BottomNavigationBarType.fixed,
|
||||
// selectedItemColor: MyColors.grey3AColor,
|
||||
// backgroundColor: MyColors.backgroundColor,
|
||||
// selectedIconTheme: const IconThemeData(color: MyColors.grey3AColor, size: 28),
|
||||
// unselectedIconTheme: const IconThemeData(color: MyColors.grey98Color, size: 28),
|
||||
// onTap: (int index) {
|
||||
// if (index == 1) {
|
||||
// Navigator.pushNamed(context, AppRoutes.mowadhafhi);
|
||||
// } else if (index == 2) {
|
||||
// Navigator.pushNamed(context, AppRoutes.workList);
|
||||
// } else if (index == 3) {
|
||||
// Navigator.pushNamed(context, AppRoutes.itemsForSale);
|
||||
// } else if (index == 4) {
|
||||
// Navigator.pushNamed(context, AppRoutes.chat);
|
||||
// }
|
||||
// },
|
||||
// ),
|
||||
// ),
|
||||
// );
|
||||
// }
|
||||
//
|
||||
// void navigateToDetails(OffersListModel offersListModelObj) {
|
||||
// List<OffersListModel> getOffersDetailList = [];
|
||||
// getOffersDetailList.clear();
|
||||
// int counter = 1;
|
||||
//
|
||||
// getOffersDetailList.add(offersListModelObj);
|
||||
//
|
||||
// for (OffersListModel element in data.getOffersList) {
|
||||
// if (counter <= 4) {
|
||||
// if (element.rowID != offersListModelObj.rowID) {
|
||||
// getOffersDetailList.add(element);
|
||||
// counter++;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// Navigator.pushNamed(context, AppRoutes.offersAndDiscountsDetails, arguments: getOffersDetailList);
|
||||
// }
|
||||
// }
|
||||
@ -1,60 +0,0 @@
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class DrawerItem extends StatefulWidget {
|
||||
final String title;
|
||||
final String subTitle;
|
||||
final IconData icon;
|
||||
final Color color;
|
||||
final dynamic assetLink;
|
||||
|
||||
const DrawerItem(this.title, {required this.icon, required this.color, this.subTitle = '', this.assetLink});
|
||||
|
||||
@override
|
||||
_DrawerItemState createState() => _DrawerItemState();
|
||||
}
|
||||
|
||||
class _DrawerItemState extends State<DrawerItem> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
margin: EdgeInsets.only(top: 0, bottom: 5, left: 0, right: 0),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
if (widget.assetLink != null)
|
||||
Container(
|
||||
height: 20,
|
||||
width: 20,
|
||||
child: Image.asset(widget.assetLink),
|
||||
),
|
||||
if (widget.assetLink == null)
|
||||
Icon(
|
||||
widget.icon,
|
||||
color: widget.color,
|
||||
size: 25,
|
||||
),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width * 0.45,
|
||||
child: Text(widget.title,
|
||||
style: TextStyle(
|
||||
color: widget.color ?? Color(0xFF2E303A),
|
||||
fontSize: 14,
|
||||
fontFamily: 'Poppins',
|
||||
fontWeight: FontWeight.w600,
|
||||
letterSpacing: -0.84,
|
||||
)),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,212 @@
|
||||
import 'dart:async';
|
||||
import 'dart:ui' as ui;
|
||||
|
||||
import 'package:auto_size_text/auto_size_text.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_countdown_timer/current_remaining_time.dart';
|
||||
import 'package:flutter_countdown_timer/flutter_countdown_timer.dart';
|
||||
import 'package:mohem_flutter_app/classes/colors.dart';
|
||||
import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
|
||||
import 'package:mohem_flutter_app/main.dart';
|
||||
import 'package:mohem_flutter_app/ui/marathon/marathon_provider.dart';
|
||||
|
||||
class CountdownTimerForDetailScreen extends StatelessWidget {
|
||||
final int timeToMarathon;
|
||||
final MarathonProvider provider;
|
||||
|
||||
CountdownTimerForDetailScreen({
|
||||
Key? key,
|
||||
required this.provider,
|
||||
required this.timeToMarathon,
|
||||
}) : super(key: key);
|
||||
|
||||
final TextStyle styleTextHome = TextStyle(
|
||||
color: MyColors.white.withOpacity(0.45),
|
||||
fontStyle: FontStyle.italic,
|
||||
fontWeight: FontWeight.w800,
|
||||
letterSpacing: -0.4,
|
||||
);
|
||||
|
||||
final TextStyle styleDigitHome = TextStyle(
|
||||
height: 22 / 27,
|
||||
color: MyColors.white,
|
||||
fontSize: isTablet ? 30 : 15,
|
||||
fontStyle: FontStyle.italic,
|
||||
letterSpacing: -1.44,
|
||||
fontWeight: FontWeight.bold,
|
||||
);
|
||||
|
||||
final TextStyle styleTextMarathon = const TextStyle(
|
||||
fontSize: 10,
|
||||
fontStyle: FontStyle.normal,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: MyColors.grey57Color,
|
||||
letterSpacing: -0.4,
|
||||
);
|
||||
|
||||
final TextStyle styleDigitMarathon = const TextStyle(
|
||||
height: 23 / 24,
|
||||
color: MyColors.darkTextColor,
|
||||
fontSize: 34,
|
||||
letterSpacing: -1.44,
|
||||
fontWeight: FontWeight.bold,
|
||||
);
|
||||
|
||||
Widget buildSeparator() {
|
||||
return AutoSizeText(
|
||||
" : ",
|
||||
maxFontSize: 24,
|
||||
minFontSize: 20,
|
||||
style: styleDigitMarathon,
|
||||
);
|
||||
}
|
||||
|
||||
Widget getTimeDigit(String text) {
|
||||
return AutoSizeText(
|
||||
text,
|
||||
maxFontSize: 24,
|
||||
minFontSize: 20,
|
||||
style: styleDigitMarathon,
|
||||
);
|
||||
}
|
||||
|
||||
Widget getTimeText(String text) {
|
||||
return AutoSizeText(
|
||||
text,
|
||||
minFontSize: 7,
|
||||
maxFontSize: 8,
|
||||
style: styleTextMarathon,
|
||||
);
|
||||
}
|
||||
|
||||
Widget buildEmptyWidget() {
|
||||
return Directionality(
|
||||
textDirection: ui.TextDirection.ltr,
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Column(
|
||||
children: <Widget>[
|
||||
getTimeDigit("00"),
|
||||
getTimeText(LocaleKeys.days.tr()),
|
||||
],
|
||||
),
|
||||
buildSeparator(),
|
||||
Column(
|
||||
children: <Widget>[
|
||||
getTimeDigit("00"),
|
||||
getTimeText(LocaleKeys.hours.tr()),
|
||||
],
|
||||
),
|
||||
buildSeparator(),
|
||||
Column(
|
||||
children: <Widget>[
|
||||
getTimeDigit("00"),
|
||||
getTimeText(LocaleKeys.minutes.tr()),
|
||||
],
|
||||
),
|
||||
buildSeparator(),
|
||||
Column(
|
||||
children: <Widget>[
|
||||
getTimeDigit("00"),
|
||||
getTimeText(LocaleKeys.seconds.tr()),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget buildCountdownTimer(CurrentRemainingTime? time) {
|
||||
if (provider.marathonDetailModel.startTime != null) {
|
||||
int remainingTimeInMinutes = DateTime.parse(provider.marathonDetailModel.startTime!).difference(DateTime.now()).inMinutes;
|
||||
if (remainingTimeInMinutes <= 30) {
|
||||
scheduleMicrotask(() {
|
||||
provider.canPlayDemo = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (time == null) {
|
||||
if (!provider.itsMarathonTime) {
|
||||
scheduleMicrotask(() {
|
||||
provider.itsMarathonTime = true;
|
||||
provider.isButtonEnabled = true;
|
||||
provider.startTimerToWaitForMarathon();
|
||||
});
|
||||
}
|
||||
|
||||
return provider.itsMarathonTime
|
||||
? Directionality(
|
||||
textDirection: ui.TextDirection.ltr,
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Column(
|
||||
children: <Widget>[
|
||||
getTimeDigit(provider.totalSecondsToWaitForMarathon.toString()),
|
||||
getTimeText(LocaleKeys.seconds.tr()),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
: buildEmptyWidget();
|
||||
}
|
||||
|
||||
return Directionality(
|
||||
textDirection: ui.TextDirection.ltr,
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Column(
|
||||
children: <Widget>[
|
||||
time.days == null ? getTimeDigit("00") : getTimeDigit(time.days! < 10 ? "0${time.days.toString()}" : time.days.toString()),
|
||||
getTimeText(LocaleKeys.days.tr()),
|
||||
],
|
||||
),
|
||||
buildSeparator(),
|
||||
Column(
|
||||
children: <Widget>[
|
||||
time.hours == null ? getTimeDigit("00") : getTimeDigit(time.hours! < 10 ? "0${time.hours.toString()}" : time.hours.toString()),
|
||||
getTimeText(LocaleKeys.hours.tr()),
|
||||
],
|
||||
),
|
||||
buildSeparator(),
|
||||
Column(
|
||||
children: <Widget>[
|
||||
time.min == null ? getTimeDigit("00") : getTimeDigit(time.min! < 10 ? "0${time.min.toString()}" : time.min.toString()),
|
||||
getTimeText(LocaleKeys.minutes.tr()),
|
||||
],
|
||||
),
|
||||
buildSeparator(),
|
||||
Column(
|
||||
children: <Widget>[
|
||||
time.sec == null ? getTimeDigit("00") : getTimeDigit(time.sec! < 10 ? "0${time.sec.toString()}" : time.sec.toString()),
|
||||
getTimeText(LocaleKeys.seconds.tr()),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return CountdownTimer(
|
||||
// endTime: dummyTime,
|
||||
endTime: timeToMarathon,
|
||||
onEnd: null,
|
||||
widgetBuilder: (BuildContext context, CurrentRemainingTime? time) {
|
||||
return buildCountdownTimer(time);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -1,93 +0,0 @@
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:lottie/lottie.dart';
|
||||
import 'package:mohem_flutter_app/classes/colors.dart';
|
||||
import 'package:mohem_flutter_app/classes/decorations_helper.dart';
|
||||
import 'package:mohem_flutter_app/classes/lottie_consts.dart';
|
||||
import 'package:mohem_flutter_app/extensions/int_extensions.dart';
|
||||
import 'package:mohem_flutter_app/extensions/string_extensions.dart';
|
||||
import 'package:mohem_flutter_app/extensions/widget_extensions.dart';
|
||||
import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
|
||||
import 'package:mohem_flutter_app/widgets/app_bar_widget.dart';
|
||||
|
||||
class WinnerScreen extends StatelessWidget {
|
||||
const WinnerScreen({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: MyColors.backgroundColor,
|
||||
appBar: AppBarWidget(context, title: LocaleKeys.brainMarathon.tr()),
|
||||
body: SingleChildScrollView(
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
60.height,
|
||||
Container(
|
||||
width: double.infinity,
|
||||
decoration: MyDecorations.shadowDecoration,
|
||||
padding: const EdgeInsets.symmetric(vertical: 20, horizontal: 20),
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
SizedBox(
|
||||
height: 200,
|
||||
child: Stack(
|
||||
children: <Widget>[
|
||||
Lottie.asset(
|
||||
MyLottieConsts.celebrate1Lottie,
|
||||
height: 200,
|
||||
),
|
||||
Lottie.asset(
|
||||
MyLottieConsts.celebrate2Lottie,
|
||||
height: 200,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
26.height,
|
||||
SizedBox(
|
||||
height: 50,
|
||||
child: Stack(
|
||||
children: [
|
||||
Align(
|
||||
alignment: Alignment.center,
|
||||
child: SvgPicture.asset(
|
||||
"assets/images/winner_ribbon.svg",
|
||||
height: 50,
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: Alignment.center,
|
||||
child: "WINNER".toText32(color: MyColors.white, isBold: true).paddingOnly(top: 07),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
12.height,
|
||||
"Muhammad Shrouff".toText22(color: MyColors.grey3AColor),
|
||||
"837436".toText22(color: MyColors.grey57Color),
|
||||
80.height,
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
LocaleKeys.sponsoredBy.tr().toText14(color: MyColors.grey77Color),
|
||||
" Extra".toText14(color: MyColors.darkTextColor, isBold: true),
|
||||
],
|
||||
),
|
||||
5.height,
|
||||
Image.asset(
|
||||
"assets/images/logos/main_mohemm_logo.png",
|
||||
height: 40,
|
||||
fit: BoxFit.fill,
|
||||
width: 150,
|
||||
)
|
||||
],
|
||||
),
|
||||
).paddingOnly(left: 21, right: 21),
|
||||
10.height,
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue