Added UI Components for Marathon Module.. WIP

faiz_marathon_signalR_critical
FaizHashmiCS22 2 years ago
parent 5c848fec87
commit 38c7d78db3

@ -1,3 +1,3 @@
org.gradle.jvmargs=-Xmx1536M
org.gradle.jvmargs=-Xmx1836M
android.useAndroidX=true
android.enableJetifier=true

@ -1,86 +1,63 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="411" height="166" viewBox="0 0 411 166">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="333" height="88.222" viewBox="0 0 333 88.222">
<defs>
<filter id="Rectangle_17686" x="0" y="0" width="404" height="166" filterUnits="userSpaceOnUse">
<feOffset input="SourceAlpha"/>
<feGaussianBlur stdDeviation="13" result="blur"/>
<feFlood flood-opacity="0.082"/>
<feComposite operator="in" in2="blur"/>
<feComposite in="SourceGraphic"/>
</filter>
<filter id="Rectangle_17368" x="0" y="0" width="411" height="166" filterUnits="userSpaceOnUse">
<feOffset input="SourceAlpha"/>
<feGaussianBlur stdDeviation="13" result="blur-2"/>
<feFlood flood-opacity="0.082"/>
<feComposite operator="in" in2="blur-2"/>
<feComposite in="SourceGraphic"/>
</filter>
<clipPath id="clip-path">
<rect id="Rectangle_17622" data-name="Rectangle 17622" width="113.78" height="88.523" transform="translate(0 4)" fill="none"/>
</clipPath>
<clipPath id="clip-path-2">
<rect id="Rectangle_17530" data-name="Rectangle 17530" width="139.781" height="112.186" fill="none"/>
</clipPath>
<clipPath id="clip-path-5">
<rect id="Rectangle_17532" data-name="Rectangle 17532" width="54.986" height="20.029" fill="none"/>
</clipPath>
<clipPath id="clip-path-7">
<clipPath id="clip-path-2">
<rect id="Rectangle_17534" data-name="Rectangle 17534" width="53.565" height="20.029" fill="none"/>
</clipPath>
<clipPath id="clip-path-16">
<clipPath id="clip-path-5">
<rect id="Rectangle_17611" data-name="Rectangle 17611" width="3.17" height="3.078" fill="none"/>
</clipPath>
<clipPath id="clip-path-17">
<clipPath id="clip-path-6">
<rect id="Rectangle_17612" data-name="Rectangle 17612" width="24.935" height="20.245" fill="none"/>
</clipPath>
<clipPath id="clip-path-18">
<clipPath id="clip-path-7">
<rect id="Rectangle_17613" data-name="Rectangle 17613" width="3.055" height="3.482" fill="none"/>
</clipPath>
<clipPath id="clip-path-19">
<clipPath id="clip-path-8">
<rect id="Rectangle_17614" data-name="Rectangle 17614" width="28.702" height="40.403" fill="none"/>
</clipPath>
<clipPath id="clip-path-20">
<clipPath id="clip-path-9">
<rect id="Rectangle_17615" data-name="Rectangle 17615" width="5.095" height="7.494" fill="none"/>
</clipPath>
<clipPath id="clip-path-21">
<clipPath id="clip-path-10">
<rect id="Rectangle_17616" data-name="Rectangle 17616" width="2.545" height="2.051" fill="none"/>
</clipPath>
<clipPath id="clip-path-22">
<clipPath id="clip-path-11">
<rect id="Rectangle_17617" data-name="Rectangle 17617" width="10.274" height="13.454" fill="none"/>
</clipPath>
<clipPath id="clip-path-24">
<clipPath id="clip-path-12">
<rect id="Rectangle_17619" data-name="Rectangle 17619" width="6.621" height="5.261" fill="none"/>
</clipPath>
<clipPath id="clip-path-25">
<clipPath id="clip-path-13">
<rect id="Rectangle_17620" data-name="Rectangle 17620" width="61.469" height="15.006" fill="none"/>
</clipPath>
<clipPath id="clip-path-26">
<g transform="matrix(1, 0, 0, 1, 0, 0)" filter="url(#Rectangle_17686)">
<rect id="Rectangle_17686-2" data-name="Rectangle 17686" width="326" height="88" rx="15" transform="translate(1)" fill="#fff"/>
</g>
<clipPath id="clip-path-14">
<rect id="Rectangle_17693" data-name="Rectangle 17693" width="333" height="88" rx="15" transform="translate(1 4.523)" fill="#fff"/>
</clipPath>
<clipPath id="clip-path-15">
<rect id="Rectangle_17685" data-name="Rectangle 17685" width="111.63" height="15.945" transform="translate(0 0)" fill="none"/>
</clipPath>
<clipPath id="clip-path-16">
<rect id="Rectangle_17626" data-name="Rectangle 17626" width="111.63" height="15.947" transform="translate(0 0)" fill="none"/>
</clipPath>
<clipPath id="clip-path-18">
<rect id="Rectangle_17684" data-name="Rectangle 17684" width="111.63" height="15.894" transform="translate(0 0)" fill="none"/>
</clipPath>
<clipPath id="clip-path-27">
<rect id="Rectangle_17685" data-name="Rectangle 17685" width="111.63" height="31.894" transform="translate(0 0)" fill="none"/>
<clipPath id="clip-path-19">
<rect id="Rectangle_17683" data-name="Rectangle 17683" width="111.63" height="15.748" transform="translate(0 0)" fill="none"/>
</clipPath>
</defs>
<g id="Group_8897" data-name="Group 8897" transform="translate(18 -283)">
<g id="Group_8897" data-name="Group 8897" transform="translate(-21 -321.778)">
<g id="Group_8890" data-name="Group 8890" transform="translate(20 317.477)">
<g id="Group_8745" data-name="Group 8745">
<g transform="matrix(1, 0, 0, 1, -38, -34.48)" filter="url(#Rectangle_17368)">
<rect id="Rectangle_17368-2" data-name="Rectangle 17368" width="333" height="88" rx="15" transform="translate(39 39)" fill="#fff"/>
</g>
<rect id="Rectangle_17692" data-name="Rectangle 17692" width="333" height="88" rx="15" transform="translate(1 4.523)" fill="#fff"/>
<g id="Group_8889" data-name="Group 8889" transform="translate(1)">
<g id="Group_8874" data-name="Group 8874" clip-path="url(#clip-path)">
<rect id="Rectangle_17517" data-name="Rectangle 17517" width="139.781" height="0.075" transform="translate(-14 80.757)" fill="#ebebeb"/>
<rect id="Rectangle_17518" data-name="Rectangle 17518" width="9.26" height="0.075" transform="translate(102.515 85.603)" fill="#ebebeb"/>
<rect id="Rectangle_17519" data-name="Rectangle 17519" width="2.43" height="0.075" transform="translate(76.166 86.42)" fill="#ebebeb"/>
<rect id="Rectangle_17520" data-name="Rectangle 17520" width="5.365" height="0.075" transform="translate(96.87 82.807)" fill="#ebebeb"/>
<rect id="Rectangle_17521" data-name="Rectangle 17521" width="12.075" height="0.075" transform="translate(0.665 83.313)" fill="#ebebeb"/>
<rect id="Rectangle_17522" data-name="Rectangle 17522" width="1.77" height="0.075" transform="translate(15.229 83.313)" fill="#ebebeb"/>
<g id="Group_8902" data-name="Group 8902">
<rect id="Rectangle_17523" data-name="Rectangle 17523" width="26.188" height="0.075" transform="translate(22.754 84.584)" fill="#ebebeb"/>
<g id="Group_8796" data-name="Group 8796" transform="translate(-14 -13.831)">
<g id="Group_8795" data-name="Group 8795" clip-path="url(#clip-path-2)">
<path id="Path_13974" data-name="Path 13974" d="M93.786,85.16H39.8a1.662,1.662,0,0,1-1.6-1.719V1.719A1.663,1.663,0,0,1,39.8,0H93.786a1.663,1.663,0,0,1,1.6,1.719V83.441a1.662,1.662,0,0,1-1.6,1.719M39.8.075a1.589,1.589,0,0,0-1.526,1.643V83.441A1.589,1.589,0,0,0,39.8,85.085H93.786a1.59,1.59,0,0,0,1.526-1.643V1.719A1.59,1.59,0,0,0,93.786.075Z" transform="translate(-27.526)" fill="#ebebeb"/>
<path id="Path_13975" data-name="Path 13975" d="M310.083,85.16H256.1a1.662,1.662,0,0,1-1.6-1.719V1.719A1.662,1.662,0,0,1,256.1,0h53.983a1.663,1.663,0,0,1,1.6,1.719V83.441a1.662,1.662,0,0,1-1.6,1.719M256.1.075a1.589,1.589,0,0,0-1.526,1.643V83.441a1.589,1.589,0,0,0,1.526,1.643h53.983a1.59,1.59,0,0,0,1.526-1.643V1.719A1.59,1.59,0,0,0,310.083.075Z" transform="translate(-183.355)" fill="#ebebeb"/>
<g id="Group_8903" data-name="Group 8903">
<path id="Path_13976" data-name="Path 13976" d="M375.306,83.743l1.573-.7H389.2l2.8,5.96v1.567Z" transform="translate(-270.385 -58.043)" fill="#e0e0e0"/>
<rect id="Rectangle_17524" data-name="Rectangle 17524" width="1.229" height="49.47" transform="translate(114.478 30.231)" fill="#e0e0e0"/>
<path id="Path_13977" data-name="Path 13977" d="M392.3,92.514H378.694l-3.123-6.829h13.605Z" transform="translate(-270.576 -59.887)" fill="#f0f0f0"/>
@ -111,10 +88,10 @@
</g>
</g>
<g id="Group_8803" data-name="Group 8803" transform="translate(-14 -17.831)">
<g id="Group_8802" data-name="Group 8802" clip-path="url(#clip-path-2)">
<g id="Group_8904" data-name="Group 8904">
<g id="Group_8801" data-name="Group 8801" transform="translate(17.645 78.597)" style="isolation: isolate">
<g id="Group_8800" data-name="Group 8800">
<g id="Group_8799" data-name="Group 8799" clip-path="url(#clip-path-5)">
<g id="Group_8799" data-name="Group 8799" clip-path="url(#clip-path)">
<path id="Path_13998" data-name="Path 13998" d="M118.1,281.077H67.812l1.112-19.237,44.482-.792Z" transform="translate(-63.115 -261.048)" fill="#126055"/>
</g>
</g>
@ -123,17 +100,17 @@
</g>
<path id="Path_13999" data-name="Path 13999" d="M101.091,261.048l-44.6,1.146-7.765,18.883h47.67Z" transform="translate(-47.216 -200.282)" fill="#407bff"/>
<g id="Group_8811" data-name="Group 8811" transform="translate(-14 -17.831)">
<g id="Group_8810" data-name="Group 8810" clip-path="url(#clip-path-2)">
<g id="Group_8905" data-name="Group 8905">
<g id="Group_8806" data-name="Group 8806" transform="translate(14.31 78.597)" style="isolation: isolate">
<g id="Group_8805" data-name="Group 8805">
<g id="Group_8804" data-name="Group 8804" clip-path="url(#clip-path-7)">
<g id="Group_8804" data-name="Group 8804" clip-path="url(#clip-path-2)">
<path id="Path_14000" data-name="Path 14000" d="M98.713,261.048l-44.552.705L46.1,281.076H94.22Z" transform="translate(-45.148 -261.048)" fill="#2bb8a6"/>
</g>
</g>
</g>
<g id="Group_8809" data-name="Group 8809" transform="translate(70.795 78.597)" style="isolation: isolate">
<g id="Group_8808" data-name="Group 8808">
<g id="Group_8807" data-name="Group 8807" clip-path="url(#clip-path-5)">
<g id="Group_8807" data-name="Group 8807" clip-path="url(#clip-path)">
<path id="Path_14001" data-name="Path 14001" d="M308.221,281.077h-50.29l-4.7-20.029h50.29Z" transform="translate(-253.235 -261.048)" fill="#126055"/>
</g>
</g>
@ -142,10 +119,10 @@
</g>
<path id="Path_14002" data-name="Path 14002" d="M291.211,261.048h-50.29l-4.7,20.029h50.29Z" transform="translate(-184.185 -200.282)" fill="#407bff"/>
<g id="Group_8816" data-name="Group 8816" transform="translate(-14 -17.831)">
<g id="Group_8815" data-name="Group 8815" clip-path="url(#clip-path-2)">
<g id="Group_8906" data-name="Group 8906">
<g id="Group_8814" data-name="Group 8814" transform="translate(66.039 78.597)" style="isolation: isolate">
<g id="Group_8813" data-name="Group 8813">
<g id="Group_8812" data-name="Group 8812" clip-path="url(#clip-path-5)">
<g id="Group_8812" data-name="Group 8812" clip-path="url(#clip-path)">
<path id="Path_14003" data-name="Path 14003" d="M291.211,261.048h-50.29l-4.7,20.029h50.29Z" transform="translate(-236.224 -261.048)" fill="#2bb8a6"/>
</g>
</g>
@ -153,7 +130,7 @@
</g>
</g>
<g id="Group_8865" data-name="Group 8865" transform="translate(-14 -17.831)">
<g id="Group_8864" data-name="Group 8864" clip-path="url(#clip-path-2)">
<g id="Group_8901" data-name="Group 8901">
<path id="Path_14006" data-name="Path 14006" d="M233.648,116.585a3.128,3.128,0,0,0-3.22-1.913c-2.516.25-4.939,3.663-7.222,2.961s-2-2.249-2-2.249-.839,2.227,2,4.095,6.7-2.849,9.921-1.444Z" transform="translate(-159.279 -80.134)" fill="#2e353a"/>
<path id="Path_14007" data-name="Path 14007" d="M240.7,114.478a4.2,4.2,0,0,0-3.5-2.829c-2.691-.226-4.263,3.437-6.325,2.829" transform="translate(-166.331 -78.027)" fill="none" stroke="#263238" stroke-linecap="round" stroke-linejoin="round" stroke-width="0.48"/>
<path id="Path_14008" data-name="Path 14008" d="M267.912,122.383s.956-4.252-2.358-5.11-4.805,1.234-5.364,3.55.851,5.538,3.85,5.006,3.751-2.438,3.871-3.446" transform="translate(-187.365 -81.827)" fill="#2e353a"/>
@ -163,7 +140,7 @@
<path id="Path_14012" data-name="Path 14012" d="M183.027,277.67a.233.233,0,0,1-.049-.005.242.242,0,0,1-.212-.178c-.078-.333.615-.966.755-1.089a.063.063,0,0,1,.027-.014h0s.008,0,.013,0a.076.076,0,0,1,.038.013h0s0,0,0,0h0l0,0h0a1.566,1.566,0,0,1,.434.873.417.417,0,0,1-.143.306c-.1.085-.181.106-.256.063-.114-.066-.157-.3-.168-.54a1.1,1.1,0,0,1-.289.51.261.261,0,0,1-.157.057m.435-1.034c-.293.283-.607.661-.57.817,0,.014.013.055.111.076a.132.132,0,0,0,.108-.029,1.8,1.8,0,0,0,.352-.863m.15-.021c-.03.419-.006.849.091.906.03.018.083-.023.112-.048a.277.277,0,0,0,.1-.2,1.2,1.2,0,0,0-.3-.654" transform="translate(-131.667 -193.169)" fill="#407bff"/>
<g id="Group_8845" data-name="Group 8845" transform="translate(54.432 81.856)" opacity="0.2" style="isolation: isolate">
<g id="Group_8844" data-name="Group 8844">
<g id="Group_8843" data-name="Group 8843" clip-path="url(#clip-path-16)">
<g id="Group_8843" data-name="Group 8843" clip-path="url(#clip-path-5)">
<path id="Path_14013" data-name="Path 14013" d="M194.7,273.79l.934-1.916,2.236.811-.588,2.267Z" transform="translate(-194.704 -271.874)"/>
</g>
</g>
@ -171,7 +148,7 @@
<path id="Path_14014" data-name="Path 14014" d="M223.861,235.868c-1.012,4.721-5.537,20.832-12.57,20.228s-12.2-4.774-12.345-6.678.4-2.95,2.159-2.954,6.907,1.7,9.153,1.524,4.342-10.438,4.342-10.438Z" transform="translate(-143.313 -164.853)" fill="#407bff"/>
<g id="Group_8848" data-name="Group 8848" transform="translate(55.612 71.015)" style="isolation: isolate">
<g id="Group_8847" data-name="Group 8847">
<g id="Group_8846" data-name="Group 8846" clip-path="url(#clip-path-17)">
<g id="Group_8846" data-name="Group 8846" clip-path="url(#clip-path-6)">
<path id="Path_14015" data-name="Path 14015" d="M223.861,235.868c-1.012,4.721-5.537,20.832-12.57,20.228s-12.2-4.774-12.345-6.678.4-2.95,2.159-2.954,6.907,1.7,9.153,1.524,4.342-10.438,4.342-10.438Z" transform="translate(-198.925 -235.868)" fill="#157e8c"/>
</g>
</g>
@ -181,7 +158,7 @@
<path id="Path_14018" data-name="Path 14018" d="M354.247,345.2a1.5,1.5,0,0,0-.169.026h-.038a.2.2,0,0,1-.058-.034v-.022a.028.028,0,0,0-.006-.02s.006-.011.006-.016h0c0-.009.013-.019.013-.029a1.661,1.661,0,0,1,.221-.963.365.365,0,0,1,.3-.127c.124,0,.2.05.233.135.044.131-.064.334-.2.524a.948.948,0,0,1,.531-.176.258.258,0,0,1,.187.108.3.3,0,0,1,.049.3c-.119.248-.739.3-1.065.3m.784-.567a1.708,1.708,0,0,0-.763.4c.393,0,.861-.062.929-.206.006-.013.024-.051-.037-.135a.135.135,0,0,0-.1-.055l-.03,0m-.525-.611c-.074,0-.135.092-.186.149a1.327,1.327,0,0,0-.177.735c.279-.292.526-.68.488-.792a.172.172,0,0,0-.113-.092Z" transform="translate(-255.017 -240.437)" fill="#407bff"/>
<g id="Group_8851" data-name="Group 8851" transform="translate(94.406 99.775)" opacity="0.2" style="isolation: isolate">
<g id="Group_8850" data-name="Group 8850">
<g id="Group_8849" data-name="Group 8849" clip-path="url(#clip-path-18)">
<g id="Group_8849" data-name="Group 8849" clip-path="url(#clip-path-7)">
<path id="Path_14019" data-name="Path 14019" d="M340.75,334.1l-1.878.77-1.178-2.2,1.834-1.28Z" transform="translate(-337.695 -331.388)"/>
</g>
</g>
@ -189,7 +166,7 @@
<path id="Path_14020" data-name="Path 14020" d="M249.431,204.77s-3.9,6.256-3.1,10.916c.942,5.5,13.25,11.694,16.6,14.431s4.927,13.073,9.1,15.056l2.274-.878a5.739,5.739,0,0,0,.292-4.65c-3.631-12.285-6.636-18.156-16.666-25.512a62.225,62.225,0,0,0,.383-8.972Z" transform="translate(-177.386 -143.118)" fill="#407bff"/>
<g id="Group_8854" data-name="Group 8854" transform="translate(68.833 61.652)" style="isolation: isolate">
<g id="Group_8853" data-name="Group 8853">
<g id="Group_8852" data-name="Group 8852" clip-path="url(#clip-path-19)">
<g id="Group_8852" data-name="Group 8852" clip-path="url(#clip-path-8)">
<path id="Path_14021" data-name="Path 14021" d="M249.431,204.77s-3.9,6.256-3.1,10.916c.942,5.5,13.25,11.694,16.6,14.431s4.927,13.073,9.1,15.056l2.274-.878a5.739,5.739,0,0,0,.292-4.65c-3.631-12.285-6.636-18.156-16.666-25.512a62.225,62.225,0,0,0,.383-8.972Z" transform="translate(-246.219 -204.77)" fill="#1d92aa"/>
</g>
</g>
@ -197,7 +174,7 @@
<path id="Path_14022" data-name="Path 14022" d="M278.512,244.82l-.559.217c-1.269-1.74-2.306-4.878-3.394-8.171-1.155-3.49-2.348-7.1-3.754-8.53a57.1,57.1,0,0,0-5.661-4.384c-5.13-3.712-10.948-7.918-11.336-10.484-.411-2.728.883-6.612,1.658-8.611l.6.027c-.735,1.876-2.105,5.844-1.7,8.488.349,2.306,6.559,6.8,11.093,10.08a57.033,57.033,0,0,1,5.737,4.447c1.5,1.532,2.664,5.043,3.894,8.764,1.062,3.213,2.158,6.527,3.427,8.156" transform="translate(-182.796 -143.179)" fill="#126055"/>
<g id="Group_8857" data-name="Group 8857" transform="translate(75.901 63.521)" opacity="0.1" style="isolation: isolate">
<g id="Group_8856" data-name="Group 8856">
<g id="Group_8855" data-name="Group 8855" clip-path="url(#clip-path-20)">
<g id="Group_8855" data-name="Group 8855" clip-path="url(#clip-path-9)">
<path id="Path_14023" data-name="Path 14023" d="M276.146,218.472s-2.06-1.451-4.646-3.258l3.777,1.629a17.714,17.714,0,0,0,1.317-5.865c.034,3.146-.447,7.494-.447,7.494" transform="translate(-271.5 -210.978)"/>
</g>
</g>
@ -206,7 +183,7 @@
<path id="Path_14025" data-name="Path 14025" d="M270.6,150.361a4.087,4.087,0,0,1-2.663-1.682c1.54-1.207.685-3.784.685-3.784l2.545.882a8.849,8.849,0,0,0-.242,1.168c-.222,1.7.492,1.816.492,1.816.348.986-.816,1.6-.816,1.6" transform="translate(-193.029 -101.27)" fill="#e4897b"/>
<g id="Group_8860" data-name="Group 8860" transform="translate(75.589 43.625)" opacity="0.2" style="isolation: isolate">
<g id="Group_8859" data-name="Group 8859">
<g id="Group_8858" data-name="Group 8858" clip-path="url(#clip-path-21)">
<g id="Group_8858" data-name="Group 8858" clip-path="url(#clip-path-10)">
<path id="Path_14026" data-name="Path 14026" d="M272.928,145.777a8.851,8.851,0,0,0-.242,1.168,3.024,3.024,0,0,1-2.3-2.05Z" transform="translate(-270.383 -144.895)"/>
</g>
</g>
@ -231,7 +208,7 @@
<path id="Path_14044" data-name="Path 14044" d="M266.271,166.48l.253-.464s-.312-.1-.854-.235c.227-1.683.93-8.052-.785-12.184l-.318.263a8.484,8.484,0,0,1,.874,3.876l-5.924-.038s-.68-3.575-1.522-4.673l-.212.107a28.5,28.5,0,0,1,1.248,12.016,16.047,16.047,0,0,0-2.78.416l.226.452a32.211,32.211,0,0,1,5.022-.216l3.113.306a15.805,15.805,0,0,1,1.66.374" transform="translate(-184.612 -106.953)" fill="#407bff"/>
<g id="Group_8863" data-name="Group 8863" transform="translate(71.638 46.074)" style="isolation: isolate">
<g id="Group_8862" data-name="Group 8862">
<g id="Group_8861" data-name="Group 8861" clip-path="url(#clip-path-22)">
<g id="Group_8861" data-name="Group 8861" clip-path="url(#clip-path-11)">
<path id="Path_14045" data-name="Path 14045" d="M266.271,166.48l.253-.464s-.312-.1-.854-.235c.227-1.683.93-8.052-.785-12.184l-.318.263a8.484,8.484,0,0,1,.874,3.876l-5.924-.038s-.68-3.575-1.522-4.673l-.212.107a28.5,28.5,0,0,1,1.248,12.016,16.047,16.047,0,0,0-2.78.416l.226.452a32.211,32.211,0,0,1,5.022-.216l3.113.306a15.805,15.805,0,0,1,1.66.374" transform="translate(-256.25 -153.026)" fill="#fff"/>
</g>
</g>
@ -241,19 +218,19 @@
</g>
</g>
<g id="Group_8873" data-name="Group 8873" transform="translate(-14 -17.831)">
<g id="Group_8872" data-name="Group 8872" clip-path="url(#clip-path-2)">
<g id="Group_8907" data-name="Group 8907">
<path id="Path_14048" data-name="Path 14048" d="M335.17,173.594a35.718,35.718,0,0,0-24.292-.479c-3.483,1.135-7.173,2.571-10.74,3.962q-1.448.564-2.9,1.126c-.542.209-1.5.615-1.581,1.194l.877,2.27c1.8-.674,2.709-1.04,4.557-1.76,3.534-1.376,7.19-2.8,10.6-3.911a34.29,34.29,0,0,1,20.62-.271l.763-.527-.372-.7h1.026l-1.026-.9h2.469Z" transform="translate(-213.001 -119.689)" fill="#2bb8a6"/>
<path id="Path_14049" data-name="Path 14049" d="M295.981,198.514s4.729.235,6.243,1.154l.047-2.47s-.022-.151-.452-.161c-1.46-.032-4.659-.34-5.414-.763-1.717-.963.781-1.868.781-1.868s-1.578.532-1.535,1.176a10.421,10.421,0,0,1,.33,2.931" transform="translate(-212.998 -135.875)" fill="#407bff"/>
<g id="Group_8868" data-name="Group 8868" transform="translate(82.653 58.532)" style="isolation: isolate">
<g id="Group_8867" data-name="Group 8867">
<g id="Group_8866" data-name="Group 8866" clip-path="url(#clip-path-24)">
<g id="Group_8866" data-name="Group 8866" clip-path="url(#clip-path-12)">
<path id="Path_14050" data-name="Path 14050" d="M295.981,198.514s4.729.235,6.243,1.154l.047-2.47s-.022-.151-.452-.161c-1.46-.032-4.659-.34-5.414-.763-1.717-.963.781-1.868.781-1.868s-1.578.532-1.535,1.176a10.421,10.421,0,0,1,.33,2.931" transform="translate(-295.651 -194.407)" fill="#126055"/>
</g>
</g>
</g>
<g id="Group_8871" data-name="Group 8871" transform="translate(28.236 50.054)" style="isolation: isolate">
<g id="Group_8870" data-name="Group 8870">
<g id="Group_8869" data-name="Group 8869" clip-path="url(#clip-path-25)">
<g id="Group_8869" data-name="Group 8869" clip-path="url(#clip-path-13)">
<path id="Path_14051" data-name="Path 14051" d="M162.458,180.077a.486.486,0,0,1-.308.569,14.681,14.681,0,0,1-4.38.608c-6.352,0-14.316-3.1-22.642-6.347-3.534-1.376-7.19-2.8-10.6-3.911a34.288,34.288,0,0,0-20.62-.271l-.763-.527.372-.7H102.49l1.026-.9H101v0a35.8,35.8,0,0,1,24.316-.479c3.483,1.135,7.185,2.572,10.752,3.962,9.673,3.77,20.479,7,25.608,5.573.328-.092.3-.186.212-.237a.369.369,0,0,0-.136-.042c.248.015.294.12.3.216a21.119,21.119,0,0,0,.409,2.491" transform="translate(-101 -166.248)" fill="#2bb8a6"/>
</g>
</g>
@ -262,82 +239,59 @@
</g>
</g>
</g>
<g id="Mask_Group_6" data-name="Mask Group 6" transform="translate(0 4.523)" clip-path="url(#clip-path-26)">
<g id="Group_8886" data-name="Group 8886" transform="matrix(0.309, -0.951, 0.951, 0.309, 84.633, 96.705)">
<g id="Group_8885" data-name="Group 8885" transform="translate(0)" clip-path="url(#clip-path-27)">
<rect id="Rectangle_17623" data-name="Rectangle 17623" width="111.63" height="31.894" transform="translate(0 0)" fill="#407bff"/>
<g id="Group_8879" data-name="Group 8879" transform="translate(0 0)">
<g id="Group_8878" data-name="Group 8878" clip-path="url(#clip-path-27)">
<g id="Group_8877" data-name="Group 8877" transform="translate(0 0)" style="isolation: isolate">
<g id="Group_8876" data-name="Group 8876" transform="translate(0)">
<g id="Group_8875" data-name="Group 8875" clip-path="url(#clip-path-27)">
<rect id="Rectangle_17624" data-name="Rectangle 17624" width="111.63" height="31.894" transform="translate(0 0)" fill="#fff"/>
<path id="Path_13973" data-name="Path 13973" d="M-122.1,0,64.718-.222A14.962,14.962,0,0,1,79.68,14.741V72.595A14.962,14.962,0,0,1,64.718,87.557l-215.6.221Z" transform="translate(254 4.523)" fill="#125765"/>
<g id="Mask_Group_9" data-name="Mask Group 9" clip-path="url(#clip-path-14)">
<g id="Group_8909" data-name="Group 8909">
<g id="Group_8908" data-name="Group 8908" transform="translate(0 4.523)">
<g id="Group_8886" data-name="Group 8886" transform="matrix(0.309, -0.951, 0.951, 0.309, 84.633, 94.705)">
<g id="Group_8885" data-name="Group 8885" transform="translate(0)" clip-path="url(#clip-path-15)">
<rect id="Rectangle_17623" data-name="Rectangle 17623" width="111.63" height="15.948" transform="translate(0 0)" fill="#407bff"/>
<g id="Group_8879" data-name="Group 8879" transform="translate(0 0)">
<g id="Group_8878" data-name="Group 8878" clip-path="url(#clip-path-16)">
<g id="Group_8877" data-name="Group 8877" transform="translate(0 0)" style="isolation: isolate">
<g id="Group_8876" data-name="Group 8876" transform="translate(0)">
<g id="Group_8875" data-name="Group 8875" clip-path="url(#clip-path-16)">
<rect id="Rectangle_17624" data-name="Rectangle 17624" width="111.63" height="15.894" transform="translate(0 0)" fill="#fff"/>
</g>
</g>
</g>
</g>
</g>
</g>
</g>
<rect id="Rectangle_17627" data-name="Rectangle 17627" width="7.973" height="7.973" transform="translate(0 23.921)" fill="#2e353a"/>
<rect id="Rectangle_17628" data-name="Rectangle 17628" width="7.973" height="7.973" transform="translate(0 7.974)" fill="#2e353a"/>
<rect id="Rectangle_17629" data-name="Rectangle 17629" width="7.974" height="7.974" transform="translate(7.974 15.947)" fill="#2e353a"/>
<rect id="Rectangle_17630" data-name="Rectangle 17630" width="7.973" height="7.973" transform="translate(15.947 23.921)" fill="#2e353a"/>
<rect id="Rectangle_17631" data-name="Rectangle 17631" width="7.974" height="7.973" transform="translate(7.973 0.001)" fill="#2e353a"/>
<rect id="Rectangle_17632" data-name="Rectangle 17632" width="7.974" height="7.974" transform="translate(15.947 7.973)" fill="#2e353a"/>
<rect id="Rectangle_17633" data-name="Rectangle 17633" width="7.974" height="7.974" transform="translate(23.921 15.947)" fill="#2e353a"/>
<rect id="Rectangle_17634" data-name="Rectangle 17634" width="7.974" height="7.973" transform="translate(31.894 23.921)" fill="#2e353a"/>
<rect id="Rectangle_17635" data-name="Rectangle 17635" width="7.973" height="7.973" transform="translate(23.921 0.001)" fill="#2e353a"/>
<rect id="Rectangle_17636" data-name="Rectangle 17636" width="7.974" height="7.974" transform="translate(31.894 7.973)" fill="#2e353a"/>
<rect id="Rectangle_17637" data-name="Rectangle 17637" width="7.974" height="7.974" transform="translate(39.868 15.947)" fill="#2e353a"/>
<rect id="Rectangle_17638" data-name="Rectangle 17638" width="7.973" height="7.973" transform="translate(47.842 23.921)" fill="#2e353a"/>
<rect id="Rectangle_17639" data-name="Rectangle 17639" width="7.974" height="7.973" transform="translate(39.868 0.001)" fill="#2e353a"/>
<rect id="Rectangle_17640" data-name="Rectangle 17640" width="7.974" height="7.974" transform="translate(47.842 7.973)" fill="#2e353a"/>
<rect id="Rectangle_17641" data-name="Rectangle 17641" width="7.974" height="7.974" transform="translate(55.815 15.947)" fill="#2e353a"/>
<rect id="Rectangle_17642" data-name="Rectangle 17642" width="7.974" height="7.973" transform="translate(63.789 23.921)" fill="#2e353a"/>
<rect id="Rectangle_17643" data-name="Rectangle 17643" width="7.974" height="7.973" transform="translate(55.815 0.001)" fill="#2e353a"/>
<rect id="Rectangle_17644" data-name="Rectangle 17644" width="7.974" height="7.974" transform="translate(63.788 7.973)" fill="#2e353a"/>
<rect id="Rectangle_17645" data-name="Rectangle 17645" width="7.974" height="7.974" transform="translate(71.762 15.947)" fill="#2e353a"/>
<rect id="Rectangle_17646" data-name="Rectangle 17646" width="7.974" height="7.973" transform="translate(79.736 23.921)" fill="#2e353a"/>
<rect id="Rectangle_17647" data-name="Rectangle 17647" width="7.973" height="7.973" transform="translate(71.762 0.001)" fill="#2e353a"/>
<rect id="Rectangle_17648" data-name="Rectangle 17648" width="7.974" height="7.974" transform="translate(79.736 7.973)" fill="#2e353a"/>
<rect id="Rectangle_17649" data-name="Rectangle 17649" width="7.974" height="7.974" transform="translate(87.71 15.947)" fill="#2e353a"/>
<rect id="Rectangle_17650" data-name="Rectangle 17650" width="7.973" height="7.973" transform="translate(95.683 23.921)" fill="#2e353a"/>
<rect id="Rectangle_17651" data-name="Rectangle 17651" width="7.973" height="7.973" transform="translate(87.71 0.001)" fill="#2e353a"/>
<rect id="Rectangle_17652" data-name="Rectangle 17652" width="7.974" height="7.974" transform="translate(95.683 7.973)" fill="#2e353a"/>
<rect id="Rectangle_17653" data-name="Rectangle 17653" width="7.974" height="7.974" transform="translate(103.656 15.948)" fill="#2e353a"/>
<rect id="Rectangle_17654" data-name="Rectangle 17654" width="7.974" height="7.973" transform="translate(103.656 0.001)" fill="#2e353a"/>
<g id="Group_8884" data-name="Group 8884" transform="translate(0 0)">
<g id="Group_8883" data-name="Group 8883" clip-path="url(#clip-path-27)">
<g id="Group_8882" data-name="Group 8882" transform="translate(0 0)" opacity="0.1" style="isolation: isolate">
<g id="Group_8881" data-name="Group 8881" transform="translate(0)">
<g id="Group_8880" data-name="Group 8880" clip-path="url(#clip-path-27)">
<rect id="Rectangle_17655" data-name="Rectangle 17655" width="7.974" height="7.974" transform="translate(0 23.921)" fill="#fff"/>
<rect id="Rectangle_17656" data-name="Rectangle 17656" width="7.974" height="7.974" transform="translate(0 7.973)" fill="#fff"/>
<rect id="Rectangle_17657" data-name="Rectangle 17657" width="7.974" height="7.974" transform="translate(7.974 15.947)" fill="#fff"/>
<rect id="Rectangle_17658" data-name="Rectangle 17658" width="7.974" height="7.974" transform="translate(15.947 23.921)" fill="#fff"/>
<rect id="Rectangle_17659" data-name="Rectangle 17659" width="7.974" height="7.974" transform="translate(7.974 0)" fill="#fff"/>
<rect id="Rectangle_17660" data-name="Rectangle 17660" width="7.974" height="7.974" transform="translate(15.947 7.973)" fill="#fff"/>
<rect id="Rectangle_17661" data-name="Rectangle 17661" width="7.974" height="7.974" transform="translate(23.921 15.947)" fill="#fff"/>
<rect id="Rectangle_17662" data-name="Rectangle 17662" width="7.974" height="7.974" transform="translate(31.894 23.921)" fill="#fff"/>
<rect id="Rectangle_17663" data-name="Rectangle 17663" width="7.974" height="7.974" transform="translate(23.921 0)" fill="#fff"/>
<rect id="Rectangle_17664" data-name="Rectangle 17664" width="7.974" height="7.974" transform="translate(31.894 7.973)" fill="#fff"/>
<rect id="Rectangle_17665" data-name="Rectangle 17665" width="7.974" height="7.974" transform="translate(39.868 15.947)" fill="#fff"/>
<rect id="Rectangle_17666" data-name="Rectangle 17666" width="7.974" height="7.974" transform="translate(47.842 23.921)" fill="#fff"/>
<rect id="Rectangle_17667" data-name="Rectangle 17667" width="7.974" height="7.974" transform="translate(39.868 0)" fill="#fff"/>
<rect id="Rectangle_17668" data-name="Rectangle 17668" width="7.974" height="7.974" transform="translate(47.842 7.973)" fill="#fff"/>
<rect id="Rectangle_17669" data-name="Rectangle 17669" width="7.974" height="7.974" transform="translate(55.815 15.947)" fill="#fff"/>
<rect id="Rectangle_17670" data-name="Rectangle 17670" width="7.974" height="7.974" transform="translate(63.788 23.921)" fill="#fff"/>
<rect id="Rectangle_17671" data-name="Rectangle 17671" width="7.974" height="7.974" transform="translate(55.815 0)" fill="#fff"/>
<rect id="Rectangle_17672" data-name="Rectangle 17672" width="7.974" height="7.974" transform="translate(63.788 7.973)" fill="#fff"/>
<rect id="Rectangle_17673" data-name="Rectangle 17673" width="7.974" height="7.974" transform="translate(71.762 15.947)" fill="#fff"/>
<rect id="Rectangle_17674" data-name="Rectangle 17674" width="7.974" height="7.974" transform="translate(79.736 23.921)" fill="#fff"/>
<rect id="Rectangle_17675" data-name="Rectangle 17675" width="7.974" height="7.974" transform="translate(71.762 0)" fill="#fff"/>
<rect id="Rectangle_17676" data-name="Rectangle 17676" width="7.974" height="7.974" transform="translate(79.736 7.973)" fill="#fff"/>
<rect id="Rectangle_17677" data-name="Rectangle 17677" width="7.974" height="7.974" transform="translate(87.71 15.947)" fill="#fff"/>
<rect id="Rectangle_17678" data-name="Rectangle 17678" width="7.974" height="7.974" transform="translate(95.683 23.921)" fill="#fff"/>
<rect id="Rectangle_17679" data-name="Rectangle 17679" width="7.974" height="7.974" transform="translate(87.71 0)" fill="#fff"/>
<rect id="Rectangle_17680" data-name="Rectangle 17680" width="7.974" height="7.974" transform="translate(95.683 7.973)" fill="#fff"/>
<rect id="Rectangle_17681" data-name="Rectangle 17681" width="7.974" height="7.974" transform="translate(103.656 15.947)" fill="#fff"/>
<rect id="Rectangle_17682" data-name="Rectangle 17682" width="7.974" height="7.974" transform="translate(103.656 0)" fill="#fff"/>
<rect id="Rectangle_17628" data-name="Rectangle 17628" width="7.973" height="7.973" transform="translate(0 7.974)" fill="#2e353a"/>
<rect id="Rectangle_17631" data-name="Rectangle 17631" width="7.974" height="7.973" transform="translate(7.973 0.001)" fill="#2e353a"/>
<rect id="Rectangle_17632" data-name="Rectangle 17632" width="7.974" height="7.974" transform="translate(15.947 7.973)" fill="#2e353a"/>
<rect id="Rectangle_17635" data-name="Rectangle 17635" width="7.973" height="7.973" transform="translate(23.921 0.001)" fill="#2e353a"/>
<rect id="Rectangle_17636" data-name="Rectangle 17636" width="7.974" height="7.974" transform="translate(31.894 7.973)" fill="#2e353a"/>
<rect id="Rectangle_17639" data-name="Rectangle 17639" width="7.974" height="7.973" transform="translate(39.868 0.001)" fill="#2e353a"/>
<rect id="Rectangle_17640" data-name="Rectangle 17640" width="7.974" height="7.974" transform="translate(47.842 7.973)" fill="#2e353a"/>
<rect id="Rectangle_17643" data-name="Rectangle 17643" width="7.974" height="7.973" transform="translate(55.815 0.001)" fill="#2e353a"/>
<rect id="Rectangle_17644" data-name="Rectangle 17644" width="7.974" height="7.974" transform="translate(63.788 7.973)" fill="#2e353a"/>
<rect id="Rectangle_17647" data-name="Rectangle 17647" width="7.973" height="7.973" transform="translate(71.762 0.001)" fill="#2e353a"/>
<rect id="Rectangle_17648" data-name="Rectangle 17648" width="7.974" height="7.974" transform="translate(79.736 7.973)" fill="#2e353a"/>
<rect id="Rectangle_17651" data-name="Rectangle 17651" width="7.973" height="7.973" transform="translate(87.71 0.001)" fill="#2e353a"/>
<rect id="Rectangle_17652" data-name="Rectangle 17652" width="7.974" height="7.974" transform="translate(95.683 7.973)" fill="#2e353a"/>
<rect id="Rectangle_17654" data-name="Rectangle 17654" width="7.974" height="7.973" transform="translate(103.656 0.001)" fill="#2e353a"/>
<g id="Group_8884" data-name="Group 8884" transform="translate(0 0)">
<g id="Group_8883" data-name="Group 8883" clip-path="url(#clip-path-18)">
<g id="Group_8882" data-name="Group 8882" transform="translate(0 0)" opacity="0.1" style="isolation: isolate">
<g id="Group_8881" data-name="Group 8881" transform="translate(0)">
<g id="Group_8880" data-name="Group 8880" clip-path="url(#clip-path-19)">
<rect id="Rectangle_17656" data-name="Rectangle 17656" width="7.974" height="7.974" transform="translate(0 7.973)" fill="#fff"/>
<rect id="Rectangle_17659" data-name="Rectangle 17659" width="7.974" height="7.974" transform="translate(7.974 0)" fill="#fff"/>
<rect id="Rectangle_17660" data-name="Rectangle 17660" width="7.974" height="7.974" transform="translate(15.947 7.973)" fill="#fff"/>
<rect id="Rectangle_17663" data-name="Rectangle 17663" width="7.974" height="7.974" transform="translate(23.921 0)" fill="#fff"/>
<rect id="Rectangle_17664" data-name="Rectangle 17664" width="7.974" height="7.974" transform="translate(31.894 7.973)" fill="#fff"/>
<rect id="Rectangle_17667" data-name="Rectangle 17667" width="7.974" height="7.974" transform="translate(39.868 0)" fill="#fff"/>
<rect id="Rectangle_17668" data-name="Rectangle 17668" width="7.974" height="7.974" transform="translate(47.842 7.973)" fill="#fff"/>
<rect id="Rectangle_17671" data-name="Rectangle 17671" width="7.974" height="7.974" transform="translate(55.815 0)" fill="#fff"/>
<rect id="Rectangle_17672" data-name="Rectangle 17672" width="7.974" height="7.974" transform="translate(63.788 7.973)" fill="#fff"/>
<rect id="Rectangle_17675" data-name="Rectangle 17675" width="7.974" height="7.974" transform="translate(71.762 0)" fill="#fff"/>
<rect id="Rectangle_17676" data-name="Rectangle 17676" width="7.974" height="7.974" transform="translate(79.736 7.973)" fill="#fff"/>
<rect id="Rectangle_17679" data-name="Rectangle 17679" width="7.974" height="7.974" transform="translate(87.71 0)" fill="#fff"/>
<rect id="Rectangle_17680" data-name="Rectangle 17680" width="7.974" height="7.974" transform="translate(95.683 7.973)" fill="#fff"/>
<rect id="Rectangle_17682" data-name="Rectangle 17682" width="7.974" height="7.974" transform="translate(103.656 0)" fill="#fff"/>
</g>
</g>
</g>
</g>
</g>
@ -346,10 +300,9 @@
</g>
</g>
</g>
<path id="Path_13973" data-name="Path 13973" d="M-122.029,0,65.261-.222a15,15,0,0,1,15,15v58a15,15,0,0,1-15,15L-150.883,88Z" transform="translate(254 4.523)" fill="#125765"/>
</g>
</g>
<g id="light-bulb" transform="translate(272.396 326.738)" opacity="0.09">
<g id="light-bulb" transform="translate(272.396 326.738)" opacity="0.07">
<path id="XMLID_49_" d="M52.08,62.218V64.3a3.3,3.3,0,0,1-2.8,3.267l-.513,1.89A2.352,2.352,0,0,1,46.5,71.2H41.415a2.352,2.352,0,0,1-2.271-1.743l-.5-1.89a3.314,3.314,0,0,1-2.813-3.282V62.2A2,2,0,0,1,37.84,60.2H50.073A2.023,2.023,0,0,1,52.08,62.218Zm9.42-28.04a17.452,17.452,0,0,1-4.922,12.174,16.084,16.084,0,0,0-4.307,8.731A2.9,2.9,0,0,1,49.4,57.53H38.514A2.872,2.872,0,0,1,35.657,55.1a16.263,16.263,0,0,0-4.336-8.761A17.538,17.538,0,1,1,61.5,34.178ZM45.942,23.557a1.979,1.979,0,0,0-1.978-1.978A12.67,12.67,0,0,0,31.306,34.237a1.978,1.978,0,1,0,3.955,0,8.713,8.713,0,0,1,8.7-8.7A1.97,1.97,0,0,0,45.942,23.557ZM43.964,10.885a1.979,1.979,0,0,0,1.978-1.978V1.978a1.978,1.978,0,0,0-3.955,0V8.907A1.979,1.979,0,0,0,43.964,10.885ZM20.685,34.164a1.979,1.979,0,0,0-1.978-1.978H11.778a1.978,1.978,0,0,0,0,3.955h6.929A1.97,1.97,0,0,0,20.685,34.164ZM76.15,32.186H69.22a1.978,1.978,0,0,0,0,3.955H76.15a1.978,1.978,0,0,0,0-3.955ZM24.714,50.63l-4.908,4.908a1.973,1.973,0,0,0,2.783,2.8L27.5,53.428a1.973,1.973,0,1,0-2.783-2.8ZM61.822,18.283a1.975,1.975,0,0,0,1.392-.571L68.122,12.8a1.979,1.979,0,1,0-2.8-2.8l-4.908,4.908a1.972,1.972,0,0,0,0,2.8A2.009,2.009,0,0,0,61.822,18.283ZM24.714,17.7A1.973,1.973,0,1,0,27.5,14.9L22.589,9.991a1.979,1.979,0,0,0-2.8,2.8Zm38.5,32.933a1.979,1.979,0,0,0-2.8,2.8l4.908,4.908a1.973,1.973,0,0,0,2.784-2.8Z" fill="#fff"/>
</g>
</g>

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 37 KiB

@ -469,6 +469,7 @@
"demoMarathonNoteP3": "قبل الوقت الفعلي.",
"sponsoredBy": "برعاية:",
"question": "سؤال",
"marathoners": "الماراثون"
"marathoners": "الماراثون",
"prize": "جائزة:"
}

@ -469,5 +469,6 @@
"demoMarathonNoteP3": "before the actual time.",
"sponsoredBy": "Sponsored By:",
"question": "Question",
"marathoners": "Marathoners"
"marathoners": "Marathoners",
"prize": "Prize:"
}

@ -32,6 +32,7 @@ class MyColors {
static const Color yellowColor = Color(0xffF4E31C);
static const Color orange = Color(0xFFCC9B14);
static const Color yellowFavColor = Color(0xffEAC321);
static const Color yellowColorII = Color(0xffEAA118);
static const Color backgroundBlackColor = Color(0xff202529);
static const Color black = Color(0xff000000);
static const Color white = Color(0xffffffff);

@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
import 'package:mohem_flutter_app/classes/colors.dart';
class MyDecorations {
static Decoration shadowDecoration= BoxDecoration(
static Decoration shadowDecoration = BoxDecoration(
color: MyColors.kWhiteColor,
borderRadius: BorderRadius.circular(15),
boxShadow: [
@ -13,4 +13,10 @@ class MyDecorations {
),
],
);
static Decoration answerContainerDecoration = BoxDecoration(
borderRadius: BorderRadius.circular(10),
color: MyColors.greyF7Color,
border: Border.all(width: 1, color: MyColors.lightGreyEFColor),
);
}

@ -10,19 +10,36 @@ extension CapExtension on String {
String get allInCaps => this.toUpperCase();
String get capitalizeFirstofEach => this.trim().length > 0 ? this.trim().toLowerCase().split(" ").map((str) => str.inCaps).join(" ") : "";
String get capitalizeFirstofEach => this.trim().length > 0
? this.trim().toLowerCase().split(" ").map((str) => str.inCaps).join(" ")
: "";
}
extension EmailValidator on String {
Widget get toWidget => Text(this);
Widget toText10({Color? color, bool isBold = false, int? maxlines}) => Text(
Widget toText10(
{Color? color,
bool isBold = false,
int? maxlines,
FontStyle? fontStyle}) =>
Text(
this,
//maxLines: maxlines,
style: TextStyle(fontSize: 10, fontWeight: isBold ? FontWeight.bold : FontWeight.w600, color: color ?? MyColors.darkTextColor, letterSpacing: -0.4),
style: TextStyle(
fontSize: 10,
fontStyle: fontStyle ?? FontStyle.normal,
fontWeight: isBold ? FontWeight.bold : FontWeight.w600,
color: color ?? MyColors.darkTextColor,
letterSpacing: -0.4),
);
Widget toText11({Color? color, FontWeight? weight, bool isUnderLine = false, bool isBold = false}) => Text(
Widget toText11(
{Color? color,
FontWeight? weight,
bool isUnderLine = false,
bool isBold = false}) =>
Text(
this,
style: TextStyle(
fontSize: 11,
@ -33,7 +50,13 @@ extension EmailValidator on String {
),
);
Widget toText12({Color? color, bool isUnderLine = false, bool isBold = false, bool isCenter = false, int maxLine = 0}) => Text(
Widget toText12(
{Color? color,
bool isUnderLine = false,
bool isBold = false,
bool isCenter = false,
int maxLine = 0}) =>
Text(
this,
textAlign: isCenter ? TextAlign.center : null,
maxLines: (maxLine > 0) ? maxLine : null,
@ -46,32 +69,57 @@ extension EmailValidator on String {
),
);
Widget toText12Auto({Color? color, bool isUnderLine = false, bool isBold = false, bool isCenter = false, int maxLine = 0}) => AutoSizeText(
this,
textAlign: isCenter ? TextAlign.center : null,
maxLines: (maxLine > 0) ? maxLine : null,
minFontSize: 8,
style: TextStyle(
fontSize: 12,
fontWeight: isBold ? FontWeight.bold : FontWeight.w600,
color: color ?? MyColors.darkTextColor,
letterSpacing: -0.72,
decoration: isUnderLine ? TextDecoration.underline : null,
),
);
Widget toText12Auto(
{Color? color,
bool isUnderLine = false,
bool isBold = false,
bool isCenter = false,
int maxLine = 0}) =>
AutoSizeText(
this,
textAlign: isCenter ? TextAlign.center : null,
maxLines: (maxLine > 0) ? maxLine : null,
minFontSize: 8,
style: TextStyle(
fontSize: 12,
fontWeight: isBold ? FontWeight.bold : FontWeight.w600,
color: color ?? MyColors.darkTextColor,
letterSpacing: -0.72,
decoration: isUnderLine ? TextDecoration.underline : null,
),
);
Widget toText13({Color? color, bool isUnderLine = false}) => Text(
this,
style: TextStyle(fontSize: 13, fontWeight: FontWeight.w600, color: color ?? MyColors.darkTextColor, letterSpacing: -0.52, decoration: isUnderLine ? TextDecoration.underline : null),
style: TextStyle(
fontSize: 13,
fontWeight: FontWeight.w600,
color: color ?? MyColors.darkTextColor,
letterSpacing: -0.52,
decoration: isUnderLine ? TextDecoration.underline : null),
);
Widget toText14({Color? color, bool isBold = false, FontWeight? weight, int? maxlines}) => Text(
Widget toText14(
{Color? color,
bool isBold = false,
FontWeight? weight,
int? maxlines}) =>
Text(
this,
maxLines: maxlines,
style: TextStyle(color: color ?? MyColors.darkTextColor, fontSize: 14, letterSpacing: -0.48, fontWeight: weight ?? (isBold ? FontWeight.bold : FontWeight.w600)),
style: TextStyle(
color: color ?? MyColors.darkTextColor,
fontSize: 14,
letterSpacing: -0.48,
fontWeight: weight ?? (isBold ? FontWeight.bold : FontWeight.w600)),
);
Widget toText16({Color? color, bool isUnderLine = false, bool isBold = false, int? maxlines}) => Text(
Widget toText16(
{Color? color,
bool isUnderLine = false,
bool isBold = false,
int? maxlines}) =>
Text(
this,
maxLines: maxlines,
style: TextStyle(
@ -85,51 +133,97 @@ extension EmailValidator on String {
Widget toText17({Color? color, bool isBold = false}) => Text(
this,
style: TextStyle(color: color ?? MyColors.darkTextColor, fontSize: 17, letterSpacing: -0.68, fontWeight: isBold ? FontWeight.bold : FontWeight.w600),
style: TextStyle(
color: color ?? MyColors.darkTextColor,
fontSize: 17,
letterSpacing: -0.68,
fontWeight: isBold ? FontWeight.bold : FontWeight.w600),
);
Widget toText18({Color? color, bool isBold = false}) => Text(
this,
style: TextStyle(fontSize: 18, fontWeight: isBold ? FontWeight.bold : FontWeight.w600, color: color ?? MyColors.darkTextColor, letterSpacing: -1.08),
style: TextStyle(
fontSize: 18,
fontWeight: isBold ? FontWeight.bold : FontWeight.w600,
color: color ?? MyColors.darkTextColor,
letterSpacing: -1.08),
);
Widget toText19({Color? color, bool isBold = false}) => Text(
this,
style: TextStyle(fontSize: 19, fontWeight: isBold ? FontWeight.bold : FontWeight.w600, color: color ?? MyColors.darkTextColor, letterSpacing: -1.14),
);
this,
style: TextStyle(
fontSize: 19,
fontWeight: isBold ? FontWeight.bold : FontWeight.w600,
color: color ?? MyColors.darkTextColor,
letterSpacing: -1.14),
);
Widget toText20({Color? color, bool isBold = false}) => Text(
this,
style: TextStyle(fontSize: 20, fontWeight: isBold ? FontWeight.bold : FontWeight.w600, color: color ?? MyColors.darkTextColor, letterSpacing: -0.4),
style: TextStyle(
fontSize: 20,
fontWeight: isBold ? FontWeight.bold : FontWeight.w600,
color: color ?? MyColors.darkTextColor,
letterSpacing: -0.4),
);
Widget toText21({Color? color, bool isBold = false, FontWeight? weight, int? maxlines}) => Text(
this,
maxLines: maxlines,
style: TextStyle(color: color ?? MyColors.grey3AColor, fontSize: 21, letterSpacing: -0.31, fontWeight: weight ?? (isBold ? FontWeight.bold : FontWeight.w600)),
);
Widget toText21(
{Color? color,
bool isBold = false,
FontWeight? weight,
int? maxlines}) =>
Text(
this,
maxLines: maxlines,
style: TextStyle(
color: color ?? MyColors.grey3AColor,
fontSize: 21,
letterSpacing: -0.31,
fontWeight: weight ?? (isBold ? FontWeight.bold : FontWeight.w600)),
);
Widget toText22({Color? color, bool isBold = false}) => Text(
this,
style: TextStyle(height: 1, color: color ?? MyColors.darkTextColor, fontSize: 22, letterSpacing: -1.44, fontWeight: isBold ? FontWeight.bold : FontWeight.w600),
style: TextStyle(
height: 1,
color: color ?? MyColors.darkTextColor,
fontSize: 22,
letterSpacing: -1.44,
fontWeight: isBold ? FontWeight.bold : FontWeight.w600),
);
Widget toText24({Color? color, bool isBold = false}) => Text(
this,
style: TextStyle(height: 23 / 24, color: color ?? MyColors.darkTextColor, fontSize: 24, letterSpacing: -1.44, fontWeight: isBold ? FontWeight.bold : FontWeight.w600),
style: TextStyle(
height: 23 / 24,
color: color ?? MyColors.darkTextColor,
fontSize: 24,
letterSpacing: -1.44,
fontWeight: isBold ? FontWeight.bold : FontWeight.w600),
);
Widget toText32({Color? color, bool isBold = false}) => Text(
this,
style: TextStyle(height: 32 / 32, color: color ?? MyColors.darkTextColor, fontSize: 32, letterSpacing: -1.92, fontWeight: isBold ? FontWeight.bold : FontWeight.w600),
style: TextStyle(
height: 32 / 32,
color: color ?? MyColors.darkTextColor,
fontSize: 32,
letterSpacing: -1.92,
fontWeight: isBold ? FontWeight.bold : FontWeight.w600),
);
Widget toText44({Color? color, bool isBold = false}) => Text(
this,
style: TextStyle(height: 32 / 32, color: color ?? MyColors.darkTextColor, fontSize: 44, letterSpacing: -2.64, fontWeight: isBold ? FontWeight.bold : FontWeight.w600),
style: TextStyle(
height: 32 / 32,
color: color ?? MyColors.darkTextColor,
fontSize: 44,
letterSpacing: -2.64,
fontWeight: isBold ? FontWeight.bold : FontWeight.w600),
);
Widget toSectionHeading({String upperHeading = "", String lowerHeading = ""}) {
Widget toSectionHeading(
{String upperHeading = "", String lowerHeading = ""}) {
String upper = "";
String lower = "";
String heading = this;
@ -162,7 +256,9 @@ extension EmailValidator on String {
}
bool isValidEmail() {
return RegExp(r'^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$').hasMatch(this);
return RegExp(
r'^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$')
.hasMatch(this);
}
String toFormattedDate() {

@ -467,10 +467,26 @@ class CodegenLoader extends AssetLoader{
"female": "Hello girl :) {}"
}
},
"reset_locale": "Reset Language",
"reset_locale": "إعادة ضبط اللغة",
"chat": "دردشة",
"mychats": "دردشاتي",
"createNewChat": "Create New Chat"
"createNewChat": "إنشاء محادثة جديدة",
"brainMarathon": "ماراثون الدماغ",
"contestTopicAbout": "سيكون موضوع المسابقة حول:",
"gameDate": "تاريخ اللعبة:",
"gameTime": "وقت اللعب:",
"joinMarathon": "انضم إلى ماراثون",
"joinDemoMarathon": "انضم إلى الماراثون التجريبي",
"minutes": "الدقائق",
"seconds": "ثواني",
"note": "ملحوظة:",
"demoMarathonNoteP1": "يمكنك لعب ماراثون العرض لتتعلم كيف يعمل. يمكنك الانضمام إلى ماراثون",
"demoMarathonNoteP2": "خمس دقائق",
"demoMarathonNoteP3": "قبل الوقت الفعلي.",
"sponsoredBy": "برعاية:",
"question": "سؤال",
"marathoners": "الماراثون",
"prize": "جائزة:"
};
static const Map<String,dynamic> en_US = {
"mohemm": "Mohemm",
@ -928,7 +944,23 @@ static const Map<String,dynamic> en_US = {
"reset_locale": "Reset Language",
"chat": "Chat",
"mychats": "My Chats",
"createNewChat": "Create New Chat"
"createNewChat": "Create New Chat",
"brainMarathon": "Brain Marathon",
"contestTopicAbout": "Contest Topic will be about:",
"gameDate": "Game Date:",
"gameTime": "Game Time:",
"joinMarathon": "Join Marathon",
"joinDemoMarathon": "Join Demo Marathon",
"minutes": "Minutes",
"seconds": "Seconds",
"note": "Note:",
"demoMarathonNoteP1": "You can play the demo Marathon to learn how it works. You can join the Marathon",
"demoMarathonNoteP2": "5 Minutes",
"demoMarathonNoteP3": "before the actual time.",
"sponsoredBy": "Sponsored By:",
"question": "Question",
"marathoners": "Marathoners",
"prize": "Prize:"
};
static const Map<String, Map<String,dynamic>> mapLocales = {"ar_SA": ar_SA, "en_US": en_US};
}

@ -456,5 +456,6 @@ abstract class LocaleKeys {
static const sponsoredBy = 'sponsoredBy';
static const question = 'question';
static const marathoners = 'marathoners';
static const prize = 'prize';
}

@ -0,0 +1,63 @@
import 'package:flutter/cupertino.dart';
class DummyQuestionModel {
String? opt1;
String? opt2;
String? opt3;
DummyQuestionModel({
this.opt1,
this.opt2,
this.opt3,
});
}
final List<dynamic> answersDummyMap = [
{"answer": "Jeddah"},
{"answer": "Mecca"},
{"answer": "Riyaadh"},
{"answer": "Dammaam"},
];
List<DummyQuestionModel> questions = <DummyQuestionModel>[
DummyQuestionModel(
opt1: 'Riyadh 8',
opt2: 'Dammam',
opt3: 'Mecca',
),
DummyQuestionModel(
opt1: 'Riyadh 7',
opt2: 'Dammam',
opt3: 'Mecca',
),
DummyQuestionModel(
opt1: 'Riyadh 6',
opt2: 'Dammam',
opt3: 'Mecca',
),
DummyQuestionModel(
opt1: 'Riyadh 5',
opt2: 'Dammam',
opt3: 'Mecca',
),
DummyQuestionModel(
opt1: 'Riyadh 4',
opt2: 'Dammam',
opt3: 'Mecca',
),
DummyQuestionModel(
opt1: 'Riyadh 3',
opt2: 'Dammam',
opt3: 'Mecca',
),
DummyQuestionModel(
opt1: 'Riyadh 2',
opt2: 'Dammam',
opt3: 'Mecca',
),
DummyQuestionModel(
opt1: 'Riyadh 1',
opt2: 'Dammam',
opt3: 'Mecca',
),
];

@ -1,3 +1,4 @@
import 'dart:async';
import 'dart:io';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
@ -45,8 +46,10 @@ class _DashboardScreenState extends State<DashboardScreen> {
@override
void initState() {
super.initState();
data = Provider.of<DashboardProviderModel>(context, listen: false);
_onRefresh();
scheduleMicrotask(() {
data = Provider.of<DashboardProviderModel>(context, listen: false);
_onRefresh();
});
}
@override
@ -361,8 +364,13 @@ class _DashboardScreenState extends State<DashboardScreen> {
],
),
],
).paddingOnly(left: 21, right: 21, top: 7),
MarathonBanner().paddingAll(20),
).paddingOnly(left: 20, right: 20, top: 7),
MarathonBanner().paddingOnly(
left: 20,
right: 20,
top: 11,
bottom: 11,
),
ServicesWidget(),
Container(
width: double.infinity,
@ -370,8 +378,9 @@ class _DashboardScreenState extends State<DashboardScreen> {
decoration: BoxDecoration(
color: Colors.white,
borderRadius: const BorderRadius.only(
topRight: Radius.circular(50),
topLeft: Radius.circular(50)),
topRight: Radius.circular(50),
topLeft: Radius.circular(50),
),
border: Border.all(
color: MyColors.lightGreyEDColor, width: 1),
),

@ -34,7 +34,7 @@ class ServicesWidget extends StatelessWidget {
return data.isServicesMenusLoading
? whileLoading()
: ListView.separated(
padding: const EdgeInsets.only(top: 21),
padding: const EdgeInsets.only(top: 0),
itemBuilder: (context, parentIndex) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,

@ -1,9 +1,5 @@
import 'dart:async';
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:lottie/lottie.dart';
import 'package:mohem_flutter_app/classes/colors.dart';
import 'package:mohem_flutter_app/classes/decorations_helper.dart';
@ -14,49 +10,49 @@ 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/ui/marathon/marathon_provider.dart';
import 'package:mohem_flutter_app/ui/marathon/widgets/countdown_timer.dart';
import 'package:mohem_flutter_app/ui/marathon/widgets/marathon_header.dart';
import 'package:mohem_flutter_app/widgets/button/default_button.dart';
import 'package:provider/provider.dart';
final int dummyEndTime = DateTime.now().millisecondsSinceEpoch + 1000 * 10;
final int dummyEndTime = DateTime.now().millisecondsSinceEpoch + 1000 * 30;
class MarathonIntroScreen extends StatelessWidget {
const MarathonIntroScreen({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
MarathonProvider provider = context.watch<MarathonProvider>();
return Scaffold(
body: Consumer<MarathonProvider>(
builder: (BuildContext context, MarathonProvider provider, _) {
return Stack(
children: <Widget>[
SingleChildScrollView(
child: Column(
children: <Widget>[
const MarathonHeader(),
20.height,
const MarathonDetailsCard().paddingAll(15),
MarathonTimerCard(
provider: provider,
timeToMarathon: dummyEndTime,
).paddingAll(15),
],
),
),
Align(
alignment: Alignment.bottomCenter,
child: MarathonFooter(provider: provider),
),
],
);
},
body: Stack(
children: <Widget>[
SingleChildScrollView(
child: Column(
children: <Widget>[
const MarathonHeader(),
MarathonDetailsCard(provider: provider).paddingAll(15),
MarathonTimerCard(
provider: provider,
timeToMarathon: dummyEndTime,
).paddingOnly(left: 15, right: 15, bottom: 15),
],
),
),
Align(
alignment: Alignment.bottomCenter,
child: MarathonFooter(provider: provider),
),
],
),
);
}
}
class MarathonDetailsCard extends StatelessWidget {
const MarathonDetailsCard({Key? key}) : super(key: key);
final MarathonProvider provider;
const MarathonDetailsCard({Key? key, required this.provider})
: super(key: key);
@override
Widget build(BuildContext context) {
@ -76,20 +72,45 @@ class MarathonDetailsCard extends StatelessWidget {
.toText16(color: MyColors.grey77Color),
"Saudi Arabia"
.toText20(color: MyColors.textMixColor, isBold: true),
10.height,
],
),
Row(
children: <Widget>[
LocaleKeys.gameDate.tr().toText16(color: MyColors.grey77Color),
" 10 Oct, 2022"
.toText16(color: MyColors.darkTextColor, isBold: true),
],
),
Row(
children: <Widget>[
LocaleKeys.gameTime.tr().toText16(color: MyColors.grey77Color),
" 3:00pm".toText16(color: MyColors.darkTextColor, isBold: true),
Row(
children: <Widget>[
Flexible(
child:
"Nam suscipit turpis in pharetra euismsdef. Duis rutrum at nulla id aliquam"
.toText16(color: MyColors.grey77Color),
)
],
),
if (provider.itsMarathonTime) ...<Widget>[
5.height,
Row(
children: <Widget>[
LocaleKeys.prize.tr().toText16(color: MyColors.grey77Color),
" LED 55\" Android TV"
.toText16(color: MyColors.greenColor, isBold: true),
],
),
Row(
children: <Widget>[
LocaleKeys.sponsoredBy
.tr()
.toText16(color: MyColors.grey77Color),
" Extra".toText16(color: MyColors.black, isBold: true),
],
),
10.height,
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Image.network(
"https://cdn.pixabay.com/photo/2014/08/27/07/53/blog-428950_1280.jpg",
height: 50,
fit: BoxFit.fill,
width: 120,
)
],
),
]
],
),
],
@ -116,10 +137,27 @@ class MarathonTimerCard extends StatelessWidget {
padding: const EdgeInsets.symmetric(vertical: 20, horizontal: 20),
child: Column(
children: <Widget>[
Lottie.asset(MyLottieConsts.hourGlassLottie, height: 200),
Row(
children: <Widget>[
LocaleKeys.gameDate.tr().toText16(color: MyColors.grey77Color),
" 10 Oct, 2022"
.toText16(color: MyColors.darkTextColor, isBold: true),
],
),
Row(
children: <Widget>[
LocaleKeys.gameTime.tr().toText16(color: MyColors.grey77Color),
" 3:00pm".toText16(color: MyColors.darkTextColor, isBold: true),
],
),
Lottie.asset(
MyLottieConsts.hourGlassLottie,
height: 140,
),
BuildCountdownTimer(
timeToMarathon: timeToMarathon,
provider: provider,
screenFlag: 1,
),
],
),
@ -127,116 +165,6 @@ class MarathonTimerCard extends StatelessWidget {
}
}
class BuildCountdownTimer extends StatelessWidget {
final int timeToMarathon;
final MarathonProvider provider;
const BuildCountdownTimer({
Key? key,
required this.provider,
required this.timeToMarathon,
}) : super(key: key);
Widget buildEmptyWidget() {
return Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Column(
children: <Widget>[
"00".toText32(),
LocaleKeys.days.tr().toText14(color: MyColors.grey57Color),
],
),
buildSeparator(),
Column(
children: <Widget>[
"00".toText32(),
LocaleKeys.hours.tr().toText14(color: MyColors.grey57Color),
],
),
buildSeparator(),
Column(
children: <Widget>[
"00".toText32(),
LocaleKeys.minutes.tr().toText14(color: MyColors.grey57Color),
],
),
buildSeparator(),
Column(
children: <Widget>[
"00".toText32(),
LocaleKeys.seconds.tr().toText14(color: MyColors.grey57Color),
],
),
],
);
}
Widget buildSeparator() {
return " : ".toText32();
}
Widget buildCountdownTimer(CurrentRemainingTime? time) {
if (time == null) {
scheduleMicrotask(() {
provider.itsMarathonTime = true;
});
return buildEmptyWidget();
}
return Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Column(
children: <Widget>[
time.days == null
? "00".toText32()
: time.days.toString().toText32(),
LocaleKeys.days.tr().toText14(color: MyColors.grey57Color),
],
),
buildSeparator(),
Column(
children: <Widget>[
time.hours == null
? "00".toText32()
: time.hours.toString().toText32(),
LocaleKeys.hours.tr().toText14(color: MyColors.grey57Color),
],
),
buildSeparator(),
Column(
children: <Widget>[
time.min == null ? "00".toText32() : time.min.toString().toText32(),
LocaleKeys.minutes.tr().toText14(color: MyColors.grey57Color),
],
),
buildSeparator(),
Column(
children: <Widget>[
time.sec == null ? "00".toText32() : time.sec.toString().toText32(),
LocaleKeys.seconds.tr().toText14(color: MyColors.grey57Color),
],
),
],
);
}
@override
Widget build(BuildContext context) {
return CountdownTimer(
endTime: timeToMarathon,
onEnd: null,
widgetBuilder: (BuildContext context, CurrentRemainingTime? time) {
return buildCountdownTimer(time);
},
);
}
}
class MarathonFooter extends StatelessWidget {
final MarathonProvider provider;
@ -253,33 +181,36 @@ class MarathonFooter extends StatelessWidget {
TextSpan(
text: LocaleKeys.note.tr(),
style: const TextStyle(
fontSize: 22,
fontWeight: FontWeight.bold,
color: MyColors.darkTextColor,
fontSize: 17,
letterSpacing: -0.64,
fontWeight: FontWeight.bold,
),
),
TextSpan(
text: " " + LocaleKeys.demoMarathonNoteP1.tr(),
style: const TextStyle(
color: MyColors.darkTextColor,
fontSize: 18,
fontWeight: FontWeight.w600,
color: MyColors.grey77Color,
fontSize: 17,
letterSpacing: -0.64,
fontWeight: FontWeight.w500,
),
),
TextSpan(
text: " " + LocaleKeys.demoMarathonNoteP2.tr(),
style: const TextStyle(
color: MyColors.darkTextColor,
fontSize: 20,
fontSize: 17,
fontWeight: FontWeight.bold,
),
),
TextSpan(
text: " " + LocaleKeys.demoMarathonNoteP3.tr(),
style: const TextStyle(
color: MyColors.darkTextColor,
fontSize: 18,
fontWeight: FontWeight.w600,
color: MyColors.grey77Color,
fontSize: 17,
letterSpacing: -0.64,
fontWeight: FontWeight.w500,
),
)
],
@ -298,13 +229,16 @@ class MarathonFooter extends StatelessWidget {
? DefaultButton(
LocaleKeys.joinMarathon.tr(),
() => Navigator.pushNamed(context, AppRoutes.marathonScreen),
).insideContainer
).insideContainer
: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
buildNoteForDemo(),
DefaultButton(LocaleKeys.joinDemoMarathon.tr(), () {})
.insideContainer,
DefaultButton(
LocaleKeys.joinDemoMarathon.tr(),
() {},
color: MyColors.yellowColorII,
).insideContainer,
],
),
);

@ -1,6 +1,11 @@
import 'dart:async';
import 'package:appinio_swiper/appinio_swiper.dart';
import 'package:flutter/cupertino.dart';
class MarathonProvider extends ChangeNotifier {
final AppinioSwiperController swiperController = AppinioSwiperController();
bool _itsMarathonTime = false;
bool get itsMarathonTime => _itsMarathonTime;
@ -9,4 +14,29 @@ class MarathonProvider extends ChangeNotifier {
_itsMarathonTime = value;
notifyListeners();
}
Timer timer = Timer.periodic(const Duration(seconds: 1), (Timer timer) {});
int start = 20;
void startTimer() {
start = 20;
const Duration oneSec = Duration(seconds: 1);
timer = Timer.periodic(
oneSec,
(Timer timer) {
if (start == 0) {
swiperController.swipeLeft();
timer.cancel();
} else {
start--;
}
notifyListeners();
},
);
}
void cancelTimer() {
timer.cancel();
notifyListeners();
}
}

@ -1,3 +1,5 @@
import 'dart:async';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:mohem_flutter_app/classes/colors.dart';
@ -6,7 +8,10 @@ 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/ui/marathon/marathon_provider.dart';
import 'package:mohem_flutter_app/ui/marathon/widgets/marathon_header.dart';
import 'package:mohem_flutter_app/ui/marathon/widgets/question_card.dart';
import 'package:provider/provider.dart';
import 'package:steps_indicator/steps_indicator.dart';
class MarathonScreen extends StatelessWidget {
@ -14,13 +19,16 @@ class MarathonScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
MarathonProvider provider = context.watch<MarathonProvider>();
return Scaffold(
body: SingleChildScrollView(
child: Column(
children: <Widget>[
const MarathonHeader(),
21.height,
const MarathonProgressContainer().paddingOnly(left: 21, right: 21),
MarathonProgressContainer(provider: provider)
.paddingOnly(left: 21, right: 21),
QuestionCard(provider: provider),
],
),
),
@ -28,22 +36,47 @@ class MarathonScreen extends StatelessWidget {
}
}
class MarathonProgressContainer extends StatelessWidget {
const MarathonProgressContainer({Key? key}) : super(key: key);
class MarathonProgressContainer extends StatefulWidget {
final MarathonProvider provider;
const MarathonProgressContainer({Key? key, required this.provider})
: super(key: key);
@override
State<MarathonProgressContainer> createState() =>
_MarathonProgressContainerState();
}
class _MarathonProgressContainerState extends State<MarathonProgressContainer> {
final int totalQuestions = 10;
final int currentQuestion = 04;
@override
void initState() {
scheduleMicrotask(() {
widget.provider.startTimer();
});
super.initState();
}
final int totalQuestions = 24;
final int currentQuestion = 20;
@override
void dispose() {
widget.provider.cancelTimer();
super.dispose();
}
@override
Widget build(BuildContext context) {
return Container(
width: double.infinity,
decoration: MyDecorations.shadowDecoration,
padding: const EdgeInsets.symmetric(vertical: 15, horizontal: 20),
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Container(
decoration: BoxDecoration(
@ -51,40 +84,41 @@ class MarathonProgressContainer extends StatelessWidget {
borderRadius: BorderRadius.circular(12),
),
padding: const EdgeInsets.symmetric(vertical: 5, horizontal: 8),
child: Flexible(
child:
"${currentQuestion.toString()} / ${totalQuestions.toString()} ${LocaleKeys.question.tr()}"
.toText12(color: MyColors.white),
),
),
Flexible(
child: "23 ${LocaleKeys.marathoners.tr()}".toText14(),
),
Flexible(
child: "00:23".toText16(isBold: true),
child:
"${currentQuestion.toString()} / ${totalQuestions.toString()} ${LocaleKeys.question.tr()}"
.toText12(color: MyColors.white),
),
"23 ${LocaleKeys.marathoners.tr()}".toText14(),
"00:${widget.provider.start < 10 ? "0${widget.provider.start}" : widget.provider.start}"
.toText18(isBold: true),
],
),
15.height,
const StepsIndicator(
lineLength: 23,
nbSteps: 10,
selectedStep: 6,
doneLineColor: MyColors.greenColor,
doneStepColor: MyColors.greenColor,
doneLineThickness: 6,
undoneLineThickness: 6,
selectedStepSize: 10,
unselectedStepSize: 10,
doneStepSize: 10,
selectedStepColorIn: MyColors.greenColor,
selectedStepColorOut: MyColors.greenColor,
unselectedStepColorIn: MyColors.lightGreyDeColor,
unselectedStepColorOut: MyColors.lightGreyDeColor,
undoneLineColor: MyColors.lightGreyDeColor,
enableLineAnimation: true,
enableStepAnimation: true,
),
12.height,
Row(
children: <Widget>[
"25% ${LocaleKeys.completed.tr()}".toText18(isBold: true),
],
),
15.height,
const SizedBox(
width: double.infinity,
child: StepsIndicator(
nbSteps: 7,
selectedStep: 2,
doneLineColor: MyColors.greenColor,
doneStepColor: MyColors.greenColor,
doneLineThickness: 5,
undoneLineThickness: 5,
selectedStepSize: 10,
selectedStepColorIn: MyColors.greenColor,
selectedStepColorOut: MyColors.greenColor,
unselectedStepColorIn: MyColors.lightGreyDeColor,
unselectedStepColorOut: MyColors.lightGreyDeColor,
undoneLineColor: MyColors.lightGreyDeColor,
enableLineAnimation: true,
enableStepAnimation: true,
),
),
],
),
);

@ -0,0 +1,240 @@
import 'dart:async';
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/ui/marathon/marathon_provider.dart';
class BuildCountdownTimer extends StatelessWidget {
final int timeToMarathon;
final MarathonProvider provider;
final int screenFlag;
const BuildCountdownTimer({
Key? key,
required this.provider,
required this.timeToMarathon,
required this.screenFlag,
}) : super(key: key);
final TextStyle styleTextHome = const TextStyle(
fontSize: 9,
color: MyColors.greyACColor,
fontStyle: FontStyle.italic,
fontWeight: FontWeight.w600,
letterSpacing: -0.4,
);
final TextStyle styleDigitHome = const TextStyle(
height: 23 / 24,
color: MyColors.white,
fontSize: 24,
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: 32,
letterSpacing: -1.44,
fontWeight: FontWeight.bold,
);
Widget buildEmptyWidget() {
return Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Column(
children: <Widget>[
Text(
"00",
style: screenFlag == 0 ? styleDigitHome : styleDigitMarathon,
),
Text(
LocaleKeys.days.tr(),
style: screenFlag == 0 ? styleTextHome : styleTextMarathon,
),
],
),
buildSeparator(),
Column(
children: <Widget>[
Text(
"00",
style: screenFlag == 0 ? styleDigitHome : styleDigitMarathon,
),
Text(
LocaleKeys.hours.tr(),
style: screenFlag == 0 ? styleTextHome : styleTextMarathon,
),
],
),
buildSeparator(),
Column(
children: <Widget>[
Text(
"00",
style: screenFlag == 0 ? styleDigitHome : styleDigitMarathon,
),
Text(
LocaleKeys.minutes.tr(),
style: screenFlag == 0 ? styleTextHome : styleTextMarathon,
),
],
),
buildSeparator(),
Column(
children: <Widget>[
Text(
"00",
style: screenFlag == 0 ? styleDigitHome : styleDigitMarathon,
),
Text(
LocaleKeys.seconds.tr(),
style: screenFlag == 0 ? styleTextHome : styleTextMarathon,
),
],
),
],
);
}
Widget buildSeparator() {
return Text(
" : ",
style: screenFlag == 0 ? styleDigitHome : styleDigitMarathon,
);
}
Widget buildCountdownTimer(CurrentRemainingTime? time) {
if (time == null) {
if (!provider.itsMarathonTime) {
scheduleMicrotask(() {
provider.itsMarathonTime = true;
});
}
return buildEmptyWidget();
}
return Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Column(
children: <Widget>[
time.days == null
? Text(
"00",
style:
screenFlag == 0 ? styleDigitHome : styleDigitMarathon,
)
: Text(
time.days! < 10
? "0${time.days.toString()}"
: time.days.toString(),
style:
screenFlag == 0 ? styleDigitHome : styleDigitMarathon,
),
Text(
LocaleKeys.days.tr(),
style: screenFlag == 0 ? styleTextHome : styleTextMarathon,
),
],
),
buildSeparator(),
Column(
children: <Widget>[
time.hours == null
? Text(
"00",
style:
screenFlag == 0 ? styleDigitHome : styleDigitMarathon,
)
: Text(
time.hours! < 10
? "0${time.hours.toString()}"
: time.hours.toString(),
style:
screenFlag == 0 ? styleDigitHome : styleDigitMarathon,
),
Text(
LocaleKeys.hours.tr(),
style: screenFlag == 0 ? styleTextHome : styleTextMarathon,
),
],
),
buildSeparator(),
Column(
children: <Widget>[
time.min == null
? Text(
"00",
style:
screenFlag == 0 ? styleDigitHome : styleDigitMarathon,
)
: Text(
time.min! < 10
? "0${time.min.toString()}"
: time.min.toString(),
style:
screenFlag == 0 ? styleDigitHome : styleDigitMarathon,
),
Text(
LocaleKeys.minutes.tr(),
style: screenFlag == 0 ? styleTextHome : styleTextMarathon,
),
],
),
buildSeparator(),
Column(
children: <Widget>[
time.sec == null
? Text(
"00",
style:
screenFlag == 0 ? styleDigitHome : styleDigitMarathon,
)
: Text(
time.sec! < 10
? "0${time.sec.toString()}"
: time.sec.toString(),
style:
screenFlag == 0 ? styleDigitHome : styleDigitMarathon,
),
Text(
LocaleKeys.seconds.tr(),
style: screenFlag == 0 ? styleTextHome : styleTextMarathon,
),
],
),
],
);
}
@override
Widget build(BuildContext context) {
return CountdownTimer(
endTime: timeToMarathon,
onEnd: null,
widgetBuilder: (BuildContext context, CurrentRemainingTime? time) {
return buildCountdownTimer(time);
},
);
}
}

@ -1,21 +1,73 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:mohem_flutter_app/classes/decorations_helper.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:mohem_flutter_app/classes/colors.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/ui/marathon/marathon_intro_screen.dart';
import 'package:mohem_flutter_app/ui/marathon/marathon_provider.dart';
import 'package:mohem_flutter_app/ui/marathon/widgets/countdown_timer.dart';
import 'package:provider/provider.dart';
class MarathonBanner extends StatelessWidget {
const MarathonBanner({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Container(
height: 88,
width: double.infinity,
decoration: MyDecorations.shadowDecoration,
child: Center(
child: "Banner Here".toText14(),
),
MarathonProvider provider = context.read<MarathonProvider>();
return Stack(
children: [
SvgPicture.asset(
"assets/images/marathon_banner_bg.svg",
fit: BoxFit.cover,
width: MediaQuery.of(context).size.width - 40,
),
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
Column(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
5.height,
Flexible(
child: const Text(
"Get Ready for the coming contest:",
style: TextStyle(
fontStyle: FontStyle.italic,
fontSize: 11,
fontWeight: FontWeight.w600,
color: MyColors.lightGreyEFColor,
letterSpacing: -0.4,
),
).paddingOnly(right: 12),
),
const Flexible(
child: Text(
"Saudi Arabia",
style: TextStyle(
fontStyle: FontStyle.italic,
fontSize: 20,
fontWeight: FontWeight.bold,
color: MyColors.lightGreyEFColor,
// letterSpacing: -0.4,
),
),
),
5.height,
BuildCountdownTimer(
timeToMarathon: dummyEndTime,
provider: provider,
screenFlag: 0,
),
],
)
],
).paddingOnly(right: 10),
],
).onPress(
() => Navigator.pushNamed(context, AppRoutes.marathonIntroScreen),
);

@ -9,24 +9,26 @@ class MarathonHeader extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
color: MyColors.kWhiteColor,
width: double.infinity,
height: 100,
padding: const EdgeInsets.symmetric(horizontal: 25, vertical: 15),
child: Row(
crossAxisAlignment: CrossAxisAlignment.end,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
LocaleKeys.brainMarathon.tr().toText24(isBold: true),
IconButton(
padding: EdgeInsets.zero,
icon: const Icon(Icons.close, size: 28),
color: MyColors.black,
constraints: const BoxConstraints(),
onPressed: () => Navigator.pop(context),
)
],
return SafeArea(
child: Container(
color: MyColors.kWhiteColor,
width: double.infinity,
height: 65,
padding: const EdgeInsets.symmetric(horizontal: 25, vertical: 15),
child: Row(
crossAxisAlignment: CrossAxisAlignment.end,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
LocaleKeys.brainMarathon.tr().toText24(isBold: true),
IconButton(
padding: EdgeInsets.zero,
icon: const Icon(Icons.close, size: 28),
color: MyColors.black,
constraints: const BoxConstraints(),
onPressed: () => Navigator.pop(context),
)
],
),
),
);
}

@ -0,0 +1,315 @@
import 'package:appinio_swiper/appinio_swiper.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:mohem_flutter_app/classes/colors.dart';
import 'package:mohem_flutter_app/classes/decorations_helper.dart';
import 'package:mohem_flutter_app/models/marathon_question_model.dart';
import 'package:mohem_flutter_app/ui/marathon/marathon_provider.dart';
import 'package:provider/provider.dart';
class QuestionCard extends StatefulWidget {
final MarathonProvider provider;
const QuestionCard({Key? key, required this.provider}) : super(key: key);
@override
State<QuestionCard> createState() => _QuestionCardState();
}
class _QuestionCardState extends State<QuestionCard> {
final List<QuestionContent> questionCards = <QuestionContent>[];
@override
void initState() {
_loadCards();
super.initState();
}
void _loadCards() {
for (DummyQuestionModel question in questions) {
questionCards.add(
QuestionContent(question: question),
);
}
}
@override
Widget build(BuildContext context) {
return CupertinoPageScaffold(
child: SizedBox(
height: MediaQuery.of(context).size.height * 0.6,
width: double.infinity,
child: Consumer<MarathonProvider>(
builder: (BuildContext context, MarathonProvider provider, _) {
return AppinioSwiper(
isDisabled: true,
controller: provider.swiperController,
unswipe: (int index, AppinioSwiperDirection direction) {},
cards: questionCards,
onSwipe: (int index, AppinioSwiperDirection direction) {
if (direction == AppinioSwiperDirection.left){
provider.startTimer();
}
},
);
},
),
),
);
}
}
class QuestionContent extends StatelessWidget {
final DummyQuestionModel question;
const QuestionContent({
Key? key,
required this.question,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
color: CupertinoColors.white,
boxShadow: <BoxShadow>[
BoxShadow(
color: CupertinoColors.systemGrey.withOpacity(0.2),
spreadRadius: 3,
blurRadius: 7,
offset: const Offset(0, 3),
)
],
),
alignment: Alignment.center,
child: Column(
children: <Widget>[
Container(
height: 90,
width: double.infinity,
decoration: const BoxDecoration(
gradient: LinearGradient(
transform: GradientRotation(.83),
begin: Alignment.topRight,
end: Alignment.bottomLeft,
colors: <Color>[
MyColors.gradiantEndColor,
MyColors.gradiantStartColor,
],
),
borderRadius: BorderRadius.only(
topLeft: Radius.circular(10),
topRight: Radius.circular(10),
),
),
child: const Center(
child: Text(
"What is the capital of Saudi Arabia?",
style: TextStyle(
color: Colors.white,
fontSize: 18,
fontWeight: FontWeight.w600,
),
),
),
),
AnswerContent(question: question),
],
),
);
}
}
class AnswerContent extends StatelessWidget {
final DummyQuestionModel question;
const AnswerContent({Key? key, required this.question}) : super(key: key);
@override
Widget build(BuildContext context) {
return Container(
padding: const EdgeInsets.all(15),
decoration: const BoxDecoration(
color: MyColors.kWhiteColor,
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(10),
bottomRight: Radius.circular(10),
),
),
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
InkWell(
onTap: () {},
child: Container(
height: 60,
width: MediaQuery.of(context).size.width - 75,
alignment: Alignment.centerLeft,
decoration: MyDecorations.answerContainerDecoration,
child: Center(
child: Text(
question.opt1!,
style: const TextStyle(
color: MyColors.darkTextColor,
fontWeight: FontWeight.bold,
fontSize: 18,
),
),
),
),
),
const SizedBox(height: 15),
InkWell(
onTap: () {},
child: Container(
height: 60,
width: MediaQuery.of(context).size.width - 75,
alignment: Alignment.centerLeft,
decoration: MyDecorations.answerContainerDecoration,
child: Center(
child: Text(
question.opt2!,
style: const TextStyle(
color: MyColors.darkTextColor,
fontWeight: FontWeight.bold,
fontSize: 18,
),
),
),
),
),
const SizedBox(height: 15),
InkWell(
onTap: () {},
child: Container(
height: 60,
width: MediaQuery.of(context).size.width - 75,
alignment: Alignment.centerLeft,
decoration: MyDecorations.answerContainerDecoration,
child: Center(
child: Text(
question.opt3!,
style: const TextStyle(
color: MyColors.darkTextColor,
fontWeight: FontWeight.bold,
fontSize: 18,
),
),
),
),
),
const SizedBox(height: 15),
InkWell(
onTap: () {},
child: Container(
height: 60,
width: MediaQuery.of(context).size.width - 75,
alignment: Alignment.centerLeft,
decoration: MyDecorations.answerContainerDecoration,
child: Center(
child: Text(
question.opt3!,
style: const TextStyle(
color: MyColors.darkTextColor,
fontWeight: FontWeight.bold,
fontSize: 18,
),
),
),
),
),
],
),
);
}
}
//Column(
// mainAxisSize: MainAxisSize.min,
// mainAxisAlignment: MainAxisAlignment.center,
// crossAxisAlignment: CrossAxisAlignment.center,
// children: <Widget>[
// InkWell(
// onTap: () {},
// child: Container(
// height: 60,
// width: MediaQuery.of(context).size.width - 75,
// alignment: Alignment.centerLeft,
// decoration: MyDecorations.answerContainerDecoration,
// child: Center(
// child: Text(
// question.opt1!,
// style: const TextStyle(
// color: MyColors.darkTextColor,
// fontWeight: FontWeight.bold,
// fontSize: 18,
// ),
// ),
// ),
// ),
// ),
// const SizedBox(height: 15),
// InkWell(
// onTap: () {},
// child: Container(
// height: 60,
// width: MediaQuery.of(context).size.width - 75,
// alignment: Alignment.centerLeft,
// decoration: MyDecorations.answerContainerDecoration,
// child: Center(
// child: Text(
// question.opt2!,
// style: const TextStyle(
// color: MyColors.darkTextColor,
// fontWeight: FontWeight.bold,
// fontSize: 18,
// ),
// ),
// ),
// ),
// ),
// const SizedBox(height: 15),
// InkWell(
// onTap: () {},
// child: Container(
// height: 60,
// width: MediaQuery.of(context).size.width - 75,
// alignment: Alignment.centerLeft,
// decoration: MyDecorations.answerContainerDecoration,
// child: Center(
// child: Text(
// question.opt3!,
// style: const TextStyle(
// color: MyColors.darkTextColor,
// fontWeight: FontWeight.bold,
// fontSize: 18,
// ),
// ),
// ),
// ),
// ),
// const SizedBox(height: 15),
// InkWell(
// onTap: () {},
// child: Container(
// height: 60,
// width: MediaQuery.of(context).size.width - 75,
// alignment: Alignment.centerLeft,
// decoration: MyDecorations.answerContainerDecoration,
// child: Center(
// child: Text(
// question.opt3!,
// style: const TextStyle(
// color: MyColors.darkTextColor,
// fontWeight: FontWeight.bold,
// fontSize: 18,
// ),
// ),
// ),
// ),
// ),
// ],
// ),

@ -260,7 +260,7 @@ class _DynamicInputScreenState extends State<DynamicInputScreen> {
for (int i = 0; i < parentsList.length; i++) {
for (int j = 0; j < (getEitDffStructureList?.length ?? 0); j++) {
if (getEitDffStructureList![j].sEGMENTNAME == parentsList[i].name) {
if (getEitDffStructureList![j].sEGMENTNAME == parentsList[i].opt1) {
if (getEitDffStructureList![j].dISPLAYFLAG != "N") {
if (getEitDffStructureList![j].vALIDATIONTYPE == "N") {
String? idColName;

@ -3,7 +3,12 @@ import 'package:flutter_svg/svg.dart';
import 'package:mohem_flutter_app/classes/colors.dart';
extension WithContainer on Widget {
Widget get insideContainer => Container(color: Colors.white, padding: const EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21), child: this);
Widget get insideContainer => Container(
color: Colors.white,
padding:
const EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21),
child: this,
);
}
class DefaultButton extends StatelessWidget {
@ -19,8 +24,20 @@ class DefaultButton extends StatelessWidget {
final int count;
final List<Color>? colors;
DefaultButton(this.text, this.onPress,
{this.color, this.isTextExpanded = true, this.svgIcon, this.disabledColor, this.count = 0, this.textColor = Colors.white, this.iconData, this.fontSize, this.colors});
const DefaultButton(
this.text,
this.onPress, {
Key? key,
this.color,
this.isTextExpanded = true,
this.svgIcon,
this.disabledColor,
this.count = 0,
this.textColor = Colors.white,
this.iconData,
this.fontSize,
this.colors,
}) : super(key: key);
@override
Widget build(BuildContext context) {
@ -31,29 +48,50 @@ class DefaultButton extends StatelessWidget {
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.0),
gradient: onPress == null
? const LinearGradient(colors: [Color(0xffEAEAEA), Color(0xffEAEAEA)])
: LinearGradient(
transform: GradientRotation(.83),
begin: Alignment.topRight,
end: Alignment.bottomLeft,
colors: colors ??
[
MyColors.gradiantEndColor,
MyColors.gradiantStartColor,
]),
? const LinearGradient(
colors: <Color>[
Color(0xffEAEAEA),
Color(0xffEAEAEA),
],
)
: color == MyColors.yellowColorII
? const LinearGradient(
colors: <Color>[
MyColors.yellowColorII,
MyColors.yellowColorII,
],
)
: LinearGradient(
transform: const GradientRotation(.83),
begin: Alignment.topRight,
end: Alignment.bottomLeft,
colors: colors ??
<Color>[
MyColors.gradiantEndColor,
MyColors.gradiantStartColor,
],
),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
children: <Widget>[
if (iconData != null) Icon(iconData, color: textColor),
if (svgIcon != null) SvgPicture.asset(svgIcon ?? "", color: textColor),
if (svgIcon != null)
SvgPicture.asset(svgIcon ?? "", color: textColor),
if (!isTextExpanded)
Padding(
padding: EdgeInsets.only(left: (iconData ?? svgIcon) != null ? 6 : 0),
padding: EdgeInsets.only(
left: (iconData ?? svgIcon) != null ? 6 : 0,
),
child: Text(
text,
textAlign: TextAlign.center,
style: TextStyle(fontSize: fontSize ?? 16, fontWeight: FontWeight.w600, color: textColor, letterSpacing: -0.48),
style: TextStyle(
fontSize: fontSize ?? 16,
fontWeight: FontWeight.w600,
color: textColor,
letterSpacing: -0.48,
),
),
),
if (isTextExpanded)
@ -61,7 +99,12 @@ class DefaultButton extends StatelessWidget {
child: Text(
text,
textAlign: TextAlign.center,
style: TextStyle(fontSize: fontSize ?? 16, fontWeight: FontWeight.w600, color: textColor, letterSpacing: -0.48),
style: TextStyle(
fontSize: fontSize ?? 16,
fontWeight: FontWeight.w600,
color: textColor,
letterSpacing: -0.48,
),
),
),
if (count > 0)
@ -72,11 +115,19 @@ class DefaultButton extends StatelessWidget {
padding: const EdgeInsets.only(left: 5, right: 5),
alignment: Alignment.center,
height: 16,
decoration: BoxDecoration(borderRadius: BorderRadius.circular(10.0), color: Colors.white),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10.0),
color: Colors.white,
),
child: Text(
"$count",
textAlign: TextAlign.center,
style: const TextStyle(fontSize: 12, fontWeight: FontWeight.w700, color: Color(0xffD02127), letterSpacing: -0.6),
style: const TextStyle(
fontSize: 12,
fontWeight: FontWeight.w700,
color: Color(0xffD02127),
letterSpacing: -0.6,
),
),
),
)

Loading…
Cancel
Save