Merge branch 'master' of https://gitlab.com/Cloud_Solution/mohemm-flutter-app into sultan-dev
# Conflicts: # assets/langs/ar-SA.json # assets/langs/en-US.json # lib/classes/consts.dart # lib/generated/locale_keys.g.dart # lib/ui/landing/dashboard_screen.dartsultan-dev
commit
61904ca5f7
@ -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,59 @@
|
||||
import 'dart:convert';
|
||||
import 'dart:io';
|
||||
import 'package:firebase_messaging/firebase_messaging.dart';
|
||||
import 'package:mohem_flutter_app/app_state/app_state.dart';
|
||||
import 'package:mohem_flutter_app/main.dart';
|
||||
import 'package:permission_handler/permission_handler.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) {
|
||||
// print("-------------------- Permission Granted ------------------------");
|
||||
// print(granted);
|
||||
// await Permission.notification.request();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// Future<void> isAndroidPermGranted() async {
|
||||
// if (Platform.isAndroid) {
|
||||
// bool granted = await flutterLocalNotificationsPlugin.resolvePlatformSpecificImplementation<AndroidFlutterLocalNotificationsPlugin>()?.areNotificationsEnabled() ?? false;
|
||||
// }
|
||||
// }
|
||||
|
||||
void initNotification(String? firebaseToken) async {
|
||||
// await requestPermissions();
|
||||
AppState().setDeviceToken = firebaseToken;
|
||||
// await Permission.notification.isDenied.then((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(_handleMessage);
|
||||
}
|
||||
|
||||
void _handleMessage(RemoteMessage message) {
|
||||
print("Handle Message");
|
||||
logger.w(json.encode(message));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,59 @@
|
||||
import 'dart:async';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:firebase_messaging/firebase_messaging.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:mohem_flutter_app/app_state/app_state.dart';
|
||||
|
||||
// |--> Push Notification Background
|
||||
Future<dynamic> backgroundMessageHandler(message) async {
|
||||
print("Firebase backgroundMessageHandler!!!");
|
||||
}
|
||||
|
||||
class PushNotificationHandler {
|
||||
final BuildContext context;
|
||||
static PushNotificationHandler? _instance;
|
||||
|
||||
PushNotificationHandler(this.context) {
|
||||
PushNotificationHandler._instance = this;
|
||||
}
|
||||
|
||||
static PushNotificationHandler getInstance() => _instance!;
|
||||
|
||||
void init() async {
|
||||
FirebaseMessaging.onMessage.listen((RemoteMessage message) async {
|
||||
if (Platform.isIOS) {
|
||||
await Future.delayed(Duration(milliseconds: 3000)).then((value) {
|
||||
newMessage(message);
|
||||
});
|
||||
} else {
|
||||
newMessage(message);
|
||||
}
|
||||
});
|
||||
|
||||
FirebaseMessaging.onMessageOpenedApp.listen((RemoteMessage message) async {
|
||||
if (Platform.isIOS) {
|
||||
await Future.delayed(Duration(milliseconds: 3000)).then((value) {
|
||||
newMessage(message);
|
||||
});
|
||||
} else {
|
||||
newMessage(message);
|
||||
}
|
||||
});
|
||||
|
||||
FirebaseMessaging.instance.onTokenRefresh.listen((fcm_token) {
|
||||
print("Push Notification onTokenRefresh: " + fcm_token);
|
||||
AppState().setDeviceToken = fcm_token;
|
||||
});
|
||||
|
||||
FirebaseMessaging.onBackgroundMessage(backgroundMessageHandler);
|
||||
}
|
||||
|
||||
void newMessage(RemoteMessage remoteMessage) async {
|
||||
print("Remote Message: " + remoteMessage.data.toString());
|
||||
if (remoteMessage.data.isEmpty) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
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,
|
||||
],
|
||||
);
|
||||
}
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -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,
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue