Home page 1.3

merge-requests/390/head
Mirza.Shafique 3 years ago
parent b0dfbef52a
commit 49bfa2e9a7

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="20.104" height="30.756" viewBox="0 0 20.104 30.756">
<path id="rash_1_" data-name="rash (1)" d="M108.753,22.959V7.119a1.289,1.289,0,0,0-2.579,0v7.623h-1.8V4.262a1.289,1.289,0,0,0-2.579,0v10.48h-1.8V1.289a1.289,1.289,0,0,0-2.579,0V14.742h-1.8V4.262a1.289,1.289,0,0,0-2.579,0v12.9a5.291,5.291,0,0,1,4.381,5.205v2.794h-1.8V22.369a3.484,3.484,0,0,0-3.48-3.48h-.9V11.618a1.289,1.289,0,0,0-2.579,0v11.24a9.811,9.811,0,0,0,1.974,5.883l1.524,2.015h13.237l1.494-2.047a9.691,9.691,0,0,0,1.875-5.75ZM93.03,24.33h-1.8v-1.8h1.8Zm5.806-7.059h1.8v1.8h-1.8Zm.488,11.776h-1.8v-1.8h1.8Zm2.7-5.2h-1.8v-1.8h1.8Zm3.425,3.274h-1.8v-1.8h1.8Zm.9-7.38h-1.8v-1.8h1.8Z" transform="translate(-88.649 0)" fill="#28323a"/>
</svg>

After

Width:  |  Height:  |  Size: 749 B

@ -0,0 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" width="28.129" height="25.588" viewBox="0 0 28.129 25.588">
<g id="speech-bubble-with-question-mark" transform="translate(0 -18.284)">
<path id="Path_4562" data-name="Path 4562" d="M27.208,18.284H.92A.921.921,0,0,0,0,19.2V36.048a.92.92,0,0,0,.92.921H15v5.983a.92.92,0,0,0,1.571.651l6.68-6.634h3.958a.92.92,0,0,0,.921-.921V19.2A.921.921,0,0,0,27.208,18.284Zm-13.144,16.1a1.414,1.414,0,1,1,1.414-1.414A1.416,1.416,0,0,1,14.064,34.385Zm1.481-6.727c-.186.127-.314.22-.384.279v1.478a1.1,1.1,0,0,1-2.2,0V27.823a2.394,2.394,0,0,1,1.34-1.977c.611-.417,1.014-.693,1.014-1.553a1.257,1.257,0,1,0-2.513,0,1.1,1.1,0,0,1-2.2,0,3.452,3.452,0,0,1,6.9,0A3.779,3.779,0,0,1,15.546,27.658Z" fill="#28323a"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 748 B

@ -0,0 +1,14 @@
<svg xmlns="http://www.w3.org/2000/svg" width="28.618" height="25.042" viewBox="0 0 28.618 25.042">
<g id="wallet_5_" data-name="wallet (5)" transform="translate(0 -31.99)">
<g id="Group_7271" data-name="Group 7271" transform="translate(21.463 46.3)">
<g id="Group_7270" data-name="Group 7270">
<path id="Path_4548" data-name="Path 4548" d="M385.789,288.01a1.789,1.789,0,0,0,0,3.577h5.366V288.01Z" transform="translate(-384 -288.01)" fill="#28323a"/>
</g>
</g>
<g id="Group_7273" data-name="Group 7273" transform="translate(0 31.99)">
<g id="Group_7272" data-name="Group 7272">
<path id="Path_4549" data-name="Path 4549" d="M23.252,44.512h3.577V40.04a.886.886,0,0,0-.894-.894H24.146V36.463a.886.886,0,0,0-.894-.894H21.123l-1.538-3.076a.9.9,0,0,0-1.2-.411l-2.075,1.037-.3-.626a.9.9,0,0,0-1.2-.411L7.834,35.569H2.683A2.679,2.679,0,0,0,0,38.252v16.1a2.679,2.679,0,0,0,2.683,2.683H25.935a.886.886,0,0,0,.894-.894V51.666H23.252a3.577,3.577,0,0,1,0-7.154Zm-.894-7.154v.68l-.34-.68Zm-20.515,1.2a.835.835,0,0,1-.054-.3.886.886,0,0,1,.894-.894H4.257Zm2.844.59L14.81,34.084l2.522,5.062Zm14.649,0L17.117,34.71l1.27-.626,2.522,5.062Z" transform="translate(0 -31.99)" fill="#28323a"/>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

@ -0,0 +1,9 @@
<svg xmlns="http://www.w3.org/2000/svg" width="27.386" height="27.386" viewBox="0 0 27.386 27.386">
<g id="chatbot" transform="translate(0 0)">
<path id="Path_4567" data-name="Path 4567" d="M1.759,272.66A2.411,2.411,0,0,0,0,274.978v3.209A2.411,2.411,0,0,0,1.75,280.5a7.757,7.757,0,0,1-.091-1.192c0-5.874,0-5.517.011-5.807A7.675,7.675,0,0,1,1.759,272.66Z" transform="translate(0 -258.076)" fill="#28323a"/>
<path id="Path_4568" data-name="Path 4568" d="M479.11,272.66a7.763,7.763,0,0,1,.1,1.248v5.4a7.751,7.751,0,0,1-.091,1.192,2.411,2.411,0,0,0,1.75-2.316v-3.209A2.412,2.412,0,0,0,479.11,272.66Z" transform="translate(-453.483 -258.076)" fill="#28323a"/>
<path id="Path_4569" data-name="Path 4569" d="M81.647,186.23H72.8l-2.7,1.351a2.407,2.407,0,0,1-3.483-2.153V181.44A6.159,6.159,0,0,0,61,187.568v5.4a6.158,6.158,0,0,0,6.151,6.151h8.558a6.158,6.158,0,0,0,6.151-6.151v-5.4a6.14,6.14,0,0,0-.147-1.338Zm-13.426,4.012a.8.8,0,1,1-1.6,0v-1.6a.8.8,0,0,1,1.6,0Zm4.814,4.012H69.826a.8.8,0,0,1,0-1.6h3.209a.8.8,0,0,1,0,1.6Zm3.209-4.012a.8.8,0,1,1-1.6,0v-1.6a.8.8,0,0,1,1.6,0Z" transform="translate(-57.737 -171.735)" fill="#28323a"/>
<path id="Path_4570" data-name="Path 4570" d="M4.209,95.676a2.407,2.407,0,1,0-1.6,0c0,1.476,0,2.578,0,3.4l.634-.181a7.787,7.787,0,0,1,.971-1.649Z" transform="translate(-0.947 -86.133)" fill="#28323a"/>
<path id="Path_4571" data-name="Path 4571" d="M209.426,0h-9.949A3.481,3.481,0,0,0,196,3.477V13.693a.8.8,0,0,0,1.161.718l3.04-1.52h9.225A3.481,3.481,0,0,0,212.9,9.414V3.477A3.481,3.481,0,0,0,209.426,0Zm-.588,8.879h-8.772a.8.8,0,1,1,0-1.6h8.772a.8.8,0,0,1,0,1.6Zm0-3.209h-8.772a.8.8,0,1,1,0-1.6h8.772a.8.8,0,0,1,0,1.6Z" transform="translate(-185.516)" fill="#28323a"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

@ -0,0 +1,14 @@
<svg xmlns="http://www.w3.org/2000/svg" width="32.701" height="21.051" viewBox="0 0 32.701 21.051">
<g id="view_1_" data-name="view (1)" transform="translate(0 -82.176)">
<g id="Group_7267" data-name="Group 7267" transform="translate(11.088 87.439)">
<g id="Group_7266" data-name="Group 7266" transform="translate(0 0)">
<path id="Path_4541" data-name="Path 4541" d="M161.679,156.416a5.263,5.263,0,1,0,5.263,5.263A5.266,5.266,0,0,0,161.679,156.416Zm-.4,3.7a1.208,1.208,0,0,0-1.2,1.2H158.34a2.975,2.975,0,0,1,2.94-2.94Z" transform="translate(-156.416 -156.416)" fill="#28323a"/>
</g>
</g>
<g id="Group_7269" data-name="Group 7269" transform="translate(0 82.176)">
<g id="Group_7268" data-name="Group 7268" transform="translate(0 0)">
<path id="Path_4542" data-name="Path 4542" d="M32.32,91.613c-1.778-2.214-8.13-9.437-15.97-9.437S2.16,89.4.381,91.613a1.746,1.746,0,0,0,0,2.178c1.778,2.214,8.13,9.437,15.97,9.437S30.542,96,32.32,93.79A1.746,1.746,0,0,0,32.32,91.613Zm-15.97,8.711A7.622,7.622,0,1,1,23.973,92.7,7.621,7.621,0,0,1,16.351,100.323Z" transform="translate(0 -82.176)" fill="#28323a"/>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

@ -0,0 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" width="23.812" height="29.735" viewBox="0 0 23.812 29.735">
<g id="insurance_4_" data-name="insurance (4)" transform="translate(-51)">
<path id="Path_4536" data-name="Path 4536" d="M64.94,5.227H60.871a11.918,11.918,0,0,1-4.644,3.251v5.33a11.389,11.389,0,0,0,6.679,10.4,11.389,11.389,0,0,0,6.679-10.4V8.479A11.909,11.909,0,0,1,64.94,5.227Zm2.647,7.494-5.421,5.42a.87.87,0,0,1-1.232,0l-2.71-2.71A.871.871,0,0,1,59.457,14.2l2.094,2.094,4.8-4.8a.871.871,0,0,1,1.232,1.232Zm6.348-8.655a6.734,6.734,0,0,1-5.97-3.6A.871.871,0,0,0,67.195,0H58.617a.872.872,0,0,0-.771.465,6.734,6.734,0,0,1-5.975,3.6A.871.871,0,0,0,51,4.937v8.871A16.66,16.66,0,0,0,62.643,29.695a.868.868,0,0,0,.525,0A16.66,16.66,0,0,0,74.812,13.808V4.937a.876.876,0,0,0-.876-.871Zm-2.608,9.7a13.128,13.128,0,0,1-8.086,12.154.874.874,0,0,1-.67,0,13.128,13.128,0,0,1-8.086-12.154V7.826a.871.871,0,0,1,.6-.828,10.18,10.18,0,0,0,4.709-3.233.871.871,0,0,1,.675-.32h4.876a1.072,1.072,0,0,1,.675.32A10.18,10.18,0,0,0,70.727,7a.869.869,0,0,1,.542.518l0,.008a.881.881,0,0,1,.047.187c0,.006,0,.013,0,.02a.855.855,0,0,1,.006.1Z" fill="#28323a"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

@ -0,0 +1,4 @@
<svg id="patient_10_" data-name="patient (10)" xmlns="http://www.w3.org/2000/svg" width="30.098" height="22.926" viewBox="0 0 30.098 22.926">
<path id="Path_4543" data-name="Path 4543" d="M95.663,122.645V120h-1.77v2.645a.884.884,0,0,1-.885.882H90.352v1.764h2.656a.884.884,0,0,1,.885.882v2.645h1.77v-2.645a.883.883,0,0,1,.885-.882H99.2v-1.764H96.548A.883.883,0,0,1,95.663,122.645Zm0,0" transform="translate(-85.04 -112.946)" fill="#28323a"/>
<path id="Path_4544" data-name="Path 4544" d="M26.852,0H3.246A3.243,3.243,0,0,0,0,3.233v16.46a3.243,3.243,0,0,0,3.246,3.233H26.852A3.243,3.243,0,0,0,30.1,19.693V3.233A3.243,3.243,0,0,0,26.852,0ZM15.934,13.227a.883.883,0,0,1-.885.882H12.393v2.645a.883.883,0,0,1-.885.882H7.967a.883.883,0,0,1-.885-.882V14.108H4.426a.883.883,0,0,1-.885-.882V9.7a.883.883,0,0,1,.885-.882H7.082V6.172a.883.883,0,0,1,.885-.882h3.541a.883.883,0,0,1,.885.882V8.818h2.656a.883.883,0,0,1,.885.882ZM23.9,17.636H18.59a.882.882,0,1,1,0-1.764H23.9a.882.882,0,1,1,0,1.764Zm1.77-3.527H18.59a.882.882,0,1,1,0-1.764h7.082a.882.882,0,1,1,0,1.764Zm0-3.527H18.59a.882.882,0,1,1,0-1.764h7.082a.882.882,0,1,1,0,1.764Zm0-3.527H18.59a.882.882,0,1,1,0-1.764h7.082a.882.882,0,1,1,0,1.764Zm0,0" fill="#28323a"/>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="31" height="21.93" viewBox="0 0 31 21.93">
<path id="wifi_1_" data-name="wifi (1)" d="M21.837,50.745a8.953,8.953,0,0,0-12.674,0L5.586,47.169a14,14,0,0,1,19.828,0ZM11.444,53.026,15.5,57.082l4.056-4.056a5.737,5.737,0,0,0-8.112,0ZM15.5,40.213A16.815,16.815,0,0,1,27.423,45.16L31,41.583a21.9,21.9,0,0,0-31,0L3.577,45.16A16.816,16.816,0,0,1,15.5,40.213Z" transform="translate(0 -35.152)" fill="#28323a"/>
</svg>

After

Width:  |  Height:  |  Size: 456 B

@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" width="20.859" height="29.18" viewBox="0 0 20.859 29.18">
<g id="invoice_2_" data-name="invoice (2)" transform="translate(-73.003 0)">
<path id="Path_4539" data-name="Path 4539" d="M343,14.762h4.97c-3.171-3.171-4.439-4.446-4.97-4.97Z" transform="translate(-254.612 -9.234)" fill="#28323a"/>
<path id="Path_4540" data-name="Path 4540" d="M87.536,7.238a.855.855,0,0,1-.855-.855V0H74.713A1.712,1.712,0,0,0,73,1.71V27.47a1.712,1.712,0,0,0,1.71,1.71H92.152a1.712,1.712,0,0,0,1.71-1.71c0-.214,0-16.3,0-20.232Zm-10.73,2.846a.855.855,0,0,1,1.183-.247,1.515,1.515,0,0,0,1.121.29.812.812,0,0,0,.812-.69.57.57,0,0,0-.428-.682,7.076,7.076,0,0,1-1.953-.943,2.141,2.141,0,0,1,.721-3.584V4.1a.855.855,0,1,1,1.71,0v.047a2.257,2.257,0,0,1,.993.571.855.855,0,0,1-1.218,1.2.862.862,0,0,0-.881-.094.474.474,0,0,0-.3.375.334.334,0,0,0,.033.264,5.877,5.877,0,0,0,1.468.677,2.4,2.4,0,0,1-.093,4.542v.179a.855.855,0,1,1-1.71,0v-.082a3.1,3.1,0,0,1-1.208-.514.855.855,0,0,1-.247-1.183ZM89.359,25.475H86.168a.855.855,0,0,1,0-1.71h3.191a.855.855,0,0,1,0,1.71Zm0-5.471H77.505a.855.855,0,1,1,0-1.71H89.359a.855.855,0,0,1,0,1.71Zm0-3.647H77.505a.855.855,0,1,1,0-1.71H89.359a.855.855,0,0,1,0,1.71Z" transform="translate(0 0)" fill="#28323a"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

@ -0,0 +1,10 @@
<svg xmlns="http://www.w3.org/2000/svg" width="26.278" height="28.04" viewBox="0 0 26.278 28.04">
<g id="report_4_" data-name="report (4)" transform="translate(0.918)">
<path id="Path_4470" data-name="Path 4470" d="M19.105,70.875H3.19A2.721,2.721,0,0,1,.412,68.217V46.281A1.766,1.766,0,0,0-.918,47.911V70.394A1.753,1.753,0,0,0,.895,72.084H17.363A1.774,1.774,0,0,0,19.105,70.875Zm0,0" transform="translate(0 -44.044)" fill="#28323a"/>
<path id="Path_4471" data-name="Path 4471" d="M66.516,24.173V12.207H52.852l-.007.748c0,.007,0-.023,0,.038h5.816a.483.483,0,1,1,0,.967h-5.87a.9.9,0,0,1-.626-.282,1.066,1.066,0,0,1-.289-.745l.007-.725H50.863a.473.473,0,0,1-.483-.473v-.071H48.927a.483.483,0,0,1-.483-.479l-.015-2.1a.5.5,0,0,1,.483-.5h0l1.464.029V8.548a.506.506,0,0,1,.482-.511H66.516V5.862H62.423a1.577,1.577,0,0,1-1.588-1.586V0H48.2a1.769,1.769,0,0,0-1.821,1.629.471.471,0,0,1,.013.063c0,.025,0,.05,0,.075V24.173A1.754,1.754,0,0,0,48.2,25.864H64.672A1.783,1.783,0,0,0,66.516,24.173ZM48.933,15.228h7.948a.483.483,0,1,1,0,.967H48.933a.483.483,0,0,1,0-.967Zm13.833,8.037H48.933a.483.483,0,0,1,0-.967H62.766a.483.483,0,0,1,0,.967Zm0-2.357H48.933a.483.483,0,0,1,0-.967H62.766a.483.483,0,1,1,0,.967Zm0-2.357H48.933a.483.483,0,0,1,0-.967H62.766a.483.483,0,1,1,0,.967Zm0,0" transform="translate(-45.014)" fill="#28323a"/>
<path id="Path_4472" data-name="Path 4472" d="M369.314,20.14l-3.983-4.12v3.5a.61.61,0,0,0,.621.619Zm0,0" transform="translate(-348.543 -15.245)" fill="#28323a"/>
<path id="Path_4473" data-name="Path 4473" d="M520.332,195.25v1.4l1.079-.7Zm0,0" transform="translate(-496.051 -185.811)" fill="#28323a"/>
<path id="Path_4474" data-name="Path 4474" d="M149.082,186.25h16.981v2.236H149.082Zm0,0" transform="translate(-142.748 -177.246)" fill="#28323a"/>
<path id="Path_4475" data-name="Path 4475" d="M109.77,198.986v-1.12l-.981-.011.008,1.131Zm0,0" transform="translate(-104.403 -188.29)" fill="#28323a"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

@ -0,0 +1,10 @@
<svg xmlns="http://www.w3.org/2000/svg" width="26.278" height="28.04" viewBox="0 0 26.278 28.04">
<g id="report_4_" data-name="report (4)" transform="translate(0.918 0)">
<path id="Path_4470" data-name="Path 4470" d="M19.105,70.875H3.19A2.721,2.721,0,0,1,.412,68.217V46.281A1.766,1.766,0,0,0-.918,47.911V70.394A1.753,1.753,0,0,0,.895,72.084H17.363A1.774,1.774,0,0,0,19.105,70.875Zm0,0" transform="translate(0 -44.044)" fill="#28323a"/>
<path id="Subtraction_1" data-name="Subtraction 1" d="M-1102.629-974.136H-1119.1a1.756,1.756,0,0,1-1.811-1.691v-22.407c0-.01,0-.021,0-.031v-.006c0-.013,0-.025,0-.038a.507.507,0,0,0-.013-.063A1.759,1.759,0,0,1-1119.1-1000h12.631v4.276A1.589,1.589,0,0,0-1106-994.6a1.587,1.587,0,0,0,1.115.462h4.1v2.175h-15.653a.5.5,0,0,0-.482.511v.061l-1.464-.029a.5.5,0,0,0-.488.5l.015,2.1a.484.484,0,0,0,.483.48h1.453v.071a.476.476,0,0,0,.142.338.469.469,0,0,0,.33.135h1.031l-.006.725a1.059,1.059,0,0,0,.288.745.9.9,0,0,0,.626.282h5.87a.484.484,0,0,0,.483-.483.484.484,0,0,0-.483-.483h-5.816c0-.03,0-.038,0-.039l.007-.746h13.664v11.966A1.775,1.775,0,0,1-1102.629-974.136Zm-3.982-8.339a3.182,3.182,0,0,0-3.179,3.179,3.183,3.183,0,0,0,3.179,3.18,3.183,3.183,0,0,0,3.18-3.18v-.211h-2.967v-2.967Zm.664-.876v3.391h3.391v-.212a3.183,3.183,0,0,0-3.18-3.179Zm-12.422-1.421a.484.484,0,0,0-.483.484.484.484,0,0,0,.483.483h7.949a.484.484,0,0,0,.483-.483.484.484,0,0,0-.483-.484Z" transform="translate(1122.286 1000)" fill="#28323a"/>
<path id="Path_4472" data-name="Path 4472" d="M369.314,20.14l-3.983-4.12v3.5a.61.61,0,0,0,.621.619Zm0,0" transform="translate(-348.543 -15.245)" fill="#28323a"/>
<path id="Path_4473" data-name="Path 4473" d="M520.332,195.25v1.4l1.079-.7Zm0,0" transform="translate(-496.051 -185.811)" fill="#28323a"/>
<path id="Path_4474" data-name="Path 4474" d="M149.082,186.25h16.981v2.236H149.082Zm0,0" transform="translate(-142.748 -177.246)" fill="#28323a"/>
<path id="Path_4475" data-name="Path 4475" d="M109.77,198.986v-1.12l-.981-.011.008,1.131Zm0,0" transform="translate(-104.403 -188.29)" fill="#28323a"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="21.879" height="28.906" viewBox="0 0 21.879 28.906">
<path id="Path_4486" data-name="Path 4486" d="M25.038,0H8.511A2.68,2.68,0,0,0,5.834,2.677V26.23a2.679,2.679,0,0,0,2.677,2.676H25.037a2.679,2.679,0,0,0,2.676-2.676V2.677A2.679,2.679,0,0,0,25.038,0ZM9.266,4.849l1.666-2.868a.6.6,0,1,1,1.042.6l-1.14,1.964H22.827l-.911-2.019a.6.6,0,1,1,1.1-.5L24.308,4.9a.6.6,0,0,1-.548.85H9.787a.6.6,0,0,1-.521-.9Zm15.2,12.742h-4.4a.6.6,0,0,1-.568-.4l-.416-1.174-1,7.5a.6.6,0,0,1-.58.522h-.017a.6.6,0,0,1-.59-.488L14.866,13.068l-1.328,4.451a.6.6,0,0,1-.576.431H9.081a.6.6,0,1,1,0-1.2h3.432l1.9-6.377a.6.6,0,0,1,1.168.058l1.79,9.276.845-6.317a.6.6,0,0,1,.534-.519.615.615,0,0,1,.631.4l1.108,3.122h3.976a.6.6,0,1,1,0,1.2Z" transform="translate(-5.834 0)" fill="#28323a"/>
</svg>

After

Width:  |  Height:  |  Size: 809 B

@ -0,0 +1,12 @@
<svg xmlns="http://www.w3.org/2000/svg" width="28.714" height="31.872" viewBox="0 0 28.714 31.872">
<g id="_05-watch" data-name="05-watch" transform="translate(-36 -4)">
<g id="glyph" transform="translate(36 4)">
<path id="Path_4550" data-name="Path 4550" d="M127.69,4.651A.759.759,0,0,0,126.938,4h-6.071a.759.759,0,0,0-.751.651l-.81,5.672H128.5Z" transform="translate(-114.038 -4)" fill="#28323a"/>
<path id="Path_4551" data-name="Path 4551" d="M120.116,413.672a.759.759,0,0,0,.751.651h6.071a.759.759,0,0,0,.751-.651L128.5,408h-9.194Z" transform="translate(-114.038 -382.452)" fill="#28323a"/>
<path id="Path_4552" data-name="Path 4552" d="M51.43,116H40.3a2.279,2.279,0,0,0-2.277,2.277v4.553H36.759a.759.759,0,0,0-.759.759v2.53a.759.759,0,0,0,.759.759h1.265v4.553a2.279,2.279,0,0,0,2.277,2.277H51.43a2.279,2.279,0,0,0,2.277-2.277V118.277A2.279,2.279,0,0,0,51.43,116Zm-8.347,14.418a.759.759,0,1,1,.759-.759A.759.759,0,0,1,43.083,130.418Zm2.782,0a.759.759,0,1,1,.759-.759A.759.759,0,0,1,45.865,130.418Zm2.782,0a.759.759,0,1,1,.759-.759A.759.759,0,0,1,48.648,130.418Zm.932-6.411a11.424,11.424,0,0,1-3.291,3.326.759.759,0,0,1-.847,0,11.424,11.424,0,0,1-3.291-3.326,2.773,2.773,0,0,1,.676-3.532,2.535,2.535,0,0,1,3.038.172,2.535,2.535,0,0,1,3.038-.172A2.773,2.773,0,0,1,49.579,124.007Z" transform="translate(-36 -108.917)" fill="#28323a"/>
<path id="Path_4553" data-name="Path 4553" d="M357.3,210.281a.759.759,0,1,0-1.073,1.073,2.279,2.279,0,0,1,0,3.22.759.759,0,0,0,1.073,1.073A3.8,3.8,0,0,0,357.3,210.281Z" transform="translate(-335.764 -197.028)" fill="#28323a"/>
<path id="Path_4554" data-name="Path 4554" d="M391.237,176.338a.759.759,0,1,0-1.073,1.073,5.318,5.318,0,0,1,0,7.512A.759.759,0,1,0,391.237,186a6.83,6.83,0,0,0,0-9.659Z" transform="translate(-367.559 -165.232)" fill="#28323a"/>
<path id="Path_4555" data-name="Path 4555" d="M425.179,142.4a.759.759,0,1,0-1.073,1.073,8.347,8.347,0,0,1,0,11.8.759.759,0,1,0,1.073,1.073,9.865,9.865,0,0,0,0-13.951Z" transform="translate(-399.355 -133.439)" fill="#28323a"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

@ -0,0 +1,10 @@
<svg xmlns="http://www.w3.org/2000/svg" width="20.53" height="31.728" viewBox="0 0 20.53 31.728">
<g id="sugar-blood-level_1_" data-name="sugar-blood-level (1)" transform="translate(-90)">
<path id="Path_4556" data-name="Path 4556" d="M107.73,0H92.8A2.8,2.8,0,0,0,90,2.8V14h20.53V2.8A2.8,2.8,0,0,0,107.73,0Zm-7.465,12.131a2.8,2.8,0,0,1-2.8-2.8,5.716,5.716,0,0,1,1.059-2.721c.48-.827.953-1.513.973-1.542l.768-1.112.768,1.112c.02.029.493.715.973,1.542a5.716,5.716,0,0,1,1.059,2.721,2.8,2.8,0,0,1-2.8,2.8Z" fill="#28323a"/>
<path id="Path_4557" data-name="Path 4557" d="M240,119.811a.933.933,0,0,0,1.866,0,6.982,6.982,0,0,0-.933-2A6.971,6.971,0,0,0,240,119.811Z" transform="translate(-140.668 -110.478)" fill="#28323a"/>
<path id="Path_4558" data-name="Path 4558" d="M195,315h7.465v2.8H195Z" transform="translate(-98.468 -295.403)" fill="#28323a"/>
<path id="Path_4559" data-name="Path 4559" d="M223,390h3.857v1.866H223Z" transform="translate(-124.726 -365.737)" fill="#28323a"/>
<path id="Path_4560" data-name="Path 4560" d="M90,256.866a5.608,5.608,0,0,0,4.666,5.521v-5.521h11.2v5.521a5.608,5.608,0,0,0,4.666-5.521V255H90Z" transform="translate(0 -239.136)" fill="#28323a"/>
<path id="Path_4561" data-name="Path 4561" d="M223,450h3.857v3.733H223Z" transform="translate(-124.726 -422.005)" fill="#28323a"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

@ -0,0 +1,7 @@
<svg xmlns="http://www.w3.org/2000/svg" width="29.394" height="29.394" viewBox="0 0 29.394 29.394">
<g id="syringe_2_" data-name="syringe (2)" transform="translate(0 0)">
<path id="Path_4545" data-name="Path 4545" d="M15.392,159.1l-1.218,1.218,2.435,2.435-1.218,1.218-2.435-2.435-1.218,1.218,2.435,2.435L12.957,166.4l-2.435-2.435L9.3,165.187l2.435,2.435-1.218,1.218L8.086,166.4,6.571,167.92l.1,3.548L0,178.144l1.218,1.218,6.676-6.676,3.548.1,8.821-8.821Z" transform="translate(0 -149.967)" fill="#28323a"/>
<path id="Path_4546" data-name="Path 4546" d="M269.38,53.033l-1.218,1.218,2.435,2.435L269.38,57.9l4.87,4.87,1.218-1.218,2.435,2.435,1.218-1.218Z" transform="translate(-252.77 -49.989)" fill="#28323a"/>
<path id="Path_4547" data-name="Path 4547" d="M367.274,8.523l2.435-2.435,1.218,1.218,1.218-1.218L366.056,0l-1.218,1.218,1.218,1.218L363.621,4.87Z" transform="translate(-342.75)" fill="#28323a"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 932 B

@ -292,18 +292,9 @@ const Map localizedValues = {
"ambulancerequest": {"en": "Ambulance :", "ar": "طلب نقل "}, "ambulancerequest": {"en": "Ambulance :", "ar": "طلب نقل "},
"requestA": {"en": "Request:", "ar": "اسعاف"}, "requestA": {"en": "Request:", "ar": "اسعاف"},
"MyAppointments": {"en": "My", "ar": "مواعيدي"}, "MyAppointments": {"en": "My", "ar": "مواعيدي"},
"NoBookedAppointments": { "NoBookedAppointments": {"en": "No Booked Appointments", "ar": "لا توجد مواعيد محجوزة"},
"en": "No Booked Appointments", "NoConfirmedAppointments": {"en": "No Confirmed Appointments", "ar": "لا توجد مواعيد مؤكدة"},
"ar": "لا توجد مواعيد محجوزة" "noArrivedAppointments": {"en": "No Arrived Appointments", "ar": "لم تصل المواعيد"},
},
"NoConfirmedAppointments": {
"en": "No Confirmed Appointments",
"ar": "لا توجد مواعيد مؤكدة"
},
"noArrivedAppointments": {
"en": "No Arrived Appointments",
"ar": "لم تصل المواعيد"
},
"MyAppointmentsList": {"en": "Appointments", "ar": "قائمة بمواعدي"}, "MyAppointmentsList": {"en": "Appointments", "ar": "قائمة بمواعدي"},
"Radiology": {"en": "Radiology", "ar": "الأشعة"}, "Radiology": {"en": "Radiology", "ar": "الأشعة"},
"RadiologySubtitle": {"en": "Result", "ar": "صور وتقارير"}, "RadiologySubtitle": {"en": "Result", "ar": "صور وتقارير"},
@ -483,6 +474,23 @@ const Map localizedValues = {
"writeReview": {"en": "Write Review", "ar": " اكتب تقييمك"}, "writeReview": {"en": "Write Review", "ar": " اكتب تقييمك"},
"shareReview": {"en": "SHARE REVIEW", "ar": " اكتب تقييمك"}, "shareReview": {"en": "SHARE REVIEW", "ar": " اكتب تقييمك"},
"review": {"en": " reviews", "ar": " تقييمات"}, "review": {"en": " reviews", "ar": " تقييمات"},
"viewMedicalFile": {"en": "View Medical File", "ar": "عرض الملف الطبي"},
"viewAllServices": {"en": "View All Services", "ar": "عرض جميع الخدمات"},
"medicalFile": {"en": "Medical File", "ar": "ملف طبي"},
"verified": {"en": "Verified", "ar": "تم التحقق"},
"checkup": {"en": "Checkup", "ar": "فحص"},
"hhcHome": {"en": "HHC Home", "ar": "الصفحة الرئيسية HHC"},
"refferal": {"en": "E-Refferal", "ar": "الإحالة الإلكترونية"},
"healthCare": {"en": "Health Care", "ar": "الرعاية الصحية"},
"emergency": {"en": "Emergency", "ar": "طارئ"},
"cantSeeProfile": {"en": "Cant see your medical File?", "ar": "لا تستطيع رؤية ملفك الطبي؟"},
"loginRegisterNow": {"en": "Login or Register Now", "ar": "تسجيل الدخول أو التسجيل الآن"},
"HMGPharmacy": {"en": "HMG Pharmacy", "ar": "صيدلية HMG"},
"ecommerceSolution": {"en": "Ecommerce Solution", "ar": "حل التجارة الإلكترونية"},
"services2": {"en": "Services", "ar": "خدمات"},
"comprehensive": {"en": "Comprehensive", "ar": "شامل"},
"onlineConsulting": {"en": "Online Consulting", "ar": "استشارات عبر الإنترنت"},
"pendingOrder": {"en": " PENDING", "ar": " معلقة"}, "pendingOrder": {"en": " PENDING", "ar": " معلقة"},
"deliveredOrder": {"en": " DELIVERED", "ar": " تم التوصيل"}, "deliveredOrder": {"en": " DELIVERED", "ar": " تم التوصيل"},
"processingOrder": {"en": " PROCESSING", "ar": "قيد التنفيذ"}, "processingOrder": {"en": " PROCESSING", "ar": "قيد التنفيذ"},
@ -1033,7 +1041,7 @@ const Map localizedValues = {
"updated-email": {"en": "Updated email successfully", "ar": "تم تحديث البريد الالكتروني"}, "updated-email": {"en": "Updated email successfully", "ar": "تم تحديث البريد الالكتروني"},
"view-list-children": {"en": "View List of Children", "ar": "عرض قائمة الأطفال"}, "view-list-children": {"en": "View List of Children", "ar": "عرض قائمة الأطفال"},
"covidTest": {"en": "COVID-19 TEST", "ar": "فحص كورونا"}, "covidTest": {"en": "COVID TEST", "ar": "فحص كورونا"},
"driveThru": {"en": "Drive-Thru", "ar": "من السيارة"}, "driveThru": {"en": "Drive-Thru", "ar": "من السيارة"},
"trackDeliveryDriver": {"en": "Track Delivery Driver", "ar": "trackDeliveryDriver"}, "trackDeliveryDriver": {"en": "Track Delivery Driver", "ar": "trackDeliveryDriver"},

@ -52,15 +52,12 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
LocationUtils locationUtils; LocationUtils locationUtils;
var weather = '--'; var weather = '--';
WeatherService _weatherService = WeatherService(); WeatherService _weatherService = WeatherService();
@override @override
void initState() { void initState() {
WidgetsBinding.instance.addPostFrameCallback((timeStamp) { WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
locationUtils = locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context);
new LocationUtils(isShowConfirmDialog: true, context: context); WidgetsBinding.instance.addPostFrameCallback((_) => {Geolocator.getLastKnownPosition().then((value) => setLocation(value))});
WidgetsBinding.instance.addPostFrameCallback((_) => {
Geolocator.getLastKnownPosition()
.then((value) => setLocation(value))
});
}); });
super.initState(); super.initState();
} }
@ -99,14 +96,12 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Texts( Texts(
TranslationBase.of(context) TranslationBase.of(context).healthWeatherIndicators,
.healthWeatherIndicators,
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
), ),
Texts( Texts(
TranslationBase.of(context) TranslationBase.of(context).healthTipsBasedOnCurrentWeather,
.healthTipsBasedOnCurrentWeather,
color: Colors.white, color: Colors.white,
fontSize: 14, fontSize: 14,
), ),
@ -134,11 +129,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
width: 60, width: 60,
height: 60, height: 60,
), ),
Directionality( Directionality(textDirection: TextDirection.ltr, child: AppText(weather, fontSize: 22, color: Colors.white))
textDirection: TextDirection.ltr,
child: AppText(weather,
fontSize: 22,
color: Colors.white))
], ],
), ),
Texts( Texts(
@ -158,8 +149,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
Navigator.pop(context); Navigator.pop(context);
widget.goToMyProfile(); widget.goToMyProfile();
}, },
imageLocation: imageLocation: 'assets/images/new-design/my_file_bottom_bar.png',
'assets/images/new-design/my_file_bottom_bar.png',
title: TranslationBase.of(context).myMedicalFile, title: TranslationBase.of(context).myMedicalFile,
), ),
ServicesContainer( ServicesContainer(
@ -181,8 +171,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
), ),
), ),
), ),
imageLocation: imageLocation: 'assets/images/new-design/booking_icon_active.png',
'assets/images/new-design/booking_icon_active.png',
title: TranslationBase.of(context).bookAppo, title: TranslationBase.of(context).bookAppo,
), ),
ServicesContainer( ServicesContainer(
@ -192,8 +181,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
page: PaymentService(), page: PaymentService(),
), ),
), ),
imageLocation: imageLocation: 'assets/images/al-habib_online_payment_service_icon.png',
'assets/images/al-habib_online_payment_service_icon.png',
title: TranslationBase.of(context).onlinePaymentService, title: TranslationBase.of(context).onlinePaymentService,
), ),
ServicesContainer( ServicesContainer(
@ -203,8 +191,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
page: AnicllaryOrders(), page: AnicllaryOrders(),
), ),
), ),
imageLocation: imageLocation: 'assets/images/comprehensive_medical_checkup_logo.png',
'assets/images/comprehensive_medical_checkup_logo.png',
title: TranslationBase.of(context).anicllaryOrders, title: TranslationBase.of(context).anicllaryOrders,
), ),
ServicesContainer( ServicesContainer(
@ -212,8 +199,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
context, context,
FadePage(), FadePage(),
), ),
imageLocation: imageLocation: 'assets/images/al-habib_online_payment_service_icon.png',
'assets/images/al-habib_online_payment_service_icon.png',
title: TranslationBase.of(context).covid19_driveThrueTest, title: TranslationBase.of(context).covid19_driveThrueTest,
), ),
ServicesContainer( ServicesContainer(
@ -246,15 +232,13 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
page: InsuranceUpdate(), page: InsuranceUpdate(),
), ),
), ),
imageLocation: imageLocation: 'assets/images/medical/insurance_card_icon.png',
'assets/images/medical/insurance_card_icon.png',
title: TranslationBase.of(context).updateInsurance, title: TranslationBase.of(context).updateInsurance,
), ),
ServicesContainer( ServicesContainer(
onTap: () => Navigator.push( onTap: () => Navigator.push(
context, context,
FadePage( FadePage(page: EReferralPage()),
page: EReferralPage()),
), ),
imageLocation: 'assets/images/ereferral_service_icon.png', imageLocation: 'assets/images/ereferral_service_icon.png',
title: TranslationBase.of(context).ereferral, title: TranslationBase.of(context).ereferral,
@ -266,8 +250,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
page: MyFamily(), page: MyFamily(),
), ),
), ),
imageLocation: imageLocation: 'assets/images/new-design/family_menu_icon_red.png',
'assets/images/new-design/family_menu_icon_red.png',
title: TranslationBase.of(context).myFamily, title: TranslationBase.of(context).myFamily,
), ),
if (projectViewModel.havePrivilege(35)) if (projectViewModel.havePrivilege(35))
@ -276,8 +259,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
context, context,
FadePage(page: ChildVaccinesPage()), FadePage(page: ChildVaccinesPage()),
), ),
imageLocation: imageLocation: 'assets/images/new-design/children_vaccines_icon.png',
'assets/images/new-design/children_vaccines_icon.png',
title: TranslationBase.of(context).childVaccine, title: TranslationBase.of(context).childVaccine,
), ),
ServicesContainer( ServicesContainer(
@ -287,8 +269,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
page: ToDo(isShowAppBar: true), page: ToDo(isShowAppBar: true),
), ),
), ),
imageLocation: imageLocation: 'assets/images/new-design/upcoming_icon_bottom_bar.png',
'assets/images/new-design/upcoming_icon_bottom_bar.png',
title: TranslationBase.of(context).todoList, title: TranslationBase.of(context).todoList,
), ),
if (projectViewModel.havePrivilege(42)) if (projectViewModel.havePrivilege(42))
@ -315,8 +296,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
page: (HealthCalculators()), page: (HealthCalculators()),
), ),
), ),
imageLocation: imageLocation: 'assets/images/new-design/health_calculator_icon.png',
'assets/images/new-design/health_calculator_icon.png',
title: TranslationBase.of(context).calculators, title: TranslationBase.of(context).calculators,
), ),
ServicesContainer( ServicesContainer(
@ -326,14 +306,12 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
page: HealthConverter(), page: HealthConverter(),
), ),
), ),
imageLocation: imageLocation: 'assets/images/new-design/health_convertor_icon.png',
'assets/images/new-design/health_convertor_icon.png',
title: TranslationBase.of(context).converters, title: TranslationBase.of(context).converters,
), ),
if (projectViewModel.havePrivilege(38)) if (projectViewModel.havePrivilege(38))
ServicesContainer( ServicesContainer(
onTap: () => onTap: () => Navigator.push(context, FadePage(page: H2OPage())),
Navigator.push(context, FadePage(page: H2OPage())),
// Navigator.push( // Navigator.push(
// context, // context,
// FadePage( // FadePage(
@ -349,8 +327,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
context, context,
FadePage(), FadePage(),
), ),
imageLocation: imageLocation: 'assets/images/new-design/smartwatch_icon.png',
'assets/images/new-design/smartwatch_icon.png',
title: TranslationBase.of(context).smartWatches, title: TranslationBase.of(context).smartWatches,
), ),
ServicesContainer( ServicesContainer(
@ -360,15 +337,12 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
page: ParkingPage(), page: ParkingPage(),
), ),
), ),
imageLocation: imageLocation: 'assets/images/new-design/parking_system_icon.png',
'assets/images/new-design/parking_system_icon.png',
title: TranslationBase.of(context).parking, title: TranslationBase.of(context).parking,
), ),
ServicesContainer( ServicesContainer(
onTap: () => launch( onTap: () => launch("https://hmgwebservices.com/vt_mobile/html/index.html"),
"https://hmgwebservices.com/vt_mobile/html/index.html"), imageLocation: 'assets/images/new-design/virtual_tour_icon.png',
imageLocation:
'assets/images/new-design/virtual_tour_icon.png',
title: TranslationBase.of(context).vTour, title: TranslationBase.of(context).vTour,
), ),
ServicesContainer( ServicesContainer(
@ -376,12 +350,10 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
Navigator.of(context).push(MaterialPageRoute( Navigator.of(context).push(MaterialPageRoute(
builder: (BuildContext context) => MyWebView( builder: (BuildContext context) => MyWebView(
title: "HMG News", title: "HMG News",
selectedUrl: selectedUrl: "https://twitter.com/hashtag/مجموعة_د_سليمان_الحبيب_الطبية?src=hashtag_click&f=live",
"https://twitter.com/hashtag/مجموعة_د_سليمان_الحبيب_الطبية?src=hashtag_click&f=live",
))); )));
}, },
imageLocation: imageLocation: 'assets/images/new-design/twitter_dashboard_icon.png',
'assets/images/new-design/twitter_dashboard_icon.png',
title: TranslationBase.of(context).latestNews, title: TranslationBase.of(context).latestNews,
), ),
ServicesContainer( ServicesContainer(
@ -404,8 +376,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
getAuthUser() async { getAuthUser() async {
if (await this.sharedPref.getObject(USER_PROFILE) != null) { if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson( var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
await this.sharedPref.getObject(USER_PROFILE));
setState(() { setState(() {
authUser = data; authUser = data;
}); });
@ -419,8 +390,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
}); });
} else { } else {
setState(() { setState(() {
weather = weather = data != null ? data['Temperature'].toString() + '\u2103' : '--';
data != null ? data['Temperature'].toString() + '\u2103' : '--';
}); });
} }
} }

@ -1,12 +1,19 @@
import 'package:diplomaticquarterapp/models/hmg_services.dart'; import 'package:diplomaticquarterapp/models/hmg_services.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/all_habib_medical_service_page.dart';
import 'package:diplomaticquarterapp/pages/landing/widgets/pharmacy_view.dart'; import 'package:diplomaticquarterapp/pages/landing/widgets/pharmacy_view.dart';
import 'package:diplomaticquarterapp/pages/landing/widgets/services_view.dart'; import 'package:diplomaticquarterapp/pages/landing/widgets/services_view.dart';
import 'package:diplomaticquarterapp/pages/landing/widgets/slider_view.dart'; import 'package:diplomaticquarterapp/pages/landing/widgets/slider_view.dart';
import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class HomePageFragment extends StatefulWidget { class HomePageFragment extends StatefulWidget {
Function onPharmacyClick, onLoginClick;
HomePageFragment({this.onPharmacyClick, this.onLoginClick});
@override @override
_HomePageFragmentState createState() => _HomePageFragmentState(); _HomePageFragmentState createState() => _HomePageFragmentState();
} }
@ -18,21 +25,23 @@ class _HomePageFragmentState extends State<HomePageFragment> {
void initState() { void initState() {
// TODO: implement initState // TODO: implement initState
super.initState(); super.initState();
initialiseHmgServices(false);
// getFamilyFiles(); // getFamilyFiles();
} }
initialiseHmgServices(bool isLogin) { initialiseHmgServices(bool isLogin) {
hmgServices.add(new HmgServices(0, "LiveCare ", "Online Consulting", "assets/images/new/Live_Care.svg", isLogin)); hmgServices.clear();
hmgServices.add(new HmgServices(1, "Covid Test", "Drive-Thru", "assets/images/new/covid_test_drive_thru.svg", isLogin)); hmgServices.add(new HmgServices(0, TranslationBase.of(context).liveCare, TranslationBase.of(context).onlineConsulting, "assets/images/new/Live_Care.svg", isLogin));
hmgServices.add(new HmgServices(2, "Checkup", "Comprehensive", "assets/images/new/comprehensive_checkup.svg", isLogin)); hmgServices.add(new HmgServices(1, TranslationBase.of(context).covidTest, TranslationBase.of(context).driveThru, "assets/images/new/covid_test_drive_thru.svg", isLogin));
hmgServices.add(new HmgServices(3, "HHC Home", "Health Care", "assets/images/new/HHC.svg", isLogin)); hmgServices.add(new HmgServices(2, TranslationBase.of(context).checkup, TranslationBase.of(context).comprehensive, "assets/images/new/comprehensive_checkup.svg", isLogin));
hmgServices.add(new HmgServices(4, "E-Refferal", "Services", "assets/images/new/E_Refferal.svg", isLogin)); hmgServices.add(new HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.svg", isLogin));
hmgServices.add(new HmgServices(5, "RRT", "Emergency", "assets/images/new/RRT.svg", isLogin)); hmgServices.add(new HmgServices(4, TranslationBase.of(context).refferal, TranslationBase.of(context).services2, "assets/images/new/E_Refferal.svg", isLogin));
hmgServices.add(new HmgServices(5, "RRT", TranslationBase.of(context).emergency, "assets/images/new/RRT.svg", isLogin));
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
initialiseHmgServices(false);
return Container( return Container(
width: double.infinity, width: double.infinity,
child: Column( child: Column(
@ -41,7 +50,11 @@ class _HomePageFragmentState extends State<HomePageFragment> {
aspectRatio: 2, aspectRatio: 2,
child: Container( child: Container(
margin: EdgeInsets.all(14), margin: EdgeInsets.all(14),
child: SliderView(), child: SliderView(
onLoginClick: () {
widget.onLoginClick();
},
),
// height: MediaQuery.of(context).size.width / 2.6, // height: MediaQuery.of(context).size.width / 2.6,
), ),
), ),
@ -50,19 +63,18 @@ class _HomePageFragmentState extends State<HomePageFragment> {
child: Image.asset("assets/images/bn_offer.png"), child: Image.asset("assets/images/bn_offer.png"),
), ),
mHeight(20), mHeight(20),
Column(
children: [
Padding( Padding(
padding: const EdgeInsets.only( padding: const EdgeInsets.only(
left: 20, left: 20,
right: 20, right: 8,
top: 20,
), ),
child: Column( child: Row(
children: [
Row(
children: [ children: [
Expanded( Expanded(
child: Text( child: Text(
"HMG Services", TranslationBase.of(context).hMGService,
style: TextStyle( style: TextStyle(
color: Colors.black, color: Colors.black,
fontSize: 18, fontSize: 18,
@ -70,17 +82,29 @@ class _HomePageFragmentState extends State<HomePageFragment> {
), ),
), ),
), ),
Text( FlatButton(
"View All Services", onPressed: () {
Navigator.push(context, FadePage(page: AllHabibMedicalService()));
},
child: Text(
TranslationBase.of(context).viewAllServices,
style: TextStyle( style: TextStyle(
color: CustomColors.accentColor, color: CustomColors.accentColor,
fontSize: 14, fontSize: 14,
decoration: TextDecoration.underline,
),
), ),
), ),
], ],
), ),
mHeight(20), ),
GridView.builder( Padding(
padding: const EdgeInsets.only(
left: 20,
right: 20,
top: 4,
),
child: GridView.builder(
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12), gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12),
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
shrinkWrap: true, shrinkWrap: true,
@ -89,8 +113,8 @@ class _HomePageFragmentState extends State<HomePageFragment> {
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
return ServicesView(hmgServices[index], index); return ServicesView(hmgServices[index], index);
}), }),
],
), ),
],
), ),
Padding( Padding(
padding: const EdgeInsets.only( padding: const EdgeInsets.only(
@ -98,7 +122,11 @@ class _HomePageFragmentState extends State<HomePageFragment> {
right: 20, right: 20,
top: 20, top: 20,
), ),
child: PharmacyView(), child: PharmacyView(
onPharmacyClick: () {
widget.onPharmacyClick();
},
),
), ),
mHeight(140), mHeight(140),
], ],

@ -1,28 +1,39 @@
import 'package:auto_size_text/auto_size_text.dart';
import 'package:carousel_slider/carousel_slider.dart'; import 'package:carousel_slider/carousel_slider.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart'; import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart';
import 'package:diplomaticquarterapp/models/gradient_color.dart'; import 'package:diplomaticquarterapp/models/gradient_color.dart';
import 'package:diplomaticquarterapp/models/hmg_services.dart'; import 'package:diplomaticquarterapp/models/hmg_services.dart';
import 'package:diplomaticquarterapp/models/slider_data.dart'; import 'package:diplomaticquarterapp/models/slider_data.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/all_habib_medical_service_page.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/MyAppointments.dart';
import 'package:diplomaticquarterapp/pages/landing/widgets/logged_slider_view.dart'; import 'package:diplomaticquarterapp/pages/landing/widgets/logged_slider_view.dart';
import 'package:diplomaticquarterapp/pages/landing/widgets/pharmacy_view.dart'; import 'package:diplomaticquarterapp/pages/landing/widgets/pharmacy_view.dart';
import 'package:diplomaticquarterapp/pages/landing/widgets/services_view.dart'; import 'package:diplomaticquarterapp/pages/landing/widgets/services_view.dart';
import 'package:diplomaticquarterapp/pages/landing/widgets/slider_view.dart'; import 'package:diplomaticquarterapp/pages/landing/widgets/slider_view.dart';
import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart';
import 'package:diplomaticquarterapp/pages/medical/medical_profile_page_new.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart'; import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart';
import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart' as s; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart' as s;
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
class LoggedHomePageFragment extends StatefulWidget { class LoggedHomePageFragment extends StatefulWidget {
ProjectViewModel projectViewModel; ProjectViewModel projectViewModel;
Function onPharmacyClick;
LoggedHomePageFragment(this.projectViewModel); LoggedHomePageFragment(this.projectViewModel, {this.onPharmacyClick});
@override @override
_HomePageFragmentState createState() => _HomePageFragmentState(); _HomePageFragmentState createState() => _HomePageFragmentState();
@ -31,22 +42,26 @@ class LoggedHomePageFragment extends StatefulWidget {
class _HomePageFragmentState extends State<LoggedHomePageFragment> { class _HomePageFragmentState extends State<LoggedHomePageFragment> {
List<HmgServices> hmgServices = []; List<HmgServices> hmgServices = [];
var familyFileProvider = FamilyFilesProvider(); var familyFileProvider = FamilyFilesProvider();
List<AppoitmentAllHistoryResultList> appoList = [];
@override @override
void initState() { void initState() {
// TODO: implement initState // TODO: implement initState
super.initState(); super.initState();
initialiseHmgServices(false);
getPatientAppointmentHistory1();
// getPatientAppointmentHistory1();
// getFamilyFiles(); // getFamilyFiles();
} }
initialiseHmgServices(bool isLogin) { initialiseHmgServices(bool isLogin) {
hmgServices.add(new HmgServices(0, "LiveCare ", "Online Consulting", "assets/images/new/Live_Care.svg", isLogin)); hmgServices.clear();
hmgServices.add(new HmgServices(1, "Covid Test", "Drive-Thru", "assets/images/new/covid_test_drive_thru.svg", isLogin)); hmgServices.add(new HmgServices(0, TranslationBase.of(context).liveCare, TranslationBase.of(context).onlineConsulting, "assets/images/new/Live_Care.svg", isLogin));
hmgServices.add(new HmgServices(2, "Checkup", "Comprehensive", "assets/images/new/comprehensive_checkup.svg", isLogin)); hmgServices.add(new HmgServices(1, TranslationBase.of(context).covidTest, TranslationBase.of(context).driveThru, "assets/images/new/covid_test_drive_thru.svg", isLogin));
hmgServices.add(new HmgServices(3, "HHC Home", "Health Care", "assets/images/new/HHC.svg", isLogin)); hmgServices.add(new HmgServices(2, TranslationBase.of(context).checkup, TranslationBase.of(context).comprehensive, "assets/images/new/comprehensive_checkup.svg", isLogin));
hmgServices.add(new HmgServices(4, "E-Refferal", "Services", "assets/images/new/E_Refferal.svg", isLogin)); hmgServices.add(new HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.svg", isLogin));
hmgServices.add(new HmgServices(5, "RRT", "Emergency", "assets/images/new/RRT.svg", isLogin)); hmgServices.add(new HmgServices(4, TranslationBase.of(context).refferal, TranslationBase.of(context).services2, "assets/images/new/E_Refferal.svg", isLogin));
hmgServices.add(new HmgServices(5, "RRT", TranslationBase.of(context).emergency, "assets/images/new/RRT.svg", isLogin));
} }
Future<GetAllSharedRecordsByStatusResponse> getFamilyFiles() async { Future<GetAllSharedRecordsByStatusResponse> getFamilyFiles() async {
@ -64,6 +79,7 @@ class _HomePageFragmentState extends State<LoggedHomePageFragment> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
initialiseHmgServices(false);
var appoCountProvider = Provider.of<ToDoCountProviderModel>(context); var appoCountProvider = Provider.of<ToDoCountProviderModel>(context);
List<Widget> myMedicalList = Utils.myMedicalListHomePage(projectViewModel: widget.projectViewModel, context: context, count: appoCountProvider.count, isLogin: widget.projectViewModel.isLogin); List<Widget> myMedicalList = Utils.myMedicalListHomePage(projectViewModel: widget.projectViewModel, context: context, count: appoCountProvider.count, isLogin: widget.projectViewModel.isLogin);
return Container( return Container(
@ -106,7 +122,7 @@ class _HomePageFragmentState extends State<LoggedHomePageFragment> {
for (int i = 0; i < sliderData.length; i++) for (int i = 0; i < sliderData.length; i++)
Builder( Builder(
builder: (BuildContext context) { builder: (BuildContext context) {
return LoggedSliderView(sliderData[i]); return LoggedSliderView(widget.projectViewModel, sliderData[i]);
}, },
) )
], ],
@ -125,7 +141,12 @@ class _HomePageFragmentState extends State<LoggedHomePageFragment> {
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
itemBuilder: (context, index) { itemBuilder: (context, index) {
return Container( return widget.projectViewModel.isArabic
? Container(
child: myMedicalList[index],
margin: EdgeInsets.only(left: index == 3 ? 20 : 0, right: index == 0 ? 20 : 0),
)
: Container(
child: myMedicalList[index], child: myMedicalList[index],
margin: EdgeInsets.only(left: index == 0 ? 20 : 0, right: index == 3 ? 20 : 0), margin: EdgeInsets.only(left: index == 0 ? 20 : 0, right: index == 3 ? 20 : 0),
); );
@ -136,44 +157,63 @@ class _HomePageFragmentState extends State<LoggedHomePageFragment> {
), ),
), ),
Padding( Padding(
padding: const EdgeInsets.only( padding: widget.projectViewModel.isArabic
left: 20, ? EdgeInsets.only(
right: 20, right: 20,
top: 16, left: 8,
top: 4,
)
: EdgeInsets.only(
left: 20,
right: 8,
top: 4,
), ),
child: Row( child: Row(
children: [ children: [
mFlex(1), mFlex(1),
Text( FlatButton(
"View Medical File", onPressed: () {
navigateTo(context, MedicalProfilePage());
},
child: Text(
TranslationBase.of(context).viewMedicalFile,
style: TextStyle( style: TextStyle(
color: CustomColors.accentColor, color: CustomColors.accentColor,
fontSize: 14, fontSize: 14,
decoration: TextDecoration.underline, decoration: TextDecoration.underline,
), ),
), ),
),
], ],
), ),
), ),
mHeight(16), mHeight(4),
Padding( appoCountProvider.count == 0
? Padding(
padding: const EdgeInsets.only(left: 20, right: 20), padding: const EdgeInsets.only(left: 20, right: 20),
child: Image.asset("assets/images/bn_offer.png"), child: Image.asset("assets/images/bn_offer.png"),
), )
: offersView(appoCountProvider.count),
mHeight(14), mHeight(14),
Column( Column(
children: [ children: [
Padding( Padding(
padding: const EdgeInsets.only( padding: widget.projectViewModel.isArabic
left: 20, ? EdgeInsets.only(
right: 20, right: 20,
top: 20, left: 8,
top: 4,
)
: EdgeInsets.only(
left: 20,
right: 8,
top: 4,
), ),
child: Row( child: Row(
children: [ children: [
Expanded( Expanded(
child: Text( child: Text(
"HMG Services", TranslationBase.of(context).hMGService,
style: TextStyle( style: TextStyle(
color: Colors.black, color: Colors.black,
fontSize: 18, fontSize: 18,
@ -181,18 +221,23 @@ class _HomePageFragmentState extends State<LoggedHomePageFragment> {
), ),
), ),
), ),
Text( FlatButton(
"View All Services", onPressed: () {
Navigator.push(context, FadePage(page: AllHabibMedicalService()));
},
child: Text(
TranslationBase.of(context).viewAllServices,
style: TextStyle( style: TextStyle(
color: CustomColors.accentColor, color: CustomColors.accentColor,
decoration: TextDecoration.underline,
fontSize: 14, fontSize: 14,
decoration: TextDecoration.underline,
),
), ),
), ),
], ],
), ),
), ),
mHeight(20), mHeight(4),
Container( Container(
width: double.infinity, width: double.infinity,
height: MediaQuery.of(context).size.height * 0.143, height: MediaQuery.of(context).size.height * 0.143,
@ -204,7 +249,9 @@ class _HomePageFragmentState extends State<LoggedHomePageFragment> {
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
return Container( return Container(
width: MediaQuery.of(context).size.height * 0.143, width: MediaQuery.of(context).size.height * 0.143,
margin: EdgeInsets.only(left: index == 0 ? 20 : 0, right: index == hmgServices.length - 1 ? 20 : 0), margin: widget.projectViewModel.isArabic
? EdgeInsets.only(left: index == hmgServices.length - 1 ? 20 : 0, right: index == 0 ? 20 : 0)
: EdgeInsets.only(left: index == 0 ? 20 : 0, right: index == hmgServices.length - 1 ? 20 : 0),
child: ServicesView(hmgServices[index], index), child: ServicesView(hmgServices[index], index),
); );
}, },
@ -221,11 +268,189 @@ class _HomePageFragmentState extends State<LoggedHomePageFragment> {
right: 20, right: 20,
top: 20, top: 20,
), ),
child: PharmacyView(), child: PharmacyView(
onPharmacyClick: () {
widget.onPharmacyClick();
},
),
), ),
mHeight(140), mHeight(140),
], ],
), ),
); );
} }
Widget offersView(int counts) {
if (appoList.length > 0) {
return Container(
height: MediaQuery.of(context).size.width / 4.35,
child: ListView.separated(
itemCount: 2,
padding: EdgeInsets.zero,
scrollDirection: Axis.horizontal,
physics: BouncingScrollPhysics(),
itemBuilder: (context, index) {
return index == 0
? Container(
width: MediaQuery.of(context).size.width / 1.123,
height: MediaQuery.of(context).size.width / 4.35,
margin: widget.projectViewModel.isArabic ? EdgeInsets.only(right: index == 0 ? 20 : 0) : EdgeInsets.only(left: index == 0 ? 20 : 0),
padding: EdgeInsets.all(8),
decoration: containerColorRadiusBorderWidth(Colors.white, 16, Colors.black, 2),
child: InkWell(
onTap: () {},
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
circularAviator(MediaQuery.of(context).size.width / 10, brColor: Colors.white, elevation: 1),
mWidth(8),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
appoList[index].doctorTitle + " " + appoList[index].doctorNameObj,
style: TextStyle(
color: Colors.black,
fontSize: 16,
fontWeight: FontWeight.bold,
),
),
Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Icon(
Icons.watch_later_rounded,
size: 16,
),
mWidth(4),
Expanded(
child: AutoSizeText(
DateUtil.getWeekDayMonthDayYearDateFormatted(
DateUtil.convertStringToDate(appoList[index].appointmentDate), widget.projectViewModel.isArabic ? "ar" : "en") +
" " +
appoList[index].startTime.substring(0, 5),
maxLines: 1,
),
),
],
),
],
),
),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Icon(
Icons.notifications_active_sharp,
color: Color(0xFF9D9D9D),
size: 16,
),
mWidth(4),
Text(
"Remind me",
style: TextStyle(
color: Color(0xFF9D9D9D),
fontSize: 12,
),
),
],
),
],
),
mFlex(1),
Flexible(
child: Container(
width: double.infinity,
child: Row(
children: [
// Text(
// "Appointment Details",
// style: TextStyle(
// color: CustomColors.accentColor,
// decoration: TextDecoration.underline,
// ),
// ),
FlatButton(
onPressed: () {
Navigator.push(context, FadePage(page: MyAppointments()));
},
child: Text(
"Appointment Details",
style: TextStyle(
color: CustomColors.accentColor,
fontSize: 14,
decoration: TextDecoration.underline,
),
),
),
mFlex(1),
Icon(Icons.arrow_forward),
],
),
),
),
],
),
),
],
),
),
)
: Padding(
padding: widget.projectViewModel.isArabic ? EdgeInsets.only(left: index == 1 ? 20 : 0) : EdgeInsets.only(right: index == 1 ? 20 : 0),
child: Container(
child: showOfferImage(),
width: MediaQuery.of(context).size.width / 1.123,
),
);
},
separatorBuilder: (BuildContext context, int index) {
return mWidth(12);
},
),
);
} else {
return Padding(
padding: const EdgeInsets.only(left: 20, right: 20),
child: Image.asset("assets/images/bn_offer.png"),
);
}
}
Widget showOfferImage() {
return Image.asset(
"assets/images/bn_offer.png",
width: double.infinity,
height: double.infinity,
fit: BoxFit.fill,
);
}
getPatientAppointmentHistory1() async {
DoctorsListService service = new DoctorsListService();
Map res = await service.getPatientAppointmentHistory(true, context);
// appoList.clear();
if (res['MessageStatus'] == 1) {
if (res['AppoimentAllHistoryResultList'].length != 0) {
appoList.clear();
res['AppoimentAllHistoryResultList'].forEach((v) {
appoList.add(new AppoitmentAllHistoryResultList.fromJson(v));
});
}
}
setState(() {});
}
} }

@ -1,54 +1,32 @@
import 'package:carousel_slider/carousel_slider.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart';
import 'package:diplomaticquarterapp/models/gradient_color.dart';
import 'package:diplomaticquarterapp/models/hmg_services.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/all_habib_medical_service_page.dart';
import 'package:diplomaticquarterapp/pages/ContactUs/contact_us_page.dart';
import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-drivethru-location.dart'; import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-drivethru-location.dart';
import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/landing/fragments/home_page_fragment.dart'; import 'package:diplomaticquarterapp/pages/landing/fragments/home_page_fragment.dart';
import 'package:diplomaticquarterapp/pages/landing/fragments/logged_home_page_fragment.dart'; import 'package:diplomaticquarterapp/pages/landing/fragments/logged_home_page_fragment.dart';
import 'package:diplomaticquarterapp/pages/landing/widgets/logged_slider_view.dart';
import 'package:diplomaticquarterapp/pages/landing/widgets/offer_view.dart';
import 'package:diplomaticquarterapp/pages/landing/widgets/pharmacy_view.dart';
import 'package:diplomaticquarterapp/pages/landing/widgets/services_view.dart';
import 'package:diplomaticquarterapp/pages/landing/widgets/slider_view.dart';
import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart';
import 'package:diplomaticquarterapp/pages/packages_offers/OfferAndPackagesPage.dart';
import 'package:diplomaticquarterapp/pages/paymentService/payment_service.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart' as s;
import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart';
import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter_svg/flutter_svg.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'landing_page_pharmcy.dart'; import 'landing_page_pharmcy.dart';
import 'package:diplomaticquarterapp/models/slider_data.dart';
class HomePage2 extends StatefulWidget { class HomePage2 extends StatefulWidget {
final Function goToMyProfile; final Function goToMyProfile;
Function onLoginClick;
HomePage2({Key key, this.goToMyProfile}); HomePage2({Key key, this.goToMyProfile, this.onLoginClick});
@override @override
_HomePageState2 createState() => _HomePageState2(); _HomePageState2 createState() => _HomePageState2();
@ -61,6 +39,7 @@ class _HomePageState2 extends State<HomePage2> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectViewModel = Provider.of(context); projectViewModel = Provider.of(context);
return BaseView<DashboardViewModel>( return BaseView<DashboardViewModel>(
onModelReady: (model) => model.getPatientRadOrders(), onModelReady: (model) => model.getPatientRadOrders(),
builder: (_, model, wi) => Container( builder: (_, model, wi) => Container(
@ -70,7 +49,21 @@ class _HomePageState2 extends State<HomePage2> {
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
child: Column( child: Column(
children: [ children: [
!model.isLogin ? HomePageFragment() : LoggedHomePageFragment(projectViewModel), !model.isLogin
? HomePageFragment(
onPharmacyClick: () {
getPharmacyToken(model);
},
onLoginClick: () {
widget.onLoginClick();
},
)
: LoggedHomePageFragment(
projectViewModel,
onPharmacyClick: () {
getPharmacyToken(model);
},
),
], ],
), ),
), ),

@ -15,9 +15,9 @@ import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart';
import 'package:diplomaticquarterapp/pages/landing/home_page_2.dart'; import 'package:diplomaticquarterapp/pages/landing/home_page_2.dart';
import 'package:diplomaticquarterapp/pages/livecare/incoming_call.dart'; import 'package:diplomaticquarterapp/pages/livecare/incoming_call.dart';
import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart'; import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart';
import 'package:diplomaticquarterapp/pages/medical/medical_profile_page_new.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart' import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart' as family;
as family;
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart'; import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
import 'package:diplomaticquarterapp/uitl/CalendarUtils.dart'; import 'package:diplomaticquarterapp/uitl/CalendarUtils.dart';
@ -63,8 +63,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
var themeNotifier; var themeNotifier;
///inject the user data ///inject the user data
AuthenticatedUserObject authenticatedUserObject = AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>();
locator<AuthenticatedUserObject>();
final FirebaseMessaging _firebaseMessaging = FirebaseMessaging(); final FirebaseMessaging _firebaseMessaging = FirebaseMessaging();
final authService = new AuthProvider(); final authService = new AuthProvider();
@ -72,10 +71,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
var familyFileProvider = family.FamilyFilesProvider(); var familyFileProvider = family.FamilyFilesProvider();
void _requestIOSPermissions() { void _requestIOSPermissions() {
flutterLocalNotificationsPlugin flutterLocalNotificationsPlugin.resolvePlatformSpecificImplementation<IOSFlutterLocalNotificationsPlugin>()?.requestPermissions(
.resolvePlatformSpecificImplementation<
IOSFlutterLocalNotificationsPlugin>()
?.requestPermissions(
alert: true, alert: true,
badge: true, badge: true,
sound: true, sound: true,
@ -107,8 +103,6 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
print(route.settings.name); print(route.settings.name);
} }
//setState(() { //setState(() {
print("didChangeAppLifecycleState"); print("didChangeAppLifecycleState");
print('state = $state'); print('state = $state');
@ -118,12 +112,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
if (LandingPage.isOpenCallPage) { if (LandingPage.isOpenCallPage) {
if (!isPageNavigated) { if (!isPageNavigated) {
isPageNavigated = true; isPageNavigated = true;
Navigator.push( Navigator.push(context, MaterialPageRoute(builder: (context) => IncomingCall(incomingCallData: LandingPage.incomingCallData))).then((value) {
context,
MaterialPageRoute(
builder: (context) => IncomingCall(
incomingCallData: LandingPage.incomingCallData)))
.then((value) {
isPageNavigated = false; isPageNavigated = false;
}); });
} }
@ -157,16 +146,12 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
pageController = PageController(keepPage: true); pageController = PageController(keepPage: true);
_firebaseMessaging.setAutoInitEnabled(true); _firebaseMessaging.setAutoInitEnabled(true);
locationUtils = locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context);
new LocationUtils(isShowConfirmDialog: true, context: context); WidgetsBinding.instance.addPostFrameCallback((_) => locationUtils.getCurrentLocation());
WidgetsBinding.instance
.addPostFrameCallback((_) => locationUtils.getCurrentLocation());
// HMG (Guest/Internet) Wifi Access [Zohaib Kambrani] // HMG (Guest/Internet) Wifi Access [Zohaib Kambrani]
HMGNetworkConnectivity(context, () { HMGNetworkConnectivity(context, () {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
PlatformBridge() PlatformBridge().connectHMGGuestWifi().then((value) => {GifLoaderDialogUtils.hideDialog(context)});
.connectHMGGuestWifi()
.then((value) => {GifLoaderDialogUtils.hideDialog(context)});
}).checkAndConnectIfNoInternet(); }).checkAndConnectIfNoInternet();
if (Platform.isIOS) { if (Platform.isIOS) {
@ -192,7 +177,6 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
// if (results[Permission.calendar].isGranted) ; // if (results[Permission.calendar].isGranted) ;
}); });
requestPermissions(); requestPermissions();
// }); // });
// //
@ -313,16 +297,9 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
// ); // );
} }
showDialogs(String message) { showDialogs(String message) {
ConfirmDialog dialog = new ConfirmDialog( ConfirmDialog dialog = new ConfirmDialog(
context: context, context: context, confirmMessage: message, okText: TranslationBase.of(context).confirm, cancelText: TranslationBase.of(context).cancel_nocaps, okFunction: () => {}, cancelFunction: () => {});
confirmMessage: message,
okText: TranslationBase.of(context).confirm,
cancelText: TranslationBase.of(context).cancel_nocaps,
okFunction: () => {},
cancelFunction: () => {});
dialog.showAlertDialog(context); dialog.showAlertDialog(context);
} }
@ -347,8 +324,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
return permissionResults; return permissionResults;
} }
static Future<dynamic> myBackgroundMessageHandler( static Future<dynamic> myBackgroundMessageHandler(Map<String, dynamic> message) async {
Map<String, dynamic> message) async {
Map<String, dynamic> myMap = new Map<String, dynamic>.from(message['data']); Map<String, dynamic> myMap = new Map<String, dynamic>.from(message['data']);
if (message.containsKey('data')) { if (message.containsKey('data')) {
print("myBackgroundMessageHandler Inside"); print("myBackgroundMessageHandler Inside");
@ -383,8 +359,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
void doIt() { void doIt() {
getUserInformation().then((value) { getUserInformation().then((value) {
if (value != null) if (value != null) projectViewModel.platformBridge().registerHmgGeofences();
projectViewModel.platformBridge().registerHmgGeofences();
}); });
} }
@ -406,9 +381,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
Navigator.of(context).pushNamed(CONFIRM_LOGIN); Navigator.of(context).pushNamed(CONFIRM_LOGIN);
} else { } else {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
authService authService.selectDeviceImei(DEVICE_TOKEN).then((SelectDeviceIMEIRES value) {
.selectDeviceImei(DEVICE_TOKEN)
.then((SelectDeviceIMEIRES value) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (value != null) { if (value != null) {
setUserValues(value); setUserValues(value);
@ -429,21 +402,12 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
getNotificationCount(token) async { getNotificationCount(token) async {
if (await sharedPref.getObject(USER_PROFILE) != null) { if (await sharedPref.getObject(USER_PROFILE) != null) {
var data = var data = AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE));
AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE));
if (data != null) { if (data != null) {
authService authService.registeredAuthenticatedUser(data, token, 0, 0).then((res) => {print(res)});
.registeredAuthenticatedUser(data, token, 0, 0)
.then((res) => {print(res)});
authService.getDashboard().then((value) => { authService.getDashboard().then((value) => {
setState(() { setState(() {
notificationCount = value['List_PatientDashboard'][0] notificationCount = value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'] > 99 ? '99+' : value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString();
['UnreadPatientNotificationCount'] >
99
? '99+'
: value['List_PatientDashboard'][0]
['UnreadPatientNotificationCount']
.toString();
sharedPref.setString(NOTIFICATION_COUNT, notificationCount); sharedPref.setString(NOTIFICATION_COUNT, notificationCount);
}) })
@ -461,16 +425,11 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
appBar: AppBar( appBar: AppBar(
elevation: 0, elevation: 0,
textTheme: TextTheme( textTheme: TextTheme(
headline6: TextStyle( headline6: TextStyle(color: Theme.of(context).textTheme.headline1.color, fontWeight: FontWeight.bold),
color: Theme.of(context).textTheme.headline1.color,
fontWeight: FontWeight.bold),
), ),
title: Text( title: Text(
getText(currentTab).toUpperCase(), getText(currentTab).toUpperCase(),
style: TextStyle( style: TextStyle(fontWeight: FontWeight.bold, color: Theme.of(context).textTheme.headline1.color, fontFamily: projectViewModel.isArabic ? 'Cairo' : 'WorkSans'),
fontWeight: FontWeight.bold,
color: Theme.of(context).textTheme.headline1.color,
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'WorkSans'),
// bold: true, // bold: true,
// color: Colors.white, // color: Colors.white,
), ),
@ -553,6 +512,9 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
goToMyProfile: () { goToMyProfile: () {
_changeCurrentTab(1); _changeCurrentTab(1);
}, },
onLoginClick: () {
login();
},
), ),
MedicalProfilePage(), MedicalProfilePage(),
BookingOptions(), BookingOptions(),
@ -565,8 +527,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
index: currentTab, index: currentTab,
), ),
floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked, floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
floatingActionButton: floatingActionButton: (projectViewModel.havePrivilege(34) && currentTab == 0)
(projectViewModel.havePrivilege(34) && currentTab == 0)
? FloatingButton( ? FloatingButton(
elevation: true, elevation: true,
onTap: () { onTap: () {
@ -597,22 +558,15 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
} }
void checkUserStatus(token) async { void checkUserStatus(token) async {
authService authService.selectDeviceImei(token).then((SelectDeviceIMEIRES value) => setUserValues(value));
.selectDeviceImei(token)
.then((SelectDeviceIMEIRES value) => setUserValues(value));
if (projectViewModel.isLoading == true) { if (projectViewModel.isLoading == true) {
var data = var data = AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE));
AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE));
if (data != null) { if (data != null) {
authService authService.registeredAuthenticatedUser(data, token, 0, 0).then((res) => {print(res)});
.registeredAuthenticatedUser(data, token, 0, 0)
.then((res) => {print(res)});
authService.getDashboard().then((value) => { authService.getDashboard().then((value) => {
setState(() { setState(() {
if (value != null) { if (value != null) {
notificationCount = value['List_PatientDashboard'][0] notificationCount = value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString();
['UnreadPatientNotificationCount']
.toString();
} }
}) })
}); });

@ -1,16 +1,21 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/carbs/carbs.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/carbs/carbs.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/extensions/string_extensions.dart'; import 'package:diplomaticquarterapp/extensions/string_extensions.dart';
import 'package:diplomaticquarterapp/models/slider_data.dart'; import 'package:diplomaticquarterapp/models/slider_data.dart';
class LoggedSliderView extends StatelessWidget { class LoggedSliderView extends StatelessWidget {
ProjectViewModel projectViewModel;
SliderData sliderData; SliderData sliderData;
LoggedSliderView(this.sliderData); LoggedSliderView(this.projectViewModel, this.sliderData);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
//'${DateUtil.getMonthDayYearDateFormatted(sliderData.dateofBirthDataTime)} ,${model.user.gender == 1 ? TranslationBase.of(context).male : TranslationBase.of(context).female} ${model.user.age.toString() + "y"}',
return Card( return Card(
shape: cardRadius(20), shape: cardRadius(20),
elevation: 0, elevation: 0,
@ -38,7 +43,9 @@ class LoggedSliderView extends StatelessWidget {
height: double.infinity, height: double.infinity,
clipBehavior: Clip.antiAlias, clipBehavior: Clip.antiAlias,
margin: EdgeInsets.zero, margin: EdgeInsets.zero,
decoration: containerBottomRightRadiusWithGradient(MediaQuery.of(context).size.width / 4, darkColor: sliderData.darkColor, lightColor: sliderData.lightColor), decoration: projectViewModel.isArabic
? containerBottomRightRadiusWithGradientForAr(MediaQuery.of(context).size.width / 4, darkColor: sliderData.darkColor, lightColor: sliderData.lightColor)
: containerBottomRightRadiusWithGradient(MediaQuery.of(context).size.width / 4, darkColor: sliderData.darkColor, lightColor: sliderData.lightColor),
child: Card( child: Card(
color: Colors.transparent, color: Colors.transparent,
margin: EdgeInsets.zero, margin: EdgeInsets.zero,
@ -50,21 +57,22 @@ class LoggedSliderView extends StatelessWidget {
Row( Row(
children: [ children: [
Container( Container(
decoration: containerColorRadiusRight(Color(0xFFFBF2E31), 100), decoration: projectViewModel.isArabic ? containerColorRadiusLeft(Color(0xFFFBF2E31), 100) : containerColorRadiusRight(Color(0xFFFBF2E31), 100),
padding: EdgeInsets.only(left: 20, right: 16, top: 6, bottom: 6), padding: EdgeInsets.only(left: 20, right: 16, top: 6, bottom: 6),
child: Text( child: Text(
"Medical File", TranslationBase.of(context).medicalFile,
style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 13), style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 13),
), ),
), ),
mWidth(MediaQuery.of(context).size.width / 50), mWidth(MediaQuery.of(context).size.width / 50),
//circularAviator(MediaQuery.of(context).size.width / 14, brColor: Colors.white), //circularAviator(MediaQuery.of(context).size.width / 14, brColor: Colors.white),
mFlex(1), mFlex(1),
projectViewModel.isArabic?circularAviator(MediaQuery.of(context).size.width / 28, brColor: Colors.white, icon: Icons.done, bcColor: Colors.white):Container(),
Text( Text(
"Verified", TranslationBase.of(context).verified,
style: TextStyle(color: Colors.white, fontSize: 10), style: TextStyle(color: Colors.white, fontSize: 10),
), ),
circularAviator(MediaQuery.of(context).size.width / 28, brColor: Colors.white, icon: Icons.done, bcColor: Colors.white), !projectViewModel.isArabic?circularAviator(MediaQuery.of(context).size.width / 28, brColor: Colors.white, icon: Icons.done, bcColor: Colors.white):Container(),
mWidth(MediaQuery.of(context).size.width / 70), mWidth(MediaQuery.of(context).size.width / 70),
], ],
), ),
@ -102,7 +110,17 @@ class LoggedSliderView extends StatelessWidget {
), ),
), ),
), ),
Positioned( projectViewModel.isArabic
? Positioned(
child: Icon(
Icons.arrow_forward,
color: Colors.white,
size: 20,
),
bottom: 8,
left: 8,
)
: Positioned(
child: Icon( child: Icon(
Icons.arrow_forward_rounded, Icons.arrow_forward_rounded,
color: Colors.white, color: Colors.white,

@ -1,41 +1,58 @@
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter_svg/flutter_svg.dart';
class PharmacyView extends StatelessWidget { class PharmacyView extends StatelessWidget {
Function onPharmacyClick;
PharmacyView({this.onPharmacyClick});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return InkWell(
onTap: (){
onPharmacyClick();
},
child: Container(
width: double.infinity, width: double.infinity,
decoration: containerColorRadiusBorderWidth(Colors.grey[200], 16, Colors.grey[300], 2), decoration:
containerBottomRightRadiusWithGradientBorder(16, darkColor: CustomColors.darkGreyColor.withOpacity(0.5), lightColor: CustomColors.lightGreyColor, borderColor: Color(0xFFcccccc), w: 1),
padding: EdgeInsets.only(left: 12, right: 12, top: 12, bottom: 12), padding: EdgeInsets.only(left: 12, right: 12, top: 12, bottom: 12),
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
SvgPicture.asset("assets/images/new/Pharmacy.svg"), SvgPicture.asset("assets/images/new/Pharmacy.svg"),
mWidth(12), mWidth(12),
Column( Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
Text( Text(
"HMG Pharmacy", TranslationBase.of(context).HMGPharmacy,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 16, fontSize: 16,
), ),
), ),
Text( Text(
"Ecommerce Solution", TranslationBase.of(context).ecommerceSolution,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 14, fontSize: 14,
), ),
), ),
], ],
) ),
),
mWidth(12),
Opacity(
opacity: 0.2,
child: SvgPicture.asset("assets/images/new/Pharmacy.svg"),
),
], ],
), ),
),
); );
} }
} }

@ -1,8 +1,15 @@
import 'package:auto_size_text/auto_size_text.dart'; import 'package:auto_size_text/auto_size_text.dart';
import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/models/hmg_services.dart'; import 'package:diplomaticquarterapp/models/hmg_services.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/e_referral_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_page.dart';
import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-drivethru-location.dart';
import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart';
import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart';
import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter_svg/flutter_svg.dart';
@ -14,7 +21,23 @@ class ServicesView extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return InkWell(
onTap: () {
if (index == 0) {
Navigator.push(context, FadePage(page: LiveCareHome()));
} else if (index == 1) {
Navigator.push(context, FadePage(page: CovidDrivethruLocation()));
} else if (index == 2) {
Navigator.push(context, FadePage(page: CMCPage()));
} else if (index == 3) {
Navigator.push(context, FadePage(page: HomeHealthCarePage()));
} else if (index == 4) {
Navigator.push(context, FadePage(page: EReferralPage()));
} else if (index == 5) {
Navigator.push(context, FadePage(page: ErOptions(isAppbar: true)));
}
},
child: Container(
width: double.infinity, width: double.infinity,
height: double.infinity, height: double.infinity,
decoration: containerRadiusWithGradientServices(20, lightColor: CustomColors.lightGreyColor, darkColor: CustomColors.darkGreyColor), decoration: containerRadiusWithGradientServices(20, lightColor: CustomColors.lightGreyColor, darkColor: CustomColors.darkGreyColor),
@ -56,7 +79,7 @@ class ServicesView extends StatelessWidget {
Container( Container(
width: double.infinity, width: double.infinity,
height: double.infinity, height: double.infinity,
padding: EdgeInsets.all(MediaQuery.of(context).size.width / 30), padding: EdgeInsets.only(left: SizeConfig.widthMultiplier * 3, right: SizeConfig.widthMultiplier * 3, top: SizeConfig.widthMultiplier * 3, bottom: SizeConfig.widthMultiplier * 2),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
@ -65,28 +88,20 @@ class ServicesView extends StatelessWidget {
hmgServices.icon, hmgServices.icon,
height: index == 0 ? MediaQuery.of(context).size.width / 18 : MediaQuery.of(context).size.width / 14, height: index == 0 ? MediaQuery.of(context).size.width / 18 : MediaQuery.of(context).size.width / 14,
), ),
mFlex(2), mFlex(4),
Text( AutoSizeText(
hmgServices.title, hmgServices.title,
maxLines: 1,
style: TextStyle( style: TextStyle(
fontSize: SizeConfig.textMultiplier * 1.9, fontSize: SizeConfig.textMultiplier * 1.9,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
), ),
Container( AutoSizeText(
width: double.infinity,
child: Row(
children: [
Expanded(
child: AutoSizeText(
hmgServices.subTitle, hmgServices.subTitle,
maxLines: 1, maxLines: 1,
style: TextStyle( style: TextStyle(
fontSize: SizeConfig.textMultiplier * 1.2, fontSize: SizeConfig.textMultiplier * 0.9,
),
),
),
],
), ),
), ),
mFlex(1), mFlex(1),
@ -95,6 +110,7 @@ class ServicesView extends StatelessWidget {
), ),
], ],
), ),
),
); );
} }
} }

@ -1,10 +1,21 @@
import 'package:auto_size_text/auto_size_text.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'dart:math'; import 'dart:math';
import 'package:provider/provider.dart';
class SliderView extends StatelessWidget { class SliderView extends StatelessWidget {
Function onLoginClick;
SliderView({this.onLoginClick});
ProjectViewModel projectViewModel;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
return Card( return Card(
shape: cardRadius(20), shape: cardRadius(20),
elevation: 0, elevation: 0,
@ -21,7 +32,7 @@ class SliderView extends StatelessWidget {
height: double.infinity, height: double.infinity,
clipBehavior: Clip.antiAlias, clipBehavior: Clip.antiAlias,
margin: EdgeInsets.zero, margin: EdgeInsets.zero,
decoration: containerBottomRightRadiusWithGradient(MediaQuery.of(context).size.width / 4), decoration:projectViewModel.isArabic?containerBottomRightRadiusWithGradientForAr(MediaQuery.of(context).size.width / 4): containerBottomRightRadiusWithGradient(MediaQuery.of(context).size.width / 4),
child: Card( child: Card(
color: Colors.transparent, color: Colors.transparent,
margin: EdgeInsets.zero, margin: EdgeInsets.zero,
@ -30,21 +41,21 @@ class SliderView extends StatelessWidget {
children: [ children: [
mFlex(3), mFlex(3),
Container( Container(
decoration: containerColorRadiusRight(Color(0xFFFBF2E31), 100), decoration: projectViewModel.isArabic ? containerColorRadiusLeft(Color(0xFFFBF2E31), 100) : containerColorRadiusRight(Color(0xFFFBF2E31), 100),
padding: EdgeInsets.only(left: 20, right: 16, top: 6, bottom: 6), padding: EdgeInsets.only(left: projectViewModel.isArabic ?16:20, right: projectViewModel.isArabic ?20:16, top: 6, bottom: 6),
child: Text( child: Text(
"Medical File", TranslationBase.of(context).medicalFile,
style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 13), style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 13),
), ),
), ),
mFlex(2), mFlex(2),
Padding( Padding(
padding: const EdgeInsets.only(left: 20), padding: const EdgeInsets.only(left: 20,right: 20),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text( Text(
"Cant see your medical File?", TranslationBase.of(context).cantSeeProfile,
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
@ -52,7 +63,7 @@ class SliderView extends StatelessWidget {
), ),
), ),
Text( Text(
"Login or Register Now", TranslationBase.of(context).loginRegisterNow,
style: TextStyle(color: Colors.white, fontSize: 14), style: TextStyle(color: Colors.white, fontSize: 14),
), ),
], ],
@ -60,19 +71,25 @@ class SliderView extends StatelessWidget {
), ),
mFlex(2), mFlex(2),
Padding( Padding(
padding: const EdgeInsets.only(left: 20), padding: const EdgeInsets.only(left: 20,right: 20),
child: Container( child: Container(
height: MediaQuery.of(context).size.width / 14, height: MediaQuery.of(context).size.width / 14,
width: MediaQuery.of(context).size.width / 6, width: MediaQuery.of(context).size.width /(projectViewModel.isArabic?4: 6),
child: RaisedButton( child: RaisedButton(
shape: cardRadius(8), shape: cardRadius(8),
color: Color(0xFFFBF2E31), color: Color(0xFFFBF2E31),
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
onPressed: () {}, onPressed: () {
child: Text( onLoginClick();
"Login", },
child: Center(
child: AutoSizeText(
TranslationBase.of(context).login,
maxLines: 1,
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
fontSize: 14
),
), ),
), ),
), ),

@ -1,6 +1,7 @@
import 'dart:math'; import 'dart:math';
import 'package:badges/badges.dart'; import 'package:badges/badges.dart';
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/service/medical/vital_sign_service.dart'; import 'package:diplomaticquarterapp/core/service/medical/vital_sign_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/medical_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/medical_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
@ -61,11 +62,7 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectViewModel = Provider.of(context); projectViewModel = Provider.of(context);
var appoCountProvider = Provider.of<ToDoCountProviderModel>(context); var appoCountProvider = Provider.of<ToDoCountProviderModel>(context);
List<Widget> myMedicalList = Utils.myMedicalList( List<Widget> myMedicalList = Utils.myMedicalList(projectViewModel: projectViewModel, context: context, count: appoCountProvider.count, isLogin: projectViewModel.isLogin);
projectViewModel: projectViewModel,
context: context,
count: appoCountProvider.count,
isLogin: projectViewModel.isLogin);
return BaseView<MedicalViewModel>( return BaseView<MedicalViewModel>(
onModelReady: (model) => model.getAppointmentHistory(), onModelReady: (model) => model.getAppointmentHistory(),
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
@ -79,6 +76,7 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
Stack( Stack(
children: <Widget>[ children: <Widget>[
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Container( Container(
width: double.infinity, width: double.infinity,
@ -93,14 +91,11 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
), ),
if (model.isLogin) if (model.isLogin)
ListView.builder( ListView.builder(
itemBuilder: (context, index) => itemBuilder: (context, index) => TimeLineWidget(
TimeLineWidget(
isUp: index % 2 == 1, isUp: index % 2 == 1,
appoitmentAllHistoryResul: model appoitmentAllHistoryResul: model.appoitmentAllHistoryResultList[index],
.appoitmentAllHistoryResultList[index],
), ),
itemCount: model itemCount: model.appoitmentAllHistoryResultList.length,
.appoitmentAllHistoryResultList.length,
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
reverse: projectViewModel.isArabic, reverse: projectViewModel.isArabic,
), ),
@ -108,28 +103,54 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
), ),
), ),
SizedBox( SizedBox(
height: 50, height: 20,
), ),
Padding( Padding(
padding: EdgeInsets.symmetric(vertical: 5.0), padding: EdgeInsets.only(left: 12, right: 12),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
projectViewModel.isLogin
? Text(
projectViewModel?.user?.firstNameN ?? "",
style: TextStyle(color: Colors.black, fontSize: SizeConfig.textMultiplier * 1.8),
)
: Container(),
Text(
TranslationBase.of(context).medicalFile,
style: TextStyle(color: Colors.black, fontSize: SizeConfig.textMultiplier * 3),
),
],
),
),
SizedBox(
height: 20,
),
Padding(
padding: EdgeInsets.only(left: 12, right: 12),
child: GridView.builder( child: GridView.builder(
shrinkWrap: true, shrinkWrap: true,
primary: false, primary: false,
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
gridDelegate: // gridDelegate:
SliverGridDelegateWithFixedCrossAxisCount( // SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 3, // crossAxisCount: 3,
childAspectRatio: MediaQuery.of(context) // childAspectRatio: MediaQuery.of(context)
.size // .size
.width / // .width /
(MediaQuery.of(context).size.height / 2.20), // (MediaQuery.of(context).size.height / 2.20),
), // ),
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12),
padding: EdgeInsets.zero,
itemCount: myMedicalList.length, itemCount: myMedicalList.length,
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
return myMedicalList[index]; return myMedicalList[index];
}, },
), ),
) ),
SizedBox(
height: 12,
),
], ],
), ),
SizedBox( SizedBox(
@ -146,14 +167,9 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.grey[500], color: Colors.grey[500],
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
border: Border.all( border: Border.all(color: Colors.transparent, width: 0.5),
color: Colors.transparent, width: 0.5), borderRadius: BorderRadius.all(Radius.circular(9)),
borderRadius: image: DecorationImage(image: ExactAssetImage('assets/images/bg_graphic.png'), fit: BoxFit.cover)),
BorderRadius.all(Radius.circular(9)),
image: DecorationImage(
image: ExactAssetImage(
'assets/images/bg_graphic.png'),
fit: BoxFit.cover)),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisAlignment: MainAxisAlignment.spaceAround,
@ -162,9 +178,7 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
height: 8, height: 8,
), ),
Texts( Texts(
model.user.firstName + model.user.firstName + " " + model.user.lastName,
" " +
model.user.lastName,
color: Colors.white, color: Colors.white,
bold: true, bold: true,
), ),

@ -0,0 +1,164 @@
import 'dart:math';
import 'package:badges/badges.dart';
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/service/medical/vital_sign_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/medical_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/MyAppointments.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_approval_screen.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_card_screen.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart';
import 'package:diplomaticquarterapp/pages/medical/patient_sick_leave_page.dart';
import 'package:diplomaticquarterapp/pages/medical/reports/monthly_reports.dart';
import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/smart_watch_instructions.dart';
import 'package:diplomaticquarterapp/pages/vaccine/my_vaccines_screen.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/radiology/radiology_home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_screen.dart';
import 'package:diplomaticquarterapp/pages/medical/reports/report_home_page.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/time_line_new_widget.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/time_line_widget.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/alert_dialog.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/others/sliver_app_bar_delegate.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_card_screen.dart';
import 'package:provider/provider.dart';
import '../../locator.dart';
import '../../uitl/gif_loader_dialog_utils.dart';
import 'active_medications/ActiveMedicationsPage.dart';
import 'allergies_page.dart';
import 'ask_doctor/ask_doctor_home_page.dart';
import 'balance/my_balance_page.dart';
import 'doctor/doctor_home_page.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_approval_screen.dart';
import 'eye/EyeHomePage.dart';
import 'eye/EyeMeasurementsPage.dart';
import 'labs/labs_home_page.dart';
import 'my_trackers/my_trackers.dart';
class MedicalProfilePageNew extends StatefulWidget {
@override
_MedicalProfilePageState createState() => _MedicalProfilePageState();
}
class _MedicalProfilePageState extends State<MedicalProfilePageNew> {
var authProvider = new AuthProvider();
List<Medical> medical = List();
ProjectViewModel projectViewModel;
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
var appoCountProvider = Provider.of<ToDoCountProviderModel>(context);
List<Widget> myMedicalList = Utils.myMedicalList(projectViewModel: projectViewModel, context: context, count: appoCountProvider.count, isLogin: projectViewModel.isLogin);
return BaseView<MedicalViewModel>(
onModelReady: (model) => model.getAppointmentHistory(),
builder: (_, model, widget) => AppScaffold(
isShowDecPage: false,
baseViewModel: model,
isHelp: true,
body: Container(
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
width: double.infinity,
height: 210,
decoration: containerBottomRightRadiusWithGradientBorder(0, darkColor: Color(0xFFF2B353E), lightColor: Color(0xFFF2B353E)),
child: Stack(
children: <Widget>[
if (model.isLogin)
ListView.builder(
itemBuilder: (context, index) => TimeLineWidget(
isUp: index % 2 == 1,
appoitmentAllHistoryResul: model.appoitmentAllHistoryResultList[index],
),
itemCount: model.appoitmentAllHistoryResultList.length,
scrollDirection: Axis.horizontal,
reverse: projectViewModel.isArabic,
),
],
),
),
TimeLineView(model.isLogin, projectViewModel.isArabic, model.appoitmentAllHistoryResultList),
SizedBox(
height: 20,
),
Padding(
padding: EdgeInsets.only(left: 12, right: 12),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
projectViewModel.isLogin
? Text(
projectViewModel?.user?.firstName ?? "",
style: TextStyle(color: Colors.black, fontSize: SizeConfig.textMultiplier * 1.8),
)
: Container(),
Text(
TranslationBase.of(context).medicalFile,
style: TextStyle(color: Colors.black, fontSize: SizeConfig.textMultiplier * 3),
),
],
),
),
SizedBox(
height: 20,
),
Padding(
padding: EdgeInsets.only(left: 12, right: 12),
child: GridView.builder(
shrinkWrap: true,
primary: false,
physics: NeverScrollableScrollPhysics(),
// gridDelegate:
// SliverGridDelegateWithFixedCrossAxisCount(
// crossAxisCount: 3,
// childAspectRatio: MediaQuery.of(context)
// .size
// .width /
// (MediaQuery.of(context).size.height / 2.20),
// ),
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12),
padding: EdgeInsets.zero,
itemCount: myMedicalList.length,
itemBuilder: (BuildContext context, int index) {
return myMedicalList[index];
},
),
),
SizedBox(
height: 12,
),
],
),
),
),
),
);
}
}
class Medical {
final String title;
final String imagePath;
final String subTitle;
final Widget page;
Medical({this.title, this.imagePath, this.subTitle, this.page});
}

@ -568,6 +568,8 @@ class DoctorsListService extends BaseService {
return Future.value(localRes); return Future.value(localRes);
} }
Future<Map> getPatientAppointmentCurfewHistory( Future<Map> getPatientAppointmentCurfewHistory(
bool isActiveAppointment) async { bool isActiveAppointment) async {
Map<String, dynamic> request; Map<String, dynamic> request;

@ -5,6 +5,7 @@ class CustomColors {
static const Color purple = Color(0xFF6002EE); static const Color purple = Color(0xFF6002EE);
static const Color deepPurple = Color(0xFF3900B1); static const Color deepPurple = Color(0xFF3900B1);
static const Color grey = Color(0xFF848484); static const Color grey = Color(0xFF848484);
static const Color grey2 = Color(0xFFA5A5A5);
static const Color darkGrey = Color(0xFF222222); static const Color darkGrey = Color(0xFF222222);
static const Color black = Color(0xFF141414); static const Color black = Color(0xFF141414);
static const Color white = Color(0xFFFFFFFF); static const Color white = Color(0xFFFFFFFF);

@ -308,6 +308,26 @@ class DateUtil {
return ""; return "";
} }
/// get data formatted like 26/4/2020
static String getDayMonthYearLangDateFormatted(
DateTime dateTime, String lang) {
if (dateTime != null)
return lang == 'en'
? dateTime.day.toString() +
" " +
getMonth(dateTime.month) +
" " +
dateTime.year.toString()
: dateTime.day.toString() +
" " +
getMonthArabic(dateTime.month) +
" " +
dateTime.year.toString();
else
return "";
}
/// get data formatted like 26/4/2020 /// get data formatted like 26/4/2020
/// [dateTime] convert DateTime to data formatted /// [dateTime] convert DateTime to data formatted
static String getDayMonthYearDateFormatted(DateTime dateTime) { static String getDayMonthYearDateFormatted(DateTime dateTime) {

File diff suppressed because it is too large Load Diff

@ -61,10 +61,8 @@ class Utils {
/// Check The Internet Connection /// Check The Internet Connection
static Future<bool> checkConnection() async { static Future<bool> checkConnection() async {
ConnectivityResult connectivityResult = ConnectivityResult connectivityResult = await (Connectivity().checkConnectivity());
await (Connectivity().checkConnectivity()); if ((connectivityResult == ConnectivityResult.mobile) || (connectivityResult == ConnectivityResult.wifi)) {
if ((connectivityResult == ConnectivityResult.mobile) ||
(connectivityResult == ConnectivityResult.wifi)) {
return true; return true;
} else { } else {
return false; return false;
@ -128,19 +126,11 @@ class Utils {
} }
static String getAppointmentTransID(int projectID, int clinicID, int appoNo) { static String getAppointmentTransID(int projectID, int clinicID, int appoNo) {
return projectID.toString() + return projectID.toString() + '-' + clinicID.toString() + '-' + appoNo.toString();
'-' +
clinicID.toString() +
'-' +
appoNo.toString();
} }
static String getAdvancePaymentTransID(int projectID, int fileNumber) { static String getAdvancePaymentTransID(int projectID, int fileNumber) {
return projectID.toString() + return projectID.toString() + '-' + fileNumber.toString() + '-' + DateTime.now().millisecondsSinceEpoch.toString();
'-' +
fileNumber.toString() +
'-' +
DateTime.now().millisecondsSinceEpoch.toString();
} }
bool validateIDBox(String value, type) { bool validateIDBox(String value, type) {
@ -198,32 +188,29 @@ class Utils {
} }
static validEmail(email) { static validEmail(email) {
return RegExp( return RegExp(r"^[a-zA-Z0-9.a-zA-Z0-9.!#$%&'*+-/=?^_`{|}~]+@[a-zA-Z0-9]+\.[a-zA-Z]+").hasMatch(email);
r"^[a-zA-Z0-9.a-zA-Z0-9.!#$%&'*+-/=?^_`{|}~]+@[a-zA-Z0-9]+\.[a-zA-Z]+")
.hasMatch(email);
} }
static List<Widget> myMedicalList( static List<Widget> myMedicalList({ProjectViewModel projectViewModel, BuildContext context, bool isLogin, count}) {
{ProjectViewModel projectViewModel,
BuildContext context,
bool isLogin,
count}) {
List<Widget> medical = List(); List<Widget> medical = List();
medical.add(InkWell( medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(5) onTap: () => projectViewModel.havePrivilege(5) ? Navigator.push(context, FadePage(page: MyAppointments())) : null,
? Navigator.push(context, FadePage(page: MyAppointments()))
: null,
child: isLogin child: isLogin
? Stack(children: [ ? Stack(children: [
MedicalProfileItem( Container(
width: double.infinity,
height: double.infinity,
child: MedicalProfileItem(
title: TranslationBase.of(context).myAppointments, title: TranslationBase.of(context).myAppointments,
imagePath: 'my_appointment_icon.png', imagePath: 'appointment_list.svg',
subTitle: TranslationBase.of(context).myAppointmentsList, subTitle: TranslationBase.of(context).myAppointmentsList,
hasBadge: true, hasBadge: true,
isEnable: projectViewModel.havePrivilege(5)), isEnable: projectViewModel.havePrivilege(5)),
),
Positioned( Positioned(
right: 0.0, right: 8,
top: 4,
child: Badge( child: Badge(
toAnimate: false, toAnimate: false,
position: BadgePosition.topEnd(), position: BadgePosition.topEnd(),
@ -232,15 +219,14 @@ class Utils {
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8),
badgeContent: Container( badgeContent: Container(
padding: EdgeInsets.all(2.0), padding: EdgeInsets.all(2.0),
child: Text(count.toString(), child: Text(count.toString(), style: TextStyle(color: Colors.white, fontSize: 16.0)),
style: TextStyle(color: Colors.white, fontSize: 16.0)),
), ),
), ),
), ),
]) ])
: MedicalProfileItem( : MedicalProfileItem(
title: TranslationBase.of(context).myAppointments, title: TranslationBase.of(context).myAppointments,
imagePath: 'my_appointment_icon.png', imagePath: 'appointment_list.svg',
subTitle: TranslationBase.of(context).myAppointmentsList, subTitle: TranslationBase.of(context).myAppointmentsList,
hasBadge: true, hasBadge: true,
isEnable: projectViewModel.havePrivilege(5), isEnable: projectViewModel.havePrivilege(5),
@ -252,31 +238,27 @@ class Utils {
onTap: () => Navigator.push(context, FadePage(page: LabsHomePage())), onTap: () => Navigator.push(context, FadePage(page: LabsHomePage())),
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).lab, title: TranslationBase.of(context).lab,
imagePath: 'lab_result_icon.png', imagePath: 'lab_result.svg',
subTitle: TranslationBase.of(context).labSubtitle, subTitle: TranslationBase.of(context).labSubtitle,
), ),
)); ));
} }
medical.add(InkWell( medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(7) onTap: () => projectViewModel.havePrivilege(7) ? Navigator.push(context, FadePage(page: RadiologyHomePage())) : null,
? Navigator.push(context, FadePage(page: RadiologyHomePage()))
: null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).radiology, title: TranslationBase.of(context).radiology,
imagePath: 'radiology_icon.png', imagePath: 'radiology.svg',
subTitle: TranslationBase.of(context).radiologySubtitle, subTitle: TranslationBase.of(context).radiologySubtitle,
isEnable: projectViewModel.havePrivilege(7), isEnable: projectViewModel.havePrivilege(7),
), ),
)); ));
medical.add(InkWell( medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(12) onTap: () => projectViewModel.havePrivilege(12) ? Navigator.push(context, FadePage(page: HomePrescriptionsPage())) : null,
? Navigator.push(context, FadePage(page: HomePrescriptionsPage()))
: null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).medicines, title: TranslationBase.of(context).medicines,
imagePath: 'prescription_icon.png', imagePath: 'medicine_prescription.svg',
subTitle: TranslationBase.of(context).medicinesSubtitle, subTitle: TranslationBase.of(context).medicinesSubtitle,
isEnable: projectViewModel.havePrivilege(12), isEnable: projectViewModel.havePrivilege(12),
), ),
@ -291,19 +273,17 @@ class Utils {
: null, : null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).vitalSigns, title: TranslationBase.of(context).vitalSigns,
imagePath: 'vital_signs.png', imagePath: 'vital_signs.svg',
subTitle: TranslationBase.of(context).vitalSignsSubtitle, subTitle: TranslationBase.of(context).vitalSignsSubtitle,
isEnable: projectViewModel.havePrivilege(25), isEnable: projectViewModel.havePrivilege(25),
), ),
)); ));
medical.add(InkWell( medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(48) onTap: () => projectViewModel.havePrivilege(48) ? Navigator.push(context, FadePage(page: ActiveMedicationsPage())) : null,
? Navigator.push(context, FadePage(page: ActiveMedicationsPage()))
: null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).myMedical, title: TranslationBase.of(context).myMedical,
imagePath: 'active_medications.png', imagePath: 'active_medication.svg',
subTitle: TranslationBase.of(context).myMedicalSubtitle, subTitle: TranslationBase.of(context).myMedicalSubtitle,
isEnable: false, isEnable: false,
), ),
@ -318,32 +298,25 @@ class Utils {
), ),
) )
: null, : null,
child: MedicalProfileItem( child:
title: TranslationBase.of(context).myDoctor, MedicalProfileItem(title: TranslationBase.of(context).myDoctor, imagePath: 'my_doc.svg', subTitle: TranslationBase.of(context).myDoctorSubtitle, isEnable: projectViewModel.havePrivilege(6)),
imagePath: 'doctor_icon.png',
subTitle: TranslationBase.of(context).myDoctorSubtitle,
isEnable: projectViewModel.havePrivilege(6)),
)); ));
medical.add(InkWell( medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(14) onTap: () => projectViewModel.havePrivilege(14) ? Navigator.push(context, FadePage(page: EyeMeasurementsPage())) : null,
? Navigator.push(context, FadePage(page: EyeMeasurementsPage()))
: null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).eye, title: TranslationBase.of(context).eye,
imagePath: 'eye_measurement_icon.png', imagePath: 'eye_measurement.svg',
subTitle: TranslationBase.of(context).eyeSubtitle, subTitle: TranslationBase.of(context).eyeSubtitle,
isEnable: projectViewModel.havePrivilege(14), isEnable: projectViewModel.havePrivilege(14),
), ),
)); ));
medical.add(InkWell( medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(22) onTap: () => projectViewModel.havePrivilege(22) ? Navigator.push(context, FadePage(page: InsuranceCard())) : null,
? Navigator.push(context, FadePage(page: InsuranceCard()))
: null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).insurance, title: TranslationBase.of(context).insurance,
imagePath: 'insurance_card_icon.png', imagePath: 'insurance_card.svg',
subTitle: TranslationBase.of(context).insuranceSubtitle, subTitle: TranslationBase.of(context).insuranceSubtitle,
isEnable: projectViewModel.havePrivilege(22), isEnable: projectViewModel.havePrivilege(22),
), ),
@ -355,90 +328,76 @@ class Utils {
}, },
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).updateInsurance, title: TranslationBase.of(context).updateInsurance,
imagePath: 'insurance_update_icon_.png', imagePath: 'insurance_card.svg',
subTitle: TranslationBase.of(context).updateInsuranceSubtitle, subTitle: TranslationBase.of(context).updateInsuranceSubtitle,
), ),
)); ));
medical.add(InkWell( medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(18) onTap: () => projectViewModel.havePrivilege(18) ? Navigator.push(context, FadePage(page: InsuranceApproval())) : null,
? Navigator.push(context, FadePage(page: InsuranceApproval()))
: null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).insuranceApproval, title: TranslationBase.of(context).insuranceApproval,
imagePath: 'insurance_approvals_icon.png', imagePath: 'insurance_approval.svg',
subTitle: TranslationBase.of(context).insuranceApprovalSubtitle, subTitle: TranslationBase.of(context).insuranceApprovalSubtitle,
isEnable: projectViewModel.havePrivilege(18), isEnable: projectViewModel.havePrivilege(18),
), ),
)); ));
medical.add(InkWell( medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(23) onTap: () => projectViewModel.havePrivilege(23) ? Navigator.push(context, FadePage(page: AllergiesPage())) : null,
? Navigator.push(context, FadePage(page: AllergiesPage()))
: null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).allergies, title: TranslationBase.of(context).allergies,
imagePath: 'my_allergies_icon.png', imagePath: 'allergies_diagnosed.svg',
subTitle: TranslationBase.of(context).allergiesSubtitle, subTitle: TranslationBase.of(context).allergiesSubtitle,
isEnable: projectViewModel.havePrivilege(23), isEnable: projectViewModel.havePrivilege(23),
), ),
)); ));
medical.add(InkWell( medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(26) onTap: () => projectViewModel.havePrivilege(26) ? Navigator.push(context, FadePage(page: MyVaccines())) : null,
? Navigator.push(context, FadePage(page: MyVaccines()))
: null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).myVaccines, title: TranslationBase.of(context).myVaccines,
imagePath: 'my_vaccines_icon.png', imagePath: 'vaccine_list.svg',
subTitle: TranslationBase.of(context).myVaccinesSubtitle, subTitle: TranslationBase.of(context).myVaccinesSubtitle,
isEnable: projectViewModel.havePrivilege(26), isEnable: projectViewModel.havePrivilege(26),
), ),
)); ));
medical.add(InkWell( medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(20) onTap: () => projectViewModel.havePrivilege(20) ? Navigator.push(context, FadePage(page: HomeReportPage())) : null,
? Navigator.push(context, FadePage(page: HomeReportPage()))
: null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).medical, title: TranslationBase.of(context).medical,
imagePath: 'medical_reports_icon.png', imagePath: 'medical_report.svg',
subTitle: TranslationBase.of(context).medicalSubtitle, subTitle: TranslationBase.of(context).medicalSubtitle,
isEnable: projectViewModel.havePrivilege(20), isEnable: projectViewModel.havePrivilege(20),
), ),
)); ));
medical.add(InkWell( medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(19) onTap: () => projectViewModel.havePrivilege(19) ? Navigator.push(context, FadePage(page: MonthlyReportsPage())) : null,
? Navigator.push(context, FadePage(page: MonthlyReportsPage()))
: null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).monthly, title: TranslationBase.of(context).monthly,
imagePath: 'monthly_reports_icon.png', imagePath: 'monthly_report.svg',
subTitle: TranslationBase.of(context).monthlySubtitle, subTitle: TranslationBase.of(context).monthlySubtitle,
isEnable: projectViewModel.havePrivilege(19), isEnable: projectViewModel.havePrivilege(19),
), ),
)); ));
medical.add(InkWell( medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(16) onTap: () => projectViewModel.havePrivilege(16) ? Navigator.push(context, FadePage(page: PatientSickLeavePage())) : null,
? Navigator.push(context, FadePage(page: PatientSickLeavePage()))
: null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).sick, title: TranslationBase.of(context).sick,
imagePath: 'sick_leaves_icons.png', imagePath: 'sick_leave.svg',
subTitle: TranslationBase.of(context).sickSubtitle, subTitle: TranslationBase.of(context).sickSubtitle,
isEnable: projectViewModel.havePrivilege(16), isEnable: projectViewModel.havePrivilege(16),
), ),
)); ));
medical.add(InkWell( medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(47) onTap: () => projectViewModel.havePrivilege(47) ? Navigator.push(context, FadePage(page: MyBalancePage())) : null,
? Navigator.push(context, FadePage(page: MyBalancePage()))
: null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).myBalance, title: TranslationBase.of(context).myBalance,
imagePath: 'check-in.png', imagePath: 'balance_credit.svg',
subTitle: TranslationBase.of(context).myBalanceSubtitle, subTitle: TranslationBase.of(context).myBalanceSubtitle,
isEnable: projectViewModel.havePrivilege(47), isEnable: projectViewModel.havePrivilege(47),
), ),
@ -452,38 +411,29 @@ class Utils {
)); ));
medical.add(InkWell( medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(24) onTap: () => projectViewModel.havePrivilege(24) ? Navigator.push(context, FadePage(page: MyTrackers())) : null,
? Navigator.push(context, FadePage(page: MyTrackers()))
: null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).myTrackers, title: TranslationBase.of(context).myTrackers,
imagePath: 'my_tracker_icon.png', imagePath: 'tracker.svg',
subTitle: TranslationBase.of(context).myTrackersSubtitle, subTitle: TranslationBase.of(context).myTrackersSubtitle,
isEnable: projectViewModel.havePrivilege(24), isEnable: projectViewModel.havePrivilege(24),
), ),
)); ));
medical.add(InkWell( medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(30) onTap: () => projectViewModel.havePrivilege(30) ? Navigator.push(context, FadePage(page: SmartWatchInstructions())) : null,
? Navigator.push(context, FadePage(page: SmartWatchInstructions()))
: null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).smartWatches, title: TranslationBase.of(context).smartWatches,
imagePath: 'smartwatch_icon.png', imagePath: 'smart_watch.svg',
subTitle: TranslationBase.of(context).smartWatchesSubtitle, subTitle: TranslationBase.of(context).smartWatchesSubtitle,
isEnable: projectViewModel.havePrivilege(30), isEnable: projectViewModel.havePrivilege(30),
), ),
)); ));
medical.add(InkWell( medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(28) onTap: () => projectViewModel.havePrivilege(28) ? Navigator.push(context, FadePage(page: AskDoctorHomPage())) : null,
? Navigator.push(context, FadePage(page: AskDoctorHomPage()))
: null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).askYour, title: TranslationBase.of(context).askYour, imagePath: 'ask_doctor.svg', subTitle: TranslationBase.of(context).askYourSubtitle, isEnable: projectViewModel.havePrivilege(28)),
imagePath: 'ask_doctor_icon.png',
subTitle: TranslationBase.of(context).askYourSubtitle,
isEnable: projectViewModel.havePrivilege(28)),
)); ));
if (projectViewModel.havePrivilege(32) || true) { if (projectViewModel.havePrivilege(32) || true) {
@ -493,15 +443,11 @@ class Utils {
if (projectViewModel.isLogin && userData_ != null) { if (projectViewModel.isLogin && userData_ != null) {
String patientID = userData_.patientID.toString(); String patientID = userData_.patientID.toString();
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
projectViewModel projectViewModel.platformBridge().connectHMGInternetWifi(patientID).then((value) => {GifLoaderDialogUtils.hideDialog(context)});
.platformBridge()
.connectHMGInternetWifi(patientID)
.then((value) => {GifLoaderDialogUtils.hideDialog(context)});
} else { } else {
AlertDialogBox( AlertDialogBox(
context: context, context: context,
confirmMessage: confirmMessage: "Please login with your account first to use this feature",
"Please login with your account first to use this feature",
okText: "OK", okText: "OK",
okFunction: () { okFunction: () {
AlertDialogBox.closeAlertDialog(context); AlertDialogBox.closeAlertDialog(context);
@ -511,19 +457,17 @@ class Utils {
}, },
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).internet, title: TranslationBase.of(context).internet,
imagePath: 'insurance_card_icon.png', imagePath: 'internet_connection.svg',
subTitle: TranslationBase.of(context).internetSubtitle, subTitle: TranslationBase.of(context).internetSubtitle,
), ),
)); ));
} }
medical.add(InkWell( medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(40) onTap: () => projectViewModel.havePrivilege(40) ? launch('whatsapp://send?phone=18885521858&text=') : null,
? launch('whatsapp://send?phone=18885521858&text=')
: null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).chatbot, title: TranslationBase.of(context).chatbot,
imagePath: 'insurance_approvals_icon.png', imagePath: 'chatbot.svg',
subTitle: TranslationBase.of(context).chatbotSubtitle, subTitle: TranslationBase.of(context).chatbotSubtitle,
isEnable: projectViewModel.havePrivilege(40), isEnable: projectViewModel.havePrivilege(40),
), ),
@ -532,18 +476,11 @@ class Utils {
return medical; return medical;
} }
static List<Widget> myMedicalListHomePage({ProjectViewModel projectViewModel, BuildContext context, bool isLogin, count}) {
static List<Widget> myMedicalListHomePage(
{ProjectViewModel projectViewModel,
BuildContext context,
bool isLogin,
count}) {
List<Widget> medical = List(); List<Widget> medical = List();
medical.add(InkWell( medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(5) onTap: () => projectViewModel.havePrivilege(5) ? Navigator.push(context, FadePage(page: MyAppointments())) : null,
? Navigator.push(context, FadePage(page: MyAppointments()))
: null,
child: isLogin child: isLogin
? Stack(children: [ ? Stack(children: [
MedicalProfileItem( MedicalProfileItem(
@ -552,7 +489,24 @@ class Utils {
subTitle: TranslationBase.of(context).myAppointmentsList, subTitle: TranslationBase.of(context).myAppointmentsList,
hasBadge: true, hasBadge: true,
isEnable: projectViewModel.havePrivilege(5)), isEnable: projectViewModel.havePrivilege(5)),
Positioned( projectViewModel.isArabic
? Positioned(
left: 8,
top: 4,
child: Badge(
toAnimate: false,
elevation: 0,
position: BadgePosition.topEnd(),
shape: BadgeShape.circle,
badgeColor: secondaryColor.withOpacity(1.0),
borderRadius: BorderRadius.circular(8),
badgeContent: Container(
padding: EdgeInsets.all(2.0),
child: Text(count.toString(), style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 12.0)),
),
),
)
: Positioned(
right: 8, right: 8,
top: 4, top: 4,
child: Badge( child: Badge(
@ -564,8 +518,7 @@ class Utils {
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8),
badgeContent: Container( badgeContent: Container(
padding: EdgeInsets.all(2.0), padding: EdgeInsets.all(2.0),
child: Text(count.toString(), child: Text(count.toString(), style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 12.0)),
style: TextStyle(color: Colors.white, fontWeight:FontWeight.bold,fontSize: 12.0)),
), ),
), ),
), ),
@ -591,9 +544,7 @@ class Utils {
} }
medical.add(InkWell( medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(7) onTap: () => projectViewModel.havePrivilege(7) ? Navigator.push(context, FadePage(page: RadiologyHomePage())) : null,
? Navigator.push(context, FadePage(page: RadiologyHomePage()))
: null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).radiology, title: TranslationBase.of(context).radiology,
imagePath: 'radiology.svg', imagePath: 'radiology.svg',
@ -611,18 +562,12 @@ class Utils {
), ),
) )
: null, : null,
child: MedicalProfileItem( child:
title: TranslationBase.of(context).myDoctor, MedicalProfileItem(title: TranslationBase.of(context).myDoctor, imagePath: 'my_doc.svg', subTitle: TranslationBase.of(context).myDoctorSubtitle, isEnable: projectViewModel.havePrivilege(6)),
imagePath: 'my_doc.svg',
subTitle: TranslationBase.of(context).myDoctorSubtitle,
isEnable: projectViewModel.havePrivilege(6)),
)); ));
medical.add(InkWell( medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(12) onTap: () => projectViewModel.havePrivilege(12) ? Navigator.push(context, FadePage(page: HomePrescriptionsPage())) : null,
? Navigator.push(context, FadePage(page: HomePrescriptionsPage()))
: null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).medicines, title: TranslationBase.of(context).medicines,
imagePath: 'prescription_icon.png', imagePath: 'prescription_icon.png',
@ -647,9 +592,7 @@ class Utils {
)); ));
medical.add(InkWell( medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(48) onTap: () => projectViewModel.havePrivilege(48) ? Navigator.push(context, FadePage(page: ActiveMedicationsPage())) : null,
? Navigator.push(context, FadePage(page: ActiveMedicationsPage()))
: null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).myMedical, title: TranslationBase.of(context).myMedical,
imagePath: 'active_medications.png', imagePath: 'active_medications.png',
@ -658,12 +601,8 @@ class Utils {
), ),
)); ));
medical.add(InkWell( medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(14) onTap: () => projectViewModel.havePrivilege(14) ? Navigator.push(context, FadePage(page: EyeMeasurementsPage())) : null,
? Navigator.push(context, FadePage(page: EyeMeasurementsPage()))
: null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).eye, title: TranslationBase.of(context).eye,
imagePath: 'eye_measurement_icon.png', imagePath: 'eye_measurement_icon.png',
@ -673,9 +612,7 @@ class Utils {
)); ));
medical.add(InkWell( medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(22) onTap: () => projectViewModel.havePrivilege(22) ? Navigator.push(context, FadePage(page: InsuranceCard())) : null,
? Navigator.push(context, FadePage(page: InsuranceCard()))
: null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).insurance, title: TranslationBase.of(context).insurance,
imagePath: 'insurance_card_icon.png', imagePath: 'insurance_card_icon.png',
@ -696,9 +633,7 @@ class Utils {
)); ));
medical.add(InkWell( medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(18) onTap: () => projectViewModel.havePrivilege(18) ? Navigator.push(context, FadePage(page: InsuranceApproval())) : null,
? Navigator.push(context, FadePage(page: InsuranceApproval()))
: null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).insuranceApproval, title: TranslationBase.of(context).insuranceApproval,
imagePath: 'insurance_approvals_icon.png', imagePath: 'insurance_approvals_icon.png',
@ -708,9 +643,7 @@ class Utils {
)); ));
medical.add(InkWell( medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(23) onTap: () => projectViewModel.havePrivilege(23) ? Navigator.push(context, FadePage(page: AllergiesPage())) : null,
? Navigator.push(context, FadePage(page: AllergiesPage()))
: null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).allergies, title: TranslationBase.of(context).allergies,
imagePath: 'my_allergies_icon.png', imagePath: 'my_allergies_icon.png',
@ -720,9 +653,7 @@ class Utils {
)); ));
medical.add(InkWell( medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(26) onTap: () => projectViewModel.havePrivilege(26) ? Navigator.push(context, FadePage(page: MyVaccines())) : null,
? Navigator.push(context, FadePage(page: MyVaccines()))
: null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).myVaccines, title: TranslationBase.of(context).myVaccines,
imagePath: 'my_vaccines_icon.png', imagePath: 'my_vaccines_icon.png',
@ -732,9 +663,7 @@ class Utils {
)); ));
medical.add(InkWell( medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(20) onTap: () => projectViewModel.havePrivilege(20) ? Navigator.push(context, FadePage(page: HomeReportPage())) : null,
? Navigator.push(context, FadePage(page: HomeReportPage()))
: null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).medical, title: TranslationBase.of(context).medical,
imagePath: 'medical_reports_icon.png', imagePath: 'medical_reports_icon.png',
@ -744,9 +673,7 @@ class Utils {
)); ));
medical.add(InkWell( medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(19) onTap: () => projectViewModel.havePrivilege(19) ? Navigator.push(context, FadePage(page: MonthlyReportsPage())) : null,
? Navigator.push(context, FadePage(page: MonthlyReportsPage()))
: null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).monthly, title: TranslationBase.of(context).monthly,
imagePath: 'monthly_reports_icon.png', imagePath: 'monthly_reports_icon.png',
@ -756,9 +683,7 @@ class Utils {
)); ));
medical.add(InkWell( medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(16) onTap: () => projectViewModel.havePrivilege(16) ? Navigator.push(context, FadePage(page: PatientSickLeavePage())) : null,
? Navigator.push(context, FadePage(page: PatientSickLeavePage()))
: null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).sick, title: TranslationBase.of(context).sick,
imagePath: 'sick_leaves_icons.png', imagePath: 'sick_leaves_icons.png',
@ -768,9 +693,7 @@ class Utils {
)); ));
medical.add(InkWell( medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(47) onTap: () => projectViewModel.havePrivilege(47) ? Navigator.push(context, FadePage(page: MyBalancePage())) : null,
? Navigator.push(context, FadePage(page: MyBalancePage()))
: null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).myBalance, title: TranslationBase.of(context).myBalance,
imagePath: 'check-in.png', imagePath: 'check-in.png',
@ -787,9 +710,7 @@ class Utils {
)); ));
medical.add(InkWell( medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(24) onTap: () => projectViewModel.havePrivilege(24) ? Navigator.push(context, FadePage(page: MyTrackers())) : null,
? Navigator.push(context, FadePage(page: MyTrackers()))
: null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).myTrackers, title: TranslationBase.of(context).myTrackers,
imagePath: 'my_tracker_icon.png', imagePath: 'my_tracker_icon.png',
@ -799,9 +720,7 @@ class Utils {
)); ));
medical.add(InkWell( medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(30) onTap: () => projectViewModel.havePrivilege(30) ? Navigator.push(context, FadePage(page: SmartWatchInstructions())) : null,
? Navigator.push(context, FadePage(page: SmartWatchInstructions()))
: null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).smartWatches, title: TranslationBase.of(context).smartWatches,
imagePath: 'smartwatch_icon.png', imagePath: 'smartwatch_icon.png',
@ -811,14 +730,9 @@ class Utils {
)); ));
medical.add(InkWell( medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(28) onTap: () => projectViewModel.havePrivilege(28) ? Navigator.push(context, FadePage(page: AskDoctorHomPage())) : null,
? Navigator.push(context, FadePage(page: AskDoctorHomPage()))
: null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).askYour, title: TranslationBase.of(context).askYour, imagePath: 'ask_doctor_icon.png', subTitle: TranslationBase.of(context).askYourSubtitle, isEnable: projectViewModel.havePrivilege(28)),
imagePath: 'ask_doctor_icon.png',
subTitle: TranslationBase.of(context).askYourSubtitle,
isEnable: projectViewModel.havePrivilege(28)),
)); ));
if (projectViewModel.havePrivilege(32) || true) { if (projectViewModel.havePrivilege(32) || true) {
@ -828,15 +742,11 @@ class Utils {
if (projectViewModel.isLogin && userData_ != null) { if (projectViewModel.isLogin && userData_ != null) {
String patientID = userData_.patientID.toString(); String patientID = userData_.patientID.toString();
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
projectViewModel projectViewModel.platformBridge().connectHMGInternetWifi(patientID).then((value) => {GifLoaderDialogUtils.hideDialog(context)});
.platformBridge()
.connectHMGInternetWifi(patientID)
.then((value) => {GifLoaderDialogUtils.hideDialog(context)});
} else { } else {
AlertDialogBox( AlertDialogBox(
context: context, context: context,
confirmMessage: confirmMessage: "Please login with your account first to use this feature",
"Please login with your account first to use this feature",
okText: "OK", okText: "OK",
okFunction: () { okFunction: () {
AlertDialogBox.closeAlertDialog(context); AlertDialogBox.closeAlertDialog(context);
@ -853,9 +763,7 @@ class Utils {
} }
medical.add(InkWell( medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(40) onTap: () => projectViewModel.havePrivilege(40) ? launch('whatsapp://send?phone=18885521858&text=') : null,
? launch('whatsapp://send?phone=18885521858&text=')
: null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).chatbot, title: TranslationBase.of(context).chatbot,
imagePath: 'insurance_approvals_icon.png', imagePath: 'insurance_approvals_icon.png',
@ -867,14 +775,12 @@ class Utils {
return medical; return medical;
} }
static Widget loadNetworkImage( static Widget loadNetworkImage({@required String url, BoxFit fitting = BoxFit.cover}) {
{@required String url, BoxFit fitting = BoxFit.cover}) {
return CachedNetworkImage( return CachedNetworkImage(
placeholderFadeInDuration: Duration(milliseconds: 250), placeholderFadeInDuration: Duration(milliseconds: 250),
fit: fitting, fit: fitting,
imageUrl: url, imageUrl: url,
placeholder: (context, url) => placeholder: (context, url) => Container(child: Center(child: CircularProgressIndicator())),
Container(child: Center(child: CircularProgressIndicator())),
errorWidget: (context, url, error) { errorWidget: (context, url, error) {
return Icon( return Icon(
Icons.error, Icons.error,
@ -885,13 +791,7 @@ class Utils {
} }
} }
Widget applyShadow( Widget applyShadow({Color color = Colors.grey, double shadowOpacity = 0.5, double spreadRadius = 2, double blurRadius = 7, Offset offset = const Offset(2, 2), @required Widget child}) {
{Color color = Colors.grey,
double shadowOpacity = 0.5,
double spreadRadius = 2,
double blurRadius = 7,
Offset offset = const Offset(2, 2),
@required Widget child}) {
return Container( return Container(
decoration: BoxDecoration( decoration: BoxDecoration(
boxShadow: [ boxShadow: [
@ -908,8 +808,7 @@ Widget applyShadow(
} }
Future<AuthenticatedUser> userData() async { Future<AuthenticatedUser> userData() async {
var userData = AuthenticatedUser.fromJson( var userData = AuthenticatedUser.fromJson(await AppSharedPreferences().getObject(MAIN_USER));
await AppSharedPreferences().getObject(MAIN_USER));
return userData; return userData;
} }
@ -923,12 +822,9 @@ extension IndexedIterable<E> on Iterable<E> {
openAppStore({String androidPackageName, String iOSAppID}) async { openAppStore({String androidPackageName, String iOSAppID}) async {
if (Platform.isAndroid) { if (Platform.isAndroid) {
assert(!(androidPackageName == null), assert(!(androidPackageName == null), "Should have valid value in androidPackageName parameter");
"Should have valid value in androidPackageName parameter"); if ((await FlutterHmsGmsAvailability.isGmsAvailable)) launch("market://details?id=com.ejada.hmg");
if ((await FlutterHmsGmsAvailability.isGmsAvailable)) if ((await FlutterHmsGmsAvailability.isHmsAvailable)) launch("appmarket://details?id=com.ejada.hmg");
launch("market://details?id=com.ejada.hmg");
if ((await FlutterHmsGmsAvailability.isHmsAvailable))
launch("appmarket://details?id=com.ejada.hmg");
} else if (Platform.isIOS) { } else if (Platform.isIOS) {
assert((iOSAppID == null), "Should have valid value in iOSAppID parameter"); assert((iOSAppID == null), "Should have valid value in iOSAppID parameter");
launch("https://itunes.apple.com/kr/app/apple-store/$iOSAppID)"); launch("https://itunes.apple.com/kr/app/apple-store/$iOSAppID)");

@ -88,11 +88,19 @@ InputDecoration txtFieldSearch(String label) {
); );
} }
Widget circularAviator(double s, {Color bcColor, Color brColor, Color iconColor, int borderWidth, IconData icon}) { Widget circularAviator(
double s, {
Color bcColor,
Color brColor,
Color iconColor,
int borderWidth,
IconData icon,
double elevation = 4,
}) {
return Card( return Card(
shape: cardRadius(2000), shape: cardRadius(2000),
color: Colors.transparent, color: Colors.transparent,
elevation: 4, elevation: elevation,
child: Container( child: Container(
width: s, width: s,
height: s, height: s,
@ -206,13 +214,27 @@ Decoration containerBottomRightRadiusWithGradient(double radius, {Color darkColo
); );
} }
Decoration containerBottomRightRadiusWithGradientForAr(double radius, {Color darkColor, Color lightColor}) {
return BoxDecoration(
borderRadius: BorderRadius.only(bottomLeft: Radius.circular(radius)),
gradient: LinearGradient(
colors: [
lightColor == null ? Color(0xFFF71787E) : lightColor,
darkColor == null ? Color(0xFFF2B353E) : darkColor,
],
begin: Alignment.topCenter,
end: Alignment.bottomRight,
),
);
}
Decoration containerRadiusWithGradientServices(double radius, {Color darkColor, Color lightColor}) { Decoration containerRadiusWithGradientServices(double radius, {Color darkColor, Color lightColor}) {
return BoxDecoration( return BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(radius)), borderRadius: BorderRadius.all(Radius.circular(radius)),
gradient: LinearGradient( gradient: LinearGradient(
colors: [ colors: [
darkColor == null ? Color(0xFFF2B353E) : darkColor, darkColor == null ? Color(0xFF2B353E) : darkColor,
lightColor == null ? Color(0xFFF71787E) : lightColor, lightColor == null ? Color(0xFF71787E) : lightColor,
], ],
begin: Alignment.centerRight, begin: Alignment.centerRight,
end: Alignment.topLeft, end: Alignment.topLeft,
@ -220,6 +242,24 @@ Decoration containerRadiusWithGradientServices(double radius, {Color darkColor,
); );
} }
Decoration containerBottomRightRadiusWithGradientBorder(double radius, {Color darkColor, Color lightColor, Color borderColor = Colors.transparent, double w = 0}) {
return BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(radius)),
border: Border.all(
width: w, //
color: borderColor // <--- border width here
),
gradient: LinearGradient(
colors: [
darkColor == null ? Color(0xFFF2B353E) : darkColor,
lightColor == null ? Color(0xFFF71787E) : lightColor,
],
begin: Alignment.topCenter,
end: Alignment.bottomRight,
),
);
}
Decoration containerRadius(Color background, double radius) { Decoration containerRadius(Color background, double radius) {
return BoxDecoration( return BoxDecoration(
color: background, color: background,
@ -260,6 +300,13 @@ Decoration containerColorRadiusRight(Color background, double radius) {
); );
} }
Decoration containerColorRadiusLeft(Color background, double radius) {
return BoxDecoration(
color: background,
borderRadius: BorderRadius.only(topLeft: Radius.circular(radius), bottomLeft: Radius.circular(radius)),
);
}
Decoration containerColorRadiusRightBorder(Color background, double radius, double w) { Decoration containerColorRadiusRightBorder(Color background, double radius, double w) {
return BoxDecoration( return BoxDecoration(
color: background, color: background,

@ -28,7 +28,7 @@ class MedicalProfileItem extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); //ProjectViewModel projectViewModel = Provider.of(context);
return Container( return Container(
height: MediaQuery.of(context).size.height * 0.143, height: MediaQuery.of(context).size.height * 0.143,
width: MediaQuery.of(context).size.height * 0.143, width: MediaQuery.of(context).size.height * 0.143,
@ -60,7 +60,7 @@ class MedicalProfileItem extends StatelessWidget {
Text( Text(
title, title,
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: SizeConfig.textMultiplier * 1.8,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
), ),
@ -73,7 +73,7 @@ class MedicalProfileItem extends StatelessWidget {
subTitle, subTitle,
maxLines: 1, maxLines: 1,
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: SizeConfig.textMultiplier * 1.8,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
), ),

@ -0,0 +1,167 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class TimeLineView extends StatefulWidget {
bool isLogged, isArabic;
List<AppoitmentAllHistoryResultList> appoitmentAllHistoryResultList;
TimeLineView(this.isLogged, this.isArabic, this.appoitmentAllHistoryResultList);
@override
_TimeLineViewState createState() => _TimeLineViewState();
}
class _TimeLineViewState extends State<TimeLineView> {
@override
Widget build(BuildContext context) {
return Container(
width: double.infinity,
height: 210,
decoration: containerBottomRightRadiusWithGradientBorder(0, darkColor: Color(0xFFF2B353E), lightColor: Color(0xFFF2B353E)),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
// mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Row(
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Appointments",
style: TextStyle(
color: CustomColors.white,
fontSize: 14,
fontWeight: FontWeight.bold,
),
),
Text(
"Timeline",
style: TextStyle(
color: CustomColors.white,
fontSize: 24,
fontWeight: FontWeight.bold,
),
),
],
),
],
),
ListView.builder(
itemBuilder: (context, index) => TimelineNewWidget(
// isUp: index % 2 == 1,
appoitmentAllHistoryResul: widget.appoitmentAllHistoryResultList[index],
),
itemCount: widget.appoitmentAllHistoryResultList.length,
scrollDirection: Axis.horizontal,
shrinkWrap: true,
reverse: widget.isArabic,
),
],
),
);
}
}
class TimelineNewWidget extends StatelessWidget {
final AppoitmentAllHistoryResultList appoitmentAllHistoryResul;
TimelineNewWidget({Key key, this.appoitmentAllHistoryResul});
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return Container(
width: MediaQuery.of(context).size.width / 1.6,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
width: double.infinity,
child: Row(
children: [
Text(
DateUtil.getDayMonthYearLangDateFormatted(
DateUtil.convertStringToDate(appoitmentAllHistoryResul.appointmentDate),
projectViewModel.isArabic ? "ar" : "en",
),
style: TextStyle(
color: CustomColors.grey2,
),
),
barView(),
],
),
),
mHeight(10),
LargeAvatar(
onTap: () {
//AppointmentDetails
// Navigator.push(
// context,
// FadePage(
// page: AppointmentDetails(
// appo: appoitmentAllHistoryResul,
// )));
},
name: appoitmentAllHistoryResul.doctorNameObj,
url: appoitmentAllHistoryResul.doctorImageURL,
width: 30,
height: 30,
),
mHeight(6),
Text(
appoitmentAllHistoryResul.doctorNameObj,
style: TextStyle(
color: CustomColors.white,
fontSize: 14,
),
),
Text(
appoitmentAllHistoryResul.clinicName,
style: TextStyle(
color: CustomColors.grey2,
fontSize: 10,
fontWeight: FontWeight.bold,
),
),
],
),
);
}
Widget barView() {
return Flexible(
child: Container(
width: double.infinity,
child: Row(
children: [
Container(
width: 6,
height: 6,
decoration: containerColorRadiusBorderWidth(CustomColors.pharmacyGreyColor, 50, CustomColors.grey2, 1),
),
Expanded(
child: Container(
width: double.infinity,
height: 1,
color: CustomColors.grey2,
),
),
Container(
width: 6,
height: 6,
decoration: containerColorRadiusBorderWidth(CustomColors.pharmacyGreyColor, 50, CustomColors.grey2, 1),
),
],
),
),
);
}
}

@ -38,6 +38,7 @@ import 'package:diplomaticquarterapp/pages/medical/balance/my_balance_page.dart'
import 'package:diplomaticquarterapp/pages/medical/doctor/doctor_home_page.dart'; import 'package:diplomaticquarterapp/pages/medical/doctor/doctor_home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/labs/labs_home_page.dart'; import 'package:diplomaticquarterapp/pages/medical/labs/labs_home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart'; import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart';
import 'package:diplomaticquarterapp/pages/medical/medical_profile_page_new.dart';
import 'package:diplomaticquarterapp/pages/medical/patient_sick_leave_page.dart'; import 'package:diplomaticquarterapp/pages/medical/patient_sick_leave_page.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_home_page.dart'; import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/radiology/radiology_home_page.dart'; import 'package:diplomaticquarterapp/pages/medical/radiology/radiology_home_page.dart';
@ -74,8 +75,7 @@ class FloatingSearchButton extends StatefulWidget {
_FloatingSearchButton createState() => _FloatingSearchButton(); _FloatingSearchButton createState() => _FloatingSearchButton();
} }
class _FloatingSearchButton extends State<FloatingSearchButton> class _FloatingSearchButton extends State<FloatingSearchButton> with TickerProviderStateMixin {
with TickerProviderStateMixin {
Offset position = Offset(250, 400); Offset position = Offset(250, 400);
bool activeAnimation = false; bool activeAnimation = false;
bool isShow = true; bool isShow = true;
@ -108,12 +108,11 @@ class _FloatingSearchButton extends State<FloatingSearchButton>
Animation<Offset> offset; Animation<Offset> offset;
String networkImage; String networkImage;
bool isArabic; bool isArabic;
@override @override
void initState() { void initState() {
controller = controller = AnimationController(vsync: this, duration: Duration(seconds: 1));
AnimationController(vsync: this, duration: Duration(seconds: 1)); offset = Tween<Offset>(begin: Offset(0.0, 1.0), end: Offset(0.0, 0.0)).animate(controller);
offset = Tween<Offset>(begin: Offset(0.0, 1.0), end: Offset(0.0, 0.0))
.animate(controller);
if (IS_VOICE_COMMAND_CLOSED == true) { if (IS_VOICE_COMMAND_CLOSED == true) {
controller.reverse(from: -1); controller.reverse(from: -1);
} }
@ -158,6 +157,7 @@ class _FloatingSearchButton extends State<FloatingSearchButton>
controller.dispose(); controller.dispose();
super.dispose(); super.dispose();
} }
// @override // @override
// void didUpdateWidget(FloatingSearchButton oldWidget) { // void didUpdateWidget(FloatingSearchButton oldWidget) {
// // super.didUpdateWidget(oldWidget); // // super.didUpdateWidget(oldWidget);
@ -168,13 +168,12 @@ class _FloatingSearchButton extends State<FloatingSearchButton>
// // }); // // });
// } // }
AuthenticatedUserObject authenticatedUserObject = AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>();
locator<AuthenticatedUserObject>();
VitalSignService _vitalSignService = locator<VitalSignService>(); VitalSignService _vitalSignService = locator<VitalSignService>();
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(child: SlideTransition(position: offset, child: getStack()));
child: SlideTransition(position: offset, child: getStack()));
} }
Widget getStack() { Widget getStack() {
@ -188,13 +187,10 @@ class _FloatingSearchButton extends State<FloatingSearchButton>
child: networkImage != null child: networkImage != null
? CachedNetworkImage( ? CachedNetworkImage(
imageUrl: networkImage, imageUrl: networkImage,
placeholder: (context, url) => placeholder: (context, url) => Image.asset('assets/images/gif/robot-idle.gif'),
Image.asset('assets/images/gif/robot-idle.gif'),
errorWidget: (context, url, error) => Icon(Icons.error), errorWidget: (context, url, error) => Icon(Icons.error),
) )
: Image.asset(isAnimationEnable == true : Image.asset(isAnimationEnable == true ? 'assets/images/gif/robot-speaking.gif' : 'assets/images/gif/robot-idle.gif'),
? 'assets/images/gif/robot-speaking.gif'
: 'assets/images/gif/robot-idle.gif'),
), ),
onTap: () { onTap: () {
new RoboSearch(context: context).showAlertDialog(context); new RoboSearch(context: context).showAlertDialog(context);
@ -227,10 +223,8 @@ class _FloatingSearchButton extends State<FloatingSearchButton>
} }
startVoiceSearch() async { startVoiceSearch() async {
_currentLocaleId = _currentLocaleId = TranslationBase.of(AppGlobal.context).locale.languageCode;
TranslationBase.of(AppGlobal.context).locale.languageCode; bool available = await speech.initialize(onStatus: statusListener, onError: errorListener);
bool available = await speech.initialize(
onStatus: statusListener, onError: errorListener);
if (available) { if (available) {
speech.listen( speech.listen(
onResult: resultListener, onResult: resultListener,
@ -279,8 +273,7 @@ class _FloatingSearchButton extends State<FloatingSearchButton>
} }
void requestPermissions() async { void requestPermissions() async {
if (await Permission.microphone.isDenied || if (await Permission.microphone.isDenied || await Permission.microphone.isUndetermined) {
await Permission.microphone.isUndetermined) {
Map<Permission, PermissionStatus> statuses = await [ Map<Permission, PermissionStatus> statuses = await [
Permission.microphone, Permission.microphone,
].request(); ].request();
@ -288,8 +281,7 @@ class _FloatingSearchButton extends State<FloatingSearchButton>
} }
Future<void> initSpeechState() async { Future<void> initSpeechState() async {
bool hasSpeech = await speech.initialize( bool hasSpeech = await speech.initialize(onError: errorListener, onStatus: statusListener);
onError: errorListener, onStatus: statusListener);
//if (hasSpeech) { //if (hasSpeech) {
// _currentLocaleId = // _currentLocaleId =
// _currentLocaleId == 'en' // _currentLocaleId == 'en'
@ -317,14 +309,9 @@ class _FloatingSearchButton extends State<FloatingSearchButton>
} }
getPages(text) { getPages(text) {
var request = { var request = {'VoiceMessage': text, 'Lang': _currentLocaleId == 'en' ? 'En' : 'Ar'};
'VoiceMessage': text,
'Lang': _currentLocaleId == 'en' ? 'En' : 'Ar'
};
searchProvider searchProvider.getBotPages(request).then((value) => {getCommands(value['Understand'])});
.getBotPages(request)
.then((value) => {getCommands(value['Understand'])});
} }
getCommands(result) async { getCommands(result) async {
@ -374,8 +361,7 @@ class _FloatingSearchButton extends State<FloatingSearchButton>
//= result['ProjectId'] ? result['ProjectId'] : 0; //result['ProjectId']; //= result['ProjectId'] ? result['ProjectId'] : 0; //result['ProjectId'];
if (clnicID.length == 1) { if (clnicID.length == 1) {
getDoctorsList(result['ProjectId'], clnicID[0], context, getDoctorsList(result['ProjectId'], clnicID[0], context, doctorId: null, doctorName: null, isNearest: true);
doctorId: null, doctorName: null, isNearest: true);
} else { } else {
goToClinic(clnicID); goToClinic(clnicID);
} }
@ -507,8 +493,7 @@ class _FloatingSearchButton extends State<FloatingSearchButton>
Navigator.of(context).push(MaterialPageRoute( Navigator.of(context).push(MaterialPageRoute(
builder: (BuildContext context) => MyWebView( builder: (BuildContext context) => MyWebView(
title: "HMG News", title: "HMG News",
selectedUrl: selectedUrl: "https://twitter.com/hashtag/مجموعة_د_سليمان_الحبيب_الطبية?src=hashtag_click&f=live",
"https://twitter.com/hashtag/مجموعة_د_سليمان_الحبيب_الطبية?src=hashtag_click&f=live",
))); )));
} }
break; break;
@ -578,11 +563,9 @@ class _FloatingSearchButton extends State<FloatingSearchButton>
case '35': case '35':
{ {
if (Platform.isIOS) { if (Platform.isIOS) {
launch( launch("https://apps.apple.com/sa/app/dr-suliaman-alhabib/id733503978");
"https://apps.apple.com/sa/app/dr-suliaman-alhabib/id733503978");
} else { } else {
launch( launch("https://play.google.com/store/apps/details?id=com.ejada.hmg&hl=en");
"https://play.google.com/store/apps/details?id=com.ejada.hmg&hl=en");
} }
} }
break; break;
@ -713,9 +696,7 @@ class _FloatingSearchButton extends State<FloatingSearchButton>
List<DoctorProfileList> docProfileList = []; List<DoctorProfileList> docProfileList = [];
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service service.getDoctorsProfile(doctorId, clinicId, projectId, context).then((res) {
.getDoctorsProfile(doctorId, clinicId, projectId, context)
.then((res) {
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
if (res['DoctorProfileList'].length != 0) { if (res['DoctorProfileList'].length != 0) {
res['DoctorProfileList'].forEach((v) { res['DoctorProfileList'].forEach((v) {
@ -723,8 +704,7 @@ class _FloatingSearchButton extends State<FloatingSearchButton>
}); });
} }
navigateToDoctorProfile(context, doctorData[0], docProfileList[0], navigateToDoctorProfile(context, doctorData[0], docProfileList[0], isAppo: true);
isAppo: true);
//speak(); //speak();
} }
}).catchError((err) { }).catchError((err) {
@ -732,35 +712,27 @@ class _FloatingSearchButton extends State<FloatingSearchButton>
}); });
} }
getDoctorsList(projectId, clinicId, context, getDoctorsList(projectId, clinicId, context, {doctorId, doctorName, isNearest = false}) {
{doctorId, doctorName, isNearest = false}) {
List<DoctorList> doctorsList = []; List<DoctorList> doctorsList = [];
List<String> arr = []; List<String> arr = [];
List<String> arrDistance = []; List<String> arrDistance = [];
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
service service.getDoctorsList(clinicId, projectId, isNearest, context, doctorId: doctorId, doctorName: doctorName).then((res) {
.getDoctorsList(clinicId, projectId, isNearest, context,
doctorId: doctorId, doctorName: doctorName)
.then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
setState(() { setState(() {
if (res['SearchDoctorsByTime_IsVoiceCommandList'] != null && if (res['SearchDoctorsByTime_IsVoiceCommandList'] != null && res['SearchDoctorsByTime_IsVoiceCommandList'].length != 0) {
res['SearchDoctorsByTime_IsVoiceCommandList'].length != 0) {
doctorsList.clear(); doctorsList.clear();
res['SearchDoctorsByTime_IsVoiceCommandList'].forEach((v1) { res['SearchDoctorsByTime_IsVoiceCommandList'].forEach((v1) {
v1['DoctorList'].forEach((v) { v1['DoctorList'].forEach((v) {
doctorsList.add(new DoctorList.fromJson(v)); doctorsList.add(new DoctorList.fromJson(v));
arr.add(new DoctorList.fromJson(v).projectName); arr.add(new DoctorList.fromJson(v).projectName);
arrDistance.add(new DoctorList.fromJson(v) arrDistance.add(new DoctorList.fromJson(v).projectDistanceInKiloMeters.toString());
.projectDistanceInKiloMeters
.toString());
}); });
}); });
if (doctorsList.length == 1) { if (doctorsList.length == 1) {
getDoctorProfile( getDoctorProfile(projectId, clinicId, doctorId[0], context, doctorsList);
projectId, clinicId, doctorId[0], context, doctorsList);
//speak(); //speak();
} else { } else {
@ -772,14 +744,11 @@ class _FloatingSearchButton extends State<FloatingSearchButton>
res['DoctorList'].forEach((v) { res['DoctorList'].forEach((v) {
doctorsList.add(new DoctorList.fromJson(v)); doctorsList.add(new DoctorList.fromJson(v));
arr.add(new DoctorList.fromJson(v).projectName); arr.add(new DoctorList.fromJson(v).projectName);
arrDistance.add(new DoctorList.fromJson(v) arrDistance.add(new DoctorList.fromJson(v).projectDistanceInKiloMeters.toString());
.projectDistanceInKiloMeters
.toString());
}); });
if (doctorsList.length == 1) { if (doctorsList.length == 1) {
getDoctorProfile( getDoctorProfile(projectId, clinicId, doctorId[0], context, doctorsList);
projectId, clinicId, doctorId[0], context, doctorsList);
//speak(); //speak();
} else { } else {
@ -797,8 +766,7 @@ class _FloatingSearchButton extends State<FloatingSearchButton>
}); });
} }
Future navigateToDoctorProfile(context, docObject, docProfile, Future navigateToDoctorProfile(context, docObject, docProfile, {isAppo}) async {
{isAppo}) async {
Navigator.push( Navigator.push(
context, context,
FadePage( FadePage(
@ -815,11 +783,7 @@ class _FloatingSearchButton extends State<FloatingSearchButton>
Navigator.push( Navigator.push(
context, context,
FadePage( FadePage(
page: BranchView( page: BranchView(doctorsList: docList, result: result, num: numAll, resultDistance: arrDistance),
doctorsList: docList,
result: result,
num: numAll,
resultDistance: arrDistance),
), ),
); );
} }
@ -834,15 +798,11 @@ class _FloatingSearchButton extends State<FloatingSearchButton>
if (isInit == true) { if (isInit == true) {
event.setValue({"animationEnable": 'true'}); event.setValue({"animationEnable": 'true'});
} }
if (isArabic == false && if (isArabic == false && results['ReturnMessage'] != null && isInit == false) {
results['ReturnMessage'] != null && await flutterTts.setVoice({"name": "en-au-x-aub-network", "locale": "en-AU"});
isInit == false) {
await flutterTts
.setVoice({"name": "en-au-x-aub-network", "locale": "en-AU"});
await flutterTts.speak(results['ReturnMessage']); await flutterTts.speak(results['ReturnMessage']);
} else if (results['ReturnMessage_Ar'] != null && isInit == false) { } else if (results['ReturnMessage_Ar'] != null && isInit == false) {
await flutterTts await flutterTts.setVoice({"name": "ar-xa-x-ard-network", "locale": "ar"});
.setVoice({"name": "ar-xa-x-ard-network", "locale": "ar"});
await flutterTts.speak(results['ReturnMessage_Ar']); await flutterTts.speak(results['ReturnMessage_Ar']);
} }
@ -866,18 +826,15 @@ class _FloatingSearchButton extends State<FloatingSearchButton>
getUserData() async { getUserData() async {
if (await this.sharedPref.getObject(USER_PROFILE) != null) { if (await this.sharedPref.getObject(USER_PROFILE) != null) {
user = AuthenticatedUser.fromJson( user = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
await this.sharedPref.getObject(USER_PROFILE));
} }
} }
initialSpeak() async { initialSpeak() async {
await flutterTts.awaitSpeakCompletion(true); await flutterTts.awaitSpeakCompletion(true);
results = { results = {
'ReturnMessage_Ar': 'ReturnMessage_Ar': "هذه الخدمة تم تصميمها لتتمكن من ربط الملفات الطبية للعائلة بملفك الطبي حتى تتمكن من إدارة سجلاتهم عن طريق تسجيل الدخول إلى ملفك الطبي.",
"هذه الخدمة تم تصميمها لتتمكن من ربط الملفات الطبية للعائلة بملفك الطبي حتى تتمكن من إدارة سجلاتهم عن طريق تسجيل الدخول إلى ملفك الطبي.", 'ReturnMessage': "Through this service, you will be able to link your family medical files to your medical file so that you can manage their records by login to your medical file."
'ReturnMessage':
"Through this service, you will be able to link your family medical files to your medical file so that you can manage their records by login to your medical file."
}; };
if (IS_VOICE_COMMAND_CLOSED == false) { if (IS_VOICE_COMMAND_CLOSED == false) {
if (IS_TEXT_COMPLETED == false) { if (IS_TEXT_COMPLETED == false) {
@ -931,6 +888,7 @@ class _FloatingSearchButton extends State<FloatingSearchButton>
class RoboSearch { class RoboSearch {
final BuildContext context; final BuildContext context;
static var dialog; static var dialog;
RoboSearch({ RoboSearch({
@required this.context, @required this.context,
}); });
@ -986,14 +944,11 @@ class _MyStatefulBuilderState extends State<MyStatefulBuilder> {
var searchText; var searchText;
static StreamSubscription<dynamic> streamSubscription; static StreamSubscription<dynamic> streamSubscription;
static var isClosed = false; static var isClosed = false;
@override @override
void initState() { void initState() {
streamSubscription = event.controller.stream.listen((p) { streamSubscription = event.controller.stream.listen((p) {
if ((p['searchText'] != 'null' && if ((p['searchText'] != 'null' && p['searchText'] != null && p['searchText'] != "" && isClosed == false) && mounted) {
p['searchText'] != null &&
p['searchText'] != "" &&
isClosed == false) &&
mounted) {
setState(() { setState(() {
searchText = p['searchText']; searchText = p['searchText'];
}); });
@ -1024,9 +979,7 @@ class _MyStatefulBuilderState extends State<MyStatefulBuilder> {
child: Container( child: Container(
margin: EdgeInsets.all(20), margin: EdgeInsets.all(20),
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
decoration: BoxDecoration( decoration: BoxDecoration(borderRadius: BorderRadius.circular(100), border: Border.all(width: 2, color: Colors.red)),
borderRadius: BorderRadius.circular(100),
border: Border.all(width: 2, color: Colors.red)),
child: Icon( child: Icon(
Icons.mic, Icons.mic,
color: Colors.blue, color: Colors.blue,
@ -1040,12 +993,7 @@ class _MyStatefulBuilderState extends State<MyStatefulBuilder> {
'assets/images/soundWaveAnimation.gif', 'assets/images/soundWaveAnimation.gif',
height: 75, height: 75,
))), ))),
Expanded( Expanded(flex: 1, child: Center(child: AppText(searchText != null && searchText != 'null' ? searchText : TranslationBase.of(context).trySaying))),
flex: 1,
child: Center(
child: AppText(searchText != null && searchText != 'null'
? searchText
: TranslationBase.of(context).trySaying))),
searchText == 'null' searchText == 'null'
? Center( ? Center(
child: RaisedButton( child: RaisedButton(

Loading…
Cancel
Save