Merge branch 'master' into dev_aamir

dev_aamir
aamir-csol 2 weeks ago
commit 8123981092

@ -0,0 +1,74 @@
{
"agcgw":{
"backurl":"connect-drcn.hispace.hicloud.com",
"url":"connect-drcn.dbankcloud.cn",
"websocketbackurl":"connect-ws-drcn.hispace.dbankcloud.com",
"websocketurl":"connect-ws-drcn.hispace.dbankcloud.cn"
},
"agcgw_all":{
"CN":"connect-drcn.dbankcloud.cn",
"CN_back":"connect-drcn.hispace.hicloud.com",
"DE":"connect-dre.dbankcloud.cn",
"DE_back":"connect-dre.hispace.hicloud.com",
"RU":"connect-drru.dbankcloud.cn",
"RU_back":"connect-drru.hispace.hicloud.com",
"SG":"connect-dra.dbankcloud.cn",
"SG_back":"connect-dra.hispace.hicloud.com"
},
"client":{
"cp_id":"2640966000002322881",
"product_id":"736430079244816567",
"client_id":"563735388191982656",
"client_secret":"650C7C799812AFFD53A10C7756CF05FB9F215A7E49032ABA8EBF3E14B77535CF",
"project_id":"736430079244816567",
"app_id":"102857389",
"api_key":"CgB6e3x9DJzMgRCmnT6dyUEkp6UsIfddb6l3w0ZEXzeiRMHEFi3400Z5fJ5qaHneU0OrAI/JRpk+DMGVs3QpUxlI",
"package_name":"com.ejada.hmg"
},
"oauth_client":{
"client_id":"102857389",
"client_type":1
},
"app_info":{
"app_id":"102857389",
"package_name":"com.ejada.hmg"
},
"service":{
"analytics":{
"collector_url":"datacollector-drcn.dt.hicloud.com,datacollector-drcn.dt.dbankcloud.cn",
"collector_url_ru":"datacollector-drru.dt.hicloud.com,datacollector-drru.dt.dbankcloud.cn",
"collector_url_sg":"datacollector-dra.dt.hicloud.com,datacollector-dra.dt.dbankcloud.cn",
"collector_url_de":"datacollector-dre.dt.hicloud.com,datacollector-dre.dt.dbankcloud.cn",
"collector_url_cn":"datacollector-drcn.dt.hicloud.com,datacollector-drcn.dt.dbankcloud.cn",
"resource_id":"p1",
"channel_id":""
},
"search":{
"url":"https://search-drcn.cloud.huawei.com"
},
"cloudstorage":{
"storage_url":"https://agc-storage-drcn.platform.dbankcloud.cn"
},
"ml":{
"mlservice_url":"ml-api-drcn.ai.dbankcloud.com,ml-api-drcn.ai.dbankcloud.cn"
}
},
"region":"CN",
"configuration_version":"3.0",
"appInfos":[
{
"package_name":"com.ejada.hmg",
"client":{
"app_id":"102857389"
},
"app_info":{
"package_name":"com.ejada.hmg",
"app_id":"102857389"
},
"oauth_client":{
"client_type":1,
"client_id":"102857389"
}
}
]
}

@ -248,6 +248,9 @@
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyB6TERnxIr0yJ3qG4ULBZbu0sAD4tGqtng" />
<meta-data
android:name="com.huawei.hms.client.appid"
android:value="appid=102857389" />
<!--
Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java

@ -1 +1,767 @@
{"nm":"HDFC Success","h":512,"w":512,"meta":{"g":"LottieFiles AE 1.0.0"},"layers":[{"ty":4,"nm":"check","sr":1,"st":0,"op":240,"ip":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[0,0,0]},"s":{"a":0,"k":[100,100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[256,256,0]},"r":{"a":0,"k":0},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}},"ef":[],"shapes":[{"ty":"gr","nm":"Shape 1","it":[{"ty":"sh","nm":"Path 1","d":1,"ks":{"a":0,"k":{"c":false,"i":[[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0]],"v":[[-82.5,4.5],[-31,55],[73,-52.5]]}}},{"ty":"tm","nm":"Trim Paths 1","e":{"a":1,"k":[{"o":{"x":1,"y":0.076},"i":{"x":0.667,"y":1},"s":[0],"t":60},{"s":[100],"t":85}]},"o":{"a":0,"k":0},"s":{"a":0,"k":0},"m":1},{"ty":"st","nm":"Stroke 1","lc":2,"lj":2,"ml":1,"o":{"a":0,"k":100},"w":{"a":0,"k":30},"c":{"a":0,"k":[1,1,1]}},{"ty":"tr","a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[0,0]},"r":{"a":0,"k":0},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}}]}],"ind":1},{"ty":4,"nm":"Shape Layer 2","sr":1,"st":0,"op":240,"ip":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[0,0,0]},"s":{"a":1,"k":[{"o":{"x":0.656,"y":0.872},"i":{"x":0,"y":0.98},"s":[0,0,100],"t":20},{"s":[150,150,100],"t":60}]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[256,257.86,0]},"r":{"a":0,"k":0},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}},"ef":[],"shapes":[{"ty":"gr","nm":"Ellipse 1","it":[{"ty":"el","nm":"Ellipse Path 1","d":1,"p":{"a":0,"k":[0,0]},"s":{"a":0,"k":[236,236]}},{"ty":"fl","nm":"Fill 1","c":{"a":0,"k":[0.094,0.761,0.451]},"r":1,"o":{"a":0,"k":100}},{"ty":"tr","a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[0,-3]},"r":{"a":0,"k":0},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}}]}],"ind":2},{"ty":4,"nm":"Shape Layer 1","sr":1,"st":0,"op":240,"ip":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[0,0,0]},"s":{"a":1,"k":[{"o":{"x":0.477,"y":0.587},"i":{"x":0,"y":0.999},"s":[0,0,100],"t":10},{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[150,150,100],"t":50},{"o":{"x":0.167,"y":0},"i":{"x":0.833,"y":1},"s":[150,150,100],"t":76},{"s":[210,210,100],"t":123}]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[256,257.86,0]},"r":{"a":0,"k":0},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.912,"y":0.073},"i":{"x":0.626,"y":0.729},"s":[100],"t":76},{"s":[0],"t":119}]}},"ef":[],"shapes":[{"ty":"gr","nm":"Ellipse 1","it":[{"ty":"el","nm":"Ellipse Path 1","d":1,"p":{"a":0,"k":[0,0]},"s":{"a":0,"k":[236,236]}},{"ty":"st","nm":"Stroke 1","lc":1,"lj":1,"ml":4,"o":{"a":0,"k":100},"w":{"a":0,"k":2},"c":{"a":0,"k":[1,1,1]}},{"ty":"fl","nm":"Fill 1","c":{"a":0,"k":[0.784,0.945,0.878]},"r":1,"o":{"a":0,"k":100}},{"ty":"tr","a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[0,-3]},"r":{"a":0,"k":0},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}}]}],"ind":3},{"ty":4,"nm":"BG","sr":1,"st":0,"op":240,"ip":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[0,0,0]},"s":{"a":0,"k":[100,100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[256,256,0]},"r":{"a":0,"k":0},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}},"ef":[],"shapes":[{"ty":"gr","nm":"Rectangle 1","it":[{"ty":"rc","nm":"Rectangle Path 1","d":1,"p":{"a":0,"k":[0,0]},"r":{"a":0,"k":0},"s":{"a":0,"k":[554,556]}},{"ty":"fl","nm":"Fill 1","c":{"a":0,"k":[1,1,1]},"r":1,"o":{"a":0,"k":100}},{"ty":"tr","a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[-1,6]},"r":{"a":0,"k":0},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}}]}],"ind":4}],"v":"4.8.0","fr":60,"op":130,"ip":0,"assets":[]}
{
"nm": "HDFC Success",
"h": 512,
"w": 512,
"meta": {
"g": "LottieFiles AE 1.0.0"
},
"layers": [
{
"ty": 4,
"nm": "check",
"sr": 1,
"st": 0,
"op": 240,
"ip": 0,
"hasMask": false,
"ao": 0,
"ks": {
"a": {
"a": 0,
"k": [
0,
0,
0
]
},
"s": {
"a": 0,
"k": [
100,
100,
100
]
},
"sk": {
"a": 0,
"k": 0
},
"p": {
"a": 0,
"k": [
256,
256,
0
]
},
"r": {
"a": 0,
"k": 0
},
"sa": {
"a": 0,
"k": 0
},
"o": {
"a": 0,
"k": 100
}
},
"ef": [],
"shapes": [
{
"ty": "gr",
"nm": "Shape 1",
"it": [
{
"ty": "sh",
"nm": "Path 1",
"d": 1,
"ks": {
"a": 0,
"k": {
"c": false,
"i": [
[
0,
0
],
[
0,
0
],
[
0,
0
]
],
"o": [
[
0,
0
],
[
0,
0
],
[
0,
0
]
],
"v": [
[
-82.5,
4.5
],
[
-31,
55
],
[
73,
-52.5
]
]
}
}
},
{
"ty": "tm",
"nm": "Trim Paths 1",
"e": {
"a": 1,
"k": [
{
"o": {
"x": 1,
"y": 0.076
},
"i": {
"x": 0.667,
"y": 1
},
"s": [
0
],
"t": 60
},
{
"s": [
100
],
"t": 85
}
]
},
"o": {
"a": 0,
"k": 0
},
"s": {
"a": 0,
"k": 0
},
"m": 1
},
{
"ty": "st",
"nm": "Stroke 1",
"lc": 2,
"lj": 2,
"ml": 1,
"o": {
"a": 0,
"k": 100
},
"w": {
"a": 0,
"k": 30
},
"c": {
"a": 0,
"k": [
1,
1,
1
]
}
},
{
"ty": "tr",
"a": {
"a": 0,
"k": [
0,
0
]
},
"s": {
"a": 0,
"k": [
100,
100
]
},
"sk": {
"a": 0,
"k": 0
},
"p": {
"a": 0,
"k": [
0,
0
]
},
"r": {
"a": 0,
"k": 0
},
"sa": {
"a": 0,
"k": 0
},
"o": {
"a": 0,
"k": 100
}
}
]
}
],
"ind": 1
},
{
"ty": 4,
"nm": "Shape Layer 2",
"sr": 1,
"st": 0,
"op": 240,
"ip": 0,
"hasMask": false,
"ao": 0,
"ks": {
"a": {
"a": 0,
"k": [
0,
0,
0
]
},
"s": {
"a": 1,
"k": [
{
"o": {
"x": 0.656,
"y": 0.872
},
"i": {
"x": 0,
"y": 0.98
},
"s": [
0,
0,
100
],
"t": 20
},
{
"s": [
150,
150,
100
],
"t": 60
}
]
},
"sk": {
"a": 0,
"k": 0
},
"p": {
"a": 0,
"k": [
256,
257.86,
0
]
},
"r": {
"a": 0,
"k": 0
},
"sa": {
"a": 0,
"k": 0
},
"o": {
"a": 0,
"k": 100
}
},
"ef": [],
"shapes": [
{
"ty": "gr",
"nm": "Ellipse 1",
"it": [
{
"ty": "el",
"nm": "Ellipse Path 1",
"d": 1,
"p": {
"a": 0,
"k": [
0,
0
]
},
"s": {
"a": 0,
"k": [
236,
236
]
}
},
{
"ty": "fl",
"nm": "Fill 1",
"c": {
"a": 0,
"k": [
0.094,
0.761,
0.451
]
},
"r": 1,
"o": {
"a": 0,
"k": 100
}
},
{
"ty": "tr",
"a": {
"a": 0,
"k": [
0,
0
]
},
"s": {
"a": 0,
"k": [
100,
100
]
},
"sk": {
"a": 0,
"k": 0
},
"p": {
"a": 0,
"k": [
0,
-3
]
},
"r": {
"a": 0,
"k": 0
},
"sa": {
"a": 0,
"k": 0
},
"o": {
"a": 0,
"k": 100
}
}
]
}
],
"ind": 2
},
{
"ty": 4,
"nm": "Shape Layer 1",
"sr": 1,
"st": 0,
"op": 240,
"ip": 0,
"hasMask": false,
"ao": 0,
"ks": {
"a": {
"a": 0,
"k": [
0,
0,
0
]
},
"s": {
"a": 1,
"k": [
{
"o": {
"x": 0.477,
"y": 0.587
},
"i": {
"x": 0,
"y": 0.999
},
"s": [
0,
0,
100
],
"t": 10
},
{
"o": {
"x": 0.167,
"y": 0.167
},
"i": {
"x": 0.833,
"y": 0.833
},
"s": [
150,
150,
100
],
"t": 50
},
{
"o": {
"x": 0.167,
"y": 0
},
"i": {
"x": 0.833,
"y": 1
},
"s": [
150,
150,
100
],
"t": 76
},
{
"s": [
210,
210,
100
],
"t": 123
}
]
},
"sk": {
"a": 0,
"k": 0
},
"p": {
"a": 0,
"k": [
256,
257.86,
0
]
},
"r": {
"a": 0,
"k": 0
},
"sa": {
"a": 0,
"k": 0
},
"o": {
"a": 1,
"k": [
{
"o": {
"x": 0.912,
"y": 0.073
},
"i": {
"x": 0.626,
"y": 0.729
},
"s": [
100
],
"t": 76
},
{
"s": [
0
],
"t": 119
}
]
}
},
"ef": [],
"shapes": [
{
"ty": "gr",
"nm": "Ellipse 1",
"it": [
{
"ty": "el",
"nm": "Ellipse Path 1",
"d": 1,
"p": {
"a": 0,
"k": [
0,
0
]
},
"s": {
"a": 0,
"k": [
236,
236
]
}
},
{
"ty": "st",
"nm": "Stroke 1",
"lc": 1,
"lj": 1,
"ml": 4,
"o": {
"a": 0,
"k": 100
},
"w": {
"a": 0,
"k": 2
},
"c": {
"a": 0,
"k": [
1,
1,
1
]
}
},
{
"ty": "fl",
"nm": "Fill 1",
"c": {
"a": 0,
"k": [
0.784,
0.945,
0.878
]
},
"r": 1,
"o": {
"a": 0,
"k": 100
}
},
{
"ty": "tr",
"a": {
"a": 0,
"k": [
0,
0
]
},
"s": {
"a": 0,
"k": [
100,
100
]
},
"sk": {
"a": 0,
"k": 0
},
"p": {
"a": 0,
"k": [
0,
-3
]
},
"r": {
"a": 0,
"k": 0
},
"sa": {
"a": 0,
"k": 0
},
"o": {
"a": 0,
"k": 100
}
}
]
}
],
"ind": 3
},
{
"ty": 4,
"nm": "BG",
"sr": 1,
"st": 0,
"op": 240,
"ip": 0,
"hasMask": false,
"ao": 0,
"ks": {
"a": {
"a": 0,
"k": [
0,
0,
0
]
},
"s": {
"a": 0,
"k": [
100,
100,
100
]
},
"sk": {
"a": 0,
"k": 0
},
"p": {
"a": 0,
"k": [
256,
256,
0
]
},
"r": {
"a": 0,
"k": 0
},
"sa": {
"a": 0,
"k": 0
},
"o": {
"a": 0,
"k": 100
}
},
"ef": [],
"shapes": [
{
"ty": "gr",
"nm": "Rectangle 1",
"it": [
{
"ty": "rc",
"nm": "Rectangle Path 1",
"d": 1,
"p": {
"a": 0,
"k": [
0,
0
]
},
"r": {
"a": 0,
"k": 0
},
"s": {
"a": 0,
"k": [
554,
556
]
}
},
{
"ty": "fl",
"nm": "Fill 1",
"c": {
"a": 0,
"k": [
0.972,
0.972,
0.972
]
},
"r": 1,
"o": {
"a": 0,
"k": 100
}
},
{
"ty": "tr",
"a": {
"a": 0,
"k": [
0,
0
]
},
"s": {
"a": 0,
"k": [
100,
100
]
},
"sk": {
"a": 0,
"k": 0
},
"p": {
"a": 0,
"k": [
-1,
6
]
},
"r": {
"a": 0,
"k": 0
},
"sa": {
"a": 0,
"k": 0
},
"o": {
"a": 0,
"k": 100
}
}
]
}
],
"ind": 4
}
],
"v": "4.8.0",
"fr": 60,
"op": 130,
"ip": 0,
"assets": []
}

@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M6.60372 8.55529C6.7256 8.71666 7.08951 9.1984 7.30624 9.47611C7.74031 10.0323 8.33342 10.7714 8.97323 11.5083C9.61627 12.2489 10.2918 12.9702 10.8919 13.5005C11.1928 13.7663 11.4571 13.9684 11.6753 14.0999C11.8804 14.2235 12.0016 14.2493 12.0016 14.2493C12.0016 14.2493 12.1192 14.2235 12.3244 14.0999C12.5425 13.9684 12.8068 13.7663 13.1078 13.5005C13.7079 12.9702 14.3834 12.2489 15.0264 11.5083C15.6662 10.7714 16.2593 10.0323 16.6934 9.47608C16.9101 9.19837 17.2735 8.7173 17.3954 8.55593C17.6411 8.22241 18.1111 8.15047 18.4446 8.3961C18.7781 8.64173 18.8494 9.11123 18.6037 9.44476L18.6018 9.4473C18.474 9.61655 18.0971 10.1156 17.8759 10.3989C17.4321 10.9677 16.8216 11.7286 16.1591 12.4917C15.4997 13.2511 14.7741 14.0298 14.101 14.6245C13.7653 14.9212 13.425 15.1879 13.0988 15.3845C12.7932 15.5687 12.4063 15.75 11.9998 15.75C11.5933 15.75 11.2064 15.5687 10.9008 15.3845C10.5747 15.1879 10.2344 14.9212 9.89869 14.6245C9.22557 14.0298 8.4999 13.2511 7.84058 12.4917C7.17803 11.7286 6.5676 10.9677 6.12372 10.399C5.90243 10.1154 5.52551 9.61637 5.39793 9.44747L5.39628 9.44528C5.15064 9.11176 5.22154 8.64179 5.55506 8.39615C5.88857 8.15053 6.35808 8.22179 6.60372 8.55529Z" fill="#2E3039"/>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

@ -0,0 +1,4 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M20.75 7.00005C20.75 7.41426 20.4142 7.75005 20 7.75005L5.46276 7.75005C5.62746 7.90768 5.8071 8.06992 5.99168 8.23018C6.35357 8.54439 6.71767 8.83662 6.99263 9.05121C7.12972 9.15819 7.24374 9.24517 7.32308 9.3051C7.36274 9.33505 7.39367 9.3582 7.41444 9.37368L7.43777 9.39102L7.44478 9.39621C7.77825 9.64185 7.84946 10.1113 7.60384 10.4448C7.35821 10.7783 6.88857 10.8495 6.55505 10.6038L6.5522 10.6017L6.54492 10.5964L6.51808 10.5764C6.4949 10.5591 6.46139 10.534 6.41901 10.502C6.3343 10.438 6.21394 10.3462 6.06978 10.2337C5.78225 10.0093 5.39635 9.69978 5.00825 9.36282C4.62388 9.02908 4.22019 8.65371 3.90668 8.29889C3.75069 8.12235 3.60116 7.93321 3.48657 7.74312C3.38439 7.57362 3.25 7.30774 3.25 7.00005C3.25 6.69235 3.38438 6.42643 3.48657 6.25693C3.60116 6.06684 3.75069 5.8777 3.90669 5.70116C4.22019 5.34635 4.62389 4.97098 5.00827 4.63725C5.39637 4.30029 5.78228 3.99075 6.06981 3.76636C6.21397 3.65386 6.33433 3.56204 6.41904 3.49805C6.46045 3.46678 6.52881 3.41583 6.55355 3.3974L6.55522 3.39615C6.88875 3.15052 7.35824 3.22177 7.60388 3.55529C7.84951 3.88882 7.77825 4.35832 7.44473 4.60395L7.44337 4.60495L7.43778 4.60909L7.41446 4.62642C7.39369 4.6419 7.36275 4.66505 7.3231 4.695C7.24375 4.75493 7.12973 4.84191 6.99264 4.94889C6.71767 5.16347 6.35358 5.45569 5.99168 5.76991C5.80709 5.93017 5.62743 6.09241 5.46273 6.25005L20 6.25005C20.4142 6.25005 20.75 6.58584 20.75 7.00005Z" fill="#ED1C2B"/>
<path d="M3.25 17C3.25 16.5858 3.58579 16.25 4 16.25L18.5372 16.25C18.3725 16.0924 18.1929 15.9301 18.0083 15.7699C17.6464 15.4556 17.2823 15.1634 17.0074 14.9488C16.8703 14.8418 16.7563 14.7549 16.6769 14.6949C16.6373 14.665 16.6063 14.6418 16.5856 14.6264L16.5622 14.609L16.5552 14.6038C16.2218 14.3582 16.1505 13.8887 16.3962 13.5552C16.6418 13.2217 17.1114 13.1506 17.4449 13.3962L17.4551 13.4037L17.4819 13.4236C17.5051 13.4409 17.5386 13.466 17.581 13.498C17.6657 13.562 17.7861 13.6538 17.9302 13.7663C18.2177 13.9907 18.6036 14.3002 18.9917 14.6372C19.3761 14.971 19.7798 15.3463 20.0933 15.7011C20.2493 15.8777 20.3988 16.0668 20.5134 16.2569C20.6156 16.4264 20.75 16.6923 20.75 17C20.75 17.3077 20.6156 17.5736 20.5134 17.7431C20.3988 17.9332 20.2493 18.1223 20.0933 18.2989C19.7798 18.6537 19.3761 19.0291 18.9917 19.3628C18.6036 19.6997 18.2177 20.0093 17.9302 20.2337C17.786 20.3462 17.6657 20.438 17.581 20.502C17.5394 20.5333 17.4708 20.5845 17.4462 20.6028L17.4448 20.6039C17.1113 20.8495 16.6418 20.7783 16.3961 20.4447C16.1505 20.1112 16.2217 19.6417 16.5553 19.3961L16.5566 19.3951L16.5622 19.3909L16.5855 19.3736C16.6063 19.3581 16.6373 19.335 16.6769 19.305C16.7562 19.2451 16.8703 19.1581 17.0074 19.0511C17.2823 18.8366 17.6464 18.5443 18.0083 18.2301C18.1929 18.0699 18.3726 17.9076 18.5373 17.75L4 17.75C3.58579 17.75 3.25 17.4142 3.25 17Z" fill="#ED1C2B"/>
</svg>

After

Width:  |  Height:  |  Size: 2.9 KiB

@ -0,0 +1,4 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M14.43 18.8228C14.24 18.8228 14.05 18.7528 13.9 18.6028C13.61 18.3128 13.61 17.8328 13.9 17.5428L19.44 12.0028L13.9 6.4628C13.61 6.1728 13.61 5.6928 13.9 5.4028C14.19 5.1128 14.67 5.1128 14.96 5.4028L21.03 11.4728C21.32 11.7628 21.32 12.2428 21.03 12.5328L14.96 18.6028C14.81 18.7528 14.62 18.8228 14.43 18.8228Z" fill="#2E3039"/>
<path d="M20.33 12.7528H3.5C3.09 12.7528 2.75 12.4128 2.75 12.0028C2.75 11.5928 3.09 11.2528 3.5 11.2528H20.33C20.74 11.2528 21.08 11.5928 21.08 12.0028C21.08 12.4128 20.74 12.7528 20.33 12.7528Z" fill="#2E3039"/>
</svg>

After

Width:  |  Height:  |  Size: 657 B

@ -0,0 +1,4 @@
<svg width="20" height="22" viewBox="0 0 20 22" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M10.75 3.5C10.75 3.08579 10.4142 2.75 10 2.75C9.58579 2.75 9.25 3.08579 9.25 3.5V4.25H8.5C8.08579 4.25 7.75 4.58579 7.75 5C7.75 5.41421 8.08579 5.75 8.5 5.75H9.25V6.5C9.25 6.91421 9.58579 7.25 10 7.25C10.4142 7.25 10.75 6.91421 10.75 6.5V5.75H11.5C11.9142 5.75 12.25 5.41421 12.25 5C12.25 4.58579 11.9142 4.25 11.5 4.25H10.75V3.5Z" fill="#8F9AA3"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.948 0.250001H10.052C10.9505 0.249973 11.6997 0.249949 12.2945 0.329915C12.9223 0.414319 13.4891 0.59999 13.9445 1.05546C14.4 1.51093 14.5857 2.07773 14.6701 2.70552C14.695 2.8911 14.7122 3.09172 14.724 3.30721C15.8622 3.43478 16.7867 3.726 17.506 4.44741C18.1807 5.12414 18.476 5.97933 18.6152 7.01799C18.75 8.02371 18.75 9.30621 18.75 10.9137V19.75H19C19.5523 19.75 20 20.1977 20 20.75C20 21.3023 19.5523 21.75 19 21.75H1C0.447715 21.75 0 21.3023 0 20.75C0 20.1977 0.447715 19.75 1 19.75H1.25V10.9137C1.24998 9.30618 1.24997 8.02371 1.38479 7.01799C1.52403 5.97933 1.81927 5.12414 2.49402 4.44741C3.21333 3.726 4.13778 3.43478 5.27599 3.30721C5.2878 3.09172 5.30496 2.8911 5.32991 2.70552C5.41432 2.07773 5.59999 1.51093 6.05546 1.05546C6.51093 0.59999 7.07773 0.414319 7.70552 0.329915C8.3003 0.249949 9.04954 0.249973 9.948 0.250001ZM7.90539 1.81654C7.44393 1.87858 7.24644 1.9858 7.11612 2.11612C6.9858 2.24644 6.87858 2.44393 6.81654 2.9054C6.7516 3.38843 6.75 4.03599 6.75 5C6.75 5.96402 6.7516 6.61157 6.81654 7.09461C6.87858 7.55607 6.9858 7.75357 7.11612 7.88389C7.24644 8.0142 7.44393 8.12143 7.90539 8.18347C8.38843 8.24841 9.03599 8.25 10 8.25C10.964 8.25 11.6116 8.24841 12.0946 8.18347C12.5561 8.12143 12.7536 8.0142 12.8839 7.88389C13.0142 7.75357 13.1214 7.55607 13.1835 7.09461C13.2484 6.61157 13.25 5.96402 13.25 5C13.25 4.03599 13.2484 3.38843 13.1835 2.9054C13.1214 2.44393 13.0142 2.24644 12.8839 2.11612C12.7536 1.9858 12.5561 1.87858 12.0946 1.81654C11.6116 1.7516 10.964 1.75 10 1.75C9.03599 1.75 8.38843 1.7516 7.90539 1.81654ZM13.25 19.75V18.4678C13.25 18.028 13.25 17.6486 13.2218 17.3374C13.192 17.0082 13.1259 16.6822 12.9486 16.375C12.7511 16.033 12.467 15.7489 12.125 15.5514C11.8178 15.3741 11.4918 15.308 11.1627 15.2782C10.8514 15.25 10.472 15.25 10.0323 15.25C9.59247 15.25 9.14865 15.25 8.83735 15.2782C8.50817 15.308 8.18221 15.3741 7.875 15.5514C7.53296 15.7489 7.24892 16.033 7.05145 16.375C6.87408 16.6822 6.80802 17.0082 6.77818 17.3374C6.74997 17.6486 6.74998 18.028 6.75 18.4677V19.75H8.25V18.5C8.25 18.0189 8.25072 17.7082 8.27206 17.4727C8.30149 17.2392 8.42234 16.7721 8.97275 16.7721C9.2082 16.7507 9.51889 16.75 10 16.75C10.4811 16.75 10.7918 16.7507 11.0273 16.7721C11.2608 16.7843 11.7279 16.9415 11.7279 17.4727C11.7493 17.7082 11.75 18.0189 11.75 18.5V19.75H13.25ZM5 12C5 11.4477 5.44772 11 6 11H6.00896C6.56125 11 7.00896 11.4477 7.00896 12C7.00896 12.5523 6.56125 13 6.00896 13H6C5.44772 13 5 12.5523 5 12ZM8.99104 12C8.99104 11.4477 9.43875 11 9.99104 11H10C10.5523 11 11 11.4477 11 12C11 12.5523 10.5523 13 10 13H9.99104C9.43875 13 8.99104 12.5523 8.99104 12ZM12.9922 12C12.9922 11.4477 13.4399 11 13.9922 11H14.0011C14.5534 11 15.0011 11.4477 15.0011 12C15.0011 12.5523 14.5534 13 14.0011 13H13.9922C13.4399 13 12.9922 12.5523 12.9922 12Z" fill="#8F9AA3"/>
</svg>

After

Width:  |  Height:  |  Size: 3.3 KiB

@ -0,0 +1,4 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M8.25 12C8.25 9.92893 9.92893 8.25 12 8.25C14.0711 8.25 15.75 9.92893 15.75 12C15.75 14.0711 14.0711 15.75 12 15.75C9.92893 15.75 8.25 14.0711 8.25 12Z" fill="#2E3039"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M11 2.55344C6.5584 3.02457 3.03052 6.55653 2.56568 11H1.5C0.947715 11 0.5 11.4477 0.5 12C0.5 12.5523 0.947715 13 1.5 13H2.56568C3.03052 17.4435 6.5584 20.9754 11 21.4466V22.5C11 23.0523 11.4477 23.5 12 23.5C12.5523 23.5 13 23.0523 13 22.5V21.4494C17.4545 20.9899 20.9959 17.4526 21.4617 13H22.5C23.0523 13 23.5 12.5523 23.5 12C23.5 11.4477 23.0523 11 22.5 11H21.4617C20.9959 6.54742 17.4545 3.01008 13 2.55058V1.5C13 0.947715 12.5523 0.5 12 0.5C11.4477 0.5 11 0.947715 11 1.5V2.55344ZM19.5121 11.8441C19.4291 7.77393 16.1037 4.5 12.0137 4.5C7.87154 4.5 4.51367 7.85786 4.51367 12C4.51367 16.1421 7.87154 19.5 12.0137 19.5C16.1037 19.5 19.4291 16.2261 19.5121 12.1559C19.5041 12.1051 19.5 12.053 19.5 12C19.5 11.947 19.5041 11.8949 19.5121 11.8441Z" fill="#2E3039"/>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.52381 1.99594C10.3597 1.52688 11.1339 1.25 12 1.25C12.8661 1.25 13.6403 1.52688 14.4762 1.99594C15.2861 2.45043 16.2141 3.12145 17.3811 3.96522L18.8902 5.05633C19.8267 5.73347 20.5747 6.2743 21.1389 6.77487C21.7215 7.29173 22.1573 7.807 22.4337 8.45513C22.7108 9.10469 22.7778 9.77045 22.7406 10.5381C22.7047 11.2789 22.5674 12.1726 22.3961 13.2871L22.0808 15.3387C21.8374 16.9225 21.6437 18.1837 21.359 19.1662C21.0646 20.1821 20.6499 20.9887 19.9086 21.6052C19.1704 22.2192 18.2911 22.4926 17.2169 22.6231C16.172 22.75 14.8539 22.75 13.1889 22.75H10.8111C9.14615 22.75 7.828 22.75 6.78306 22.6231C5.7089 22.4926 4.82957 22.2192 4.0914 21.6052C3.35016 20.9887 2.93544 20.1821 2.64105 19.1662C2.35635 18.1836 2.16256 16.9225 1.91918 15.3387L1.60393 13.2872C1.43264 12.1727 1.29528 11.2789 1.25941 10.5381C1.22225 9.77045 1.28925 9.10469 1.5663 8.45513C1.84274 7.807 2.27855 7.29173 2.86109 6.77487C3.42528 6.27429 4.1733 5.73346 5.10984 5.05632L6.61887 3.96524C7.78586 3.12145 8.7139 2.45043 9.52381 1.99594ZM9.6143 16.2109C9.17849 15.8717 8.55018 15.95 8.21094 16.3858C7.87169 16.8216 7.94998 17.4499 8.38579 17.7892C9.36407 18.5507 10.6313 19 12 19C13.3688 19 14.636 18.5507 15.6143 17.7892C16.0501 17.4499 16.1284 16.8216 15.7892 16.3858C15.4499 15.95 14.8216 15.8717 14.3858 16.2109C13.765 16.6942 12.9318 17 12 17C11.0683 17 10.2351 16.6942 9.6143 16.2109Z" fill="#8F9AA3"/>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.99999 4.10813C6.99999 4.06224 7.01188 4.0322 7.02257 4.01468L8.96556 4.55048C8.96719 4.55226 8.96937 4.55488 8.97198 4.55857C8.985 4.57696 8.99999 4.61158 8.99999 4.65966V5.25392H6.99999V4.10813ZM4.99999 5.25392V4.10813C4.99999 2.86523 6.11589 1.68999 7.50837 2.07399L9.50837 2.62552C10.4423 2.88307 11 3.76341 11 4.65966V5.25392L19.6307 5.25392H19.6307H19.6307H19.6307H19.6307H19.6307C19.8236 5.2538 19.9944 5.2537 20.1611 5.27894C20.9262 5.39481 21.5605 5.89162 21.9747 6.55768C22.0654 6.70354 22.1992 6.97493 22.3125 7.20493C22.4749 7.53409 22.6067 7.80089 22.6673 8.0305C22.8068 8.55857 22.7646 9.11006 22.5804 9.57564C22.3995 10.0329 22.0442 10.4884 21.4931 10.6747C21.3326 10.729 21.1733 10.7423 21.0509 10.7481C20.9283 10.754 20.7783 10.7539 20.6125 10.7539H19.6618C19.626 10.7855 19.5875 10.8148 19.5464 10.8416L13.8307 14.5692L16.5786 16.3613C17.0016 16.1333 17.4857 16.0039 18 16.0039C19.6568 16.0039 21 17.3471 21 19.0039C21 20.6608 19.6568 22.0039 18 22.0039C16.3431 22.0039 15 20.6608 15 19.0039C15 18.6009 15.0795 18.2164 15.2236 17.8654L12.0001 15.7631L8.77645 17.8655C8.92054 18.2165 8.99999 18.6009 8.99999 19.0039C8.99999 20.6608 7.65685 22.0039 5.99999 22.0039C4.34314 22.0039 2.99999 20.6608 2.99999 19.0039C2.99999 17.3471 4.34314 16.0039 5.99999 16.0039C6.51432 16.0039 6.99843 16.1333 7.42151 16.3614L10.1695 14.5692L4.45384 10.8416C4.4127 10.8148 4.37419 10.7855 4.33838 10.7539H3.38746C3.22172 10.7539 3.07169 10.754 2.94909 10.7481C2.82667 10.7423 2.66741 10.7289 2.50685 10.6747C1.95584 10.4884 1.60047 10.0329 1.41958 9.57564C1.2354 9.11006 1.19324 8.55857 1.3327 8.0305C1.39334 7.80087 1.57882 7.42503 1.74134 7.09583C1.85459 6.86592 1.9346 6.70351 2.02529 6.55768C2.43953 5.89162 3.07376 5.39481 3.83887 5.27894C4.00559 5.2537 4.17642 5.2538 4.36934 5.25392H4.99999ZM12.0001 13.3754L16.0196 10.7539L7.98058 10.7539L12.0001 13.3754ZM4.99999 19.0039C4.99999 18.4516 5.44771 18.0039 5.99999 18.0039C6.55227 18.0039 6.99999 18.4516 6.99999 19.0039C6.99999 19.5562 6.55227 20.0039 5.99999 20.0039C5.44771 20.0039 4.99999 19.5562 4.99999 19.0039ZM18 18.0039C17.4477 18.0039 17 18.4516 17 19.0039C17 19.5562 17.4477 20.0039 18 20.0039C18.5523 20.0039 19 19.5562 19 19.0039C19 18.4516 18.5523 18.0039 18 18.0039Z" fill="#8F9AA3"/>
</svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

@ -0,0 +1,5 @@
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M3.63118 6.01181C4.53906 3.8287 6.71223 2.4375 9.00039 2.4375C11.2886 2.4375 13.4617 3.8287 14.3696 6.01181C15.2138 8.04171 14.7559 9.77547 13.808 11.2524C13.0253 12.4719 11.8795 13.5576 10.8604 14.5234L10.8596 14.5241C10.6796 14.6948 10.503 14.8621 10.3336 15.0253C9.97557 15.3701 9.49748 15.5625 9.00039 15.5625C8.50331 15.5625 8.02525 15.3701 7.66725 15.0253L7.66603 15.0241C7.48649 14.8502 7.29928 14.6721 7.10766 14.4899C6.09934 13.5308 4.96915 12.4559 4.19455 11.2517C3.24546 9.77623 2.78598 8.04422 3.63118 6.01181ZM6.75 8.25C6.75 7.00736 7.75736 6 9 6C10.2426 6 11.25 7.00736 11.25 8.25C11.25 9.49264 10.2426 10.5 9 10.5C7.75736 10.5 6.75 9.49264 6.75 8.25Z" fill="#ED1C2B"/>
<path d="M2.81167 5.54998C2.97724 5.1703 2.80367 4.72829 2.42399 4.56271C2.0443 4.39714 1.60229 4.57071 1.43672 4.9504C0.521094 7.05006 0.521095 9.45145 1.43672 11.5511C1.60229 11.9308 2.0443 12.1044 2.42399 11.9388C2.80367 11.7732 2.97724 11.3312 2.81167 10.9515C2.06278 9.2342 2.06278 7.26731 2.81167 5.54998Z" fill="#ED1C2B"/>
<path d="M16.5633 4.9504C16.3977 4.57071 15.9557 4.39714 15.576 4.56271C15.1963 4.72829 15.0228 5.1703 15.1883 5.54998C15.9372 7.26731 15.9372 9.2342 15.1883 10.9515C15.0228 11.3312 15.1963 11.7732 15.576 11.9388C15.9557 12.1044 16.3977 11.9308 16.5633 11.5511C17.4789 9.45145 17.4789 7.05006 16.5633 4.9504Z" fill="#ED1C2B"/>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M20.7495 11.9996C20.7495 11.6261 20.5839 11.2795 20.427 11.0193C20.2577 10.7384 20.0301 10.4485 19.7803 10.1658C19.2794 9.59877 18.6257 8.98979 17.9913 8.43892C17.3532 7.88481 16.7173 7.3746 16.2423 7.00383C16.0044 6.81813 15.8059 6.6667 15.6665 6.56138C15.5968 6.50871 15.5418 6.46754 15.5039 6.43935L15.4604 6.40696L15.4488 6.39841L15.4448 6.39545C15.1113 6.14979 14.6414 6.22068 14.3957 6.55418C14.1501 6.88767 14.2213 7.35715 14.5547 7.60282L14.5674 7.61223L14.6075 7.642C14.6429 7.6684 14.6953 7.70764 14.7623 7.75825C14.8964 7.85951 15.0885 8.0061 15.3193 8.18628C15.7818 8.54725 16.3959 9.04014 17.0078 9.57149C17.6234 10.1061 18.2197 10.6649 18.6562 11.159C18.6838 11.1902 18.7105 11.2209 18.7364 11.2511L3.99951 11.2511C3.5853 11.2511 3.24951 11.5869 3.24951 12.0011C3.24951 12.4153 3.5853 12.7511 3.99951 12.7511L18.7338 12.7511C18.7088 12.7803 18.6829 12.81 18.6562 12.8403C18.2197 13.3343 17.6234 13.8932 17.0078 14.4277C16.3959 14.9591 15.7818 15.452 15.3193 15.813C15.0885 15.9931 14.8964 16.1397 14.7623 16.241C14.6953 16.2916 14.6429 16.3308 14.6075 16.3572L14.5674 16.387L14.5547 16.3964C14.2213 16.6421 14.1501 17.1116 14.3957 17.4451C14.6414 17.7786 15.1113 17.8495 15.4448 17.6038L15.4488 17.6008L15.4604 17.5923L15.5039 17.5599C15.5418 17.5317 15.5968 17.4905 15.6665 17.4379C15.8059 17.3325 16.0044 17.1811 16.2423 16.9954C16.7173 16.6246 17.3532 16.1144 17.9913 15.5603C18.6257 15.0095 19.2794 14.4005 19.7803 13.8334C20.0301 13.5507 20.2577 13.2608 20.427 12.98C20.5829 12.7213 20.7475 12.3773 20.7495 12.0063" fill="#ED1C2B"/>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

@ -0,0 +1,5 @@
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M8.61828 8.81338C8.56618 8.81254 8.50595 8.81251 8.43164 8.81251C8.12098 8.81251 7.86914 8.56067 7.86914 8.25001C7.86914 7.93935 8.12098 7.68751 8.43164 7.68751L8.45747 7.68751C8.61131 7.68745 8.77766 7.68738 8.91807 7.70626C9.08256 7.72837 9.2927 7.78525 9.46955 7.9621C9.6464 8.13895 9.70328 8.34909 9.7254 8.51358C9.74427 8.654 9.74421 8.82034 9.74415 8.97418L9.74414 12.75C9.74414 13.0607 9.4923 13.3125 9.18164 13.3125C8.87098 13.3125 8.61914 13.0607 8.61914 12.75L8.61914 9.00001C8.61914 8.9257 8.61912 8.86547 8.61828 8.81338Z" fill="#ED1C2B"/>
<path d="M8.99414 5.25C8.57993 5.25 8.24414 5.58579 8.24414 6C8.24414 6.41421 8.57993 6.75 8.99414 6.75H9.00088C9.41509 6.75 9.75088 6.41421 9.75088 6C9.75088 5.58579 9.41509 5.25 9.00088 5.25H8.99414Z" fill="#ED1C2B"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M0.9375 9C0.9375 13.4528 4.5472 17.0625 9 17.0625C13.4528 17.0625 17.0625 13.4528 17.0625 9C17.0625 4.5472 13.4528 0.9375 9 0.9375C4.5472 0.9375 0.9375 4.5472 0.9375 9ZM9 15.9375C5.16852 15.9375 2.0625 12.8315 2.0625 9C2.0625 5.16852 5.16852 2.0625 9 2.0625C12.8315 2.0625 15.9375 5.16852 15.9375 9C15.9375 12.8315 12.8315 15.9375 9 15.9375Z" fill="#ED1C2B"/>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

@ -96,7 +96,7 @@ class ApiClientImp implements ApiClient {
bool isExternal = false,
bool isRCService = false,
bool isPaymentServices = false,
bool bypassConnectionCheck = false,
bool bypassConnectionCheck = true,
}) async {
String url;
if (isExternal) {

@ -159,6 +159,17 @@ class AppAssets {
static const String nearest_er_icon = '$svgBasePath/nearest_er_icon.svg';
static const String rrt_icon = '$svgBasePath/rrt_icon.svg';
static const String waiting_time_clock = '$svgBasePath/waiting_time_clock.svg';
static const String location_pickup = '$svgBasePath/location_pickup.svg';
static const String locate_me = '$svgBasePath/locate_me.svg';
static const String pickup_bed = '$svgBasePath/pickup_bed.svg';
static const String hospital = '$svgBasePath/hospital.svg';
static const String down_cheveron = '$svgBasePath/down_cheveron.svg';
static const String warning = '$svgBasePath/warning.svg';
static const String share_location = '$svgBasePath/share_location.svg';
static const String to_arrow = '$svgBasePath/to_arrow.svg';
static const String dual_arrow = '$svgBasePath/to_arrow.svg';
static const String forward_arrow_medium = '$svgBasePath/forward_arrow_medium.svg';
//bottom navigation//
static const String homeBottom = '$svgBasePath/home_bottom.svg';

@ -1,6 +1,8 @@
import 'dart:async';
import 'dart:io';
import 'package:easy_localization/easy_localization.dart';
import 'package:gms_check/gms_check.dart';
import 'package:hmg_patient_app_new/core/common_models/privilege/HMCProjectListModel.dart';
import 'package:hmg_patient_app_new/core/common_models/privilege/PrivilegeModel.dart';
import 'package:hmg_patient_app_new/core/common_models/privilege/ProjectDetailListModel.dart';
@ -16,7 +18,9 @@ import '../features/authentication/models/request_models/registration_payload_mo
class AppState {
NavigationService navigationService;
AppState({required this.navigationService});
AppState({required this.navigationService}){
checkIfGMSAvailableOrNot();
}
double userLat = 0.0;
@ -39,6 +43,8 @@ class AppState {
int? _superUserID;
bool isChildLoggedIn = false;
bool isGMSAvailable = true;
bool isAndroid = true;
void setAuthenticatedUser(AuthenticatedUser? authenticatedUser, {bool isFamily = false}) {
if (isFamily) {
@ -49,6 +55,15 @@ class AppState {
}
}
FutureOr<void> checkIfGMSAvailableOrNot() async {
if(Platform.isIOS) {
isGMSAvailable = false;
isAndroid = false;
return;
}
isGMSAvailable = (await GmsCheck().checkGmsAvailability()) ?? true;
}
AuthenticatedUser? getAuthenticatedUser({bool isFamily = false}) {
if (isFamily) {
return _authenticatedChildUser;

@ -278,7 +278,7 @@ extension EmailValidator on String {
height: 1, color: color ?? AppColors.blackColor, fontSize: 22.f, letterSpacing: -1, fontWeight: isBold ? FontWeight.bold : FontWeight.normal),
);
Widget toText24({Color? color, bool isBold = false, bool isCenter = false}) => Text(
Widget toText24({Color? color, bool isBold = false, bool isCenter = false, FontWeight? fontWeight}) => Text(
this,
textAlign: isCenter ? TextAlign.center : null,
style: TextStyle(

@ -1,15 +1,20 @@
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart' as GMSMapServices;
import 'package:hmg_patient_app_new/core/app_state.dart';
import 'package:hmg_patient_app_new/core/location_util.dart';
import 'package:hmg_patient_app_new/features/emergency_services/emergency_services_repo.dart';
import 'package:hmg_patient_app_new/features/emergency_services/model/resp_model/ProjectAvgERWaitingTime.dart';
import 'package:hmg_patient_app_new/features/emergency_services/models/resp_models/rrt_procedures_response_model.dart';
import 'package:hmg_patient_app_new/presentation/emergency_services/call_ambulance/call_ambulance_page.dart';
import 'package:hmg_patient_app_new/presentation/emergency_services/nearest_er_page.dart';
import 'package:hmg_patient_app_new/services/error_handler_service.dart';
import 'package:hmg_patient_app_new/services/navigation_service.dart';
import 'package:hmg_patient_app_new/widgets/expandable_bottom_sheet/model/BottomSheetType.dart';
import 'package:hmg_patient_app_new/widgets/routes/custom_page_route.dart';
import 'package:huawei_map/huawei_map.dart' as HMSCameraServices;
import 'package:url_launcher/url_launcher.dart';
class EmergencyServicesViewModel extends ChangeNotifier {
@ -27,6 +32,8 @@ class EmergencyServicesViewModel extends ChangeNotifier {
late RRTProceduresResponseModel selectedRRTProcedure;
BottomSheetType bottomSheetType = BottomSheetType.FIXED;
setSelectedRRTProcedure(RRTProceduresResponseModel procedure) {
selectedRRTProcedure = procedure;
notifyListeners();
@ -40,6 +47,12 @@ class EmergencyServicesViewModel extends ChangeNotifier {
required this.appState,
});
get isGMSAvailable
{
return appState.isGMSAvailable;
}
Future<void> getRRTProcedures({Function(dynamic)? onSuccess, Function(String)? onError}) async {
RRTProceduresList.clear();
notifyListeners();
@ -134,4 +147,48 @@ class EmergencyServicesViewModel extends ChangeNotifier {
},
);
}
GMSMapServices.CameraPosition getGMSLocation() {
return GMSMapServices.CameraPosition(
target: GMSMapServices.LatLng(appState.userLat, appState.userLong), zoom: 18);
}
handleGMSMapCameraMoved(GMSMapServices.CameraPosition value) {
//todo handle the camera moved position for GMS devices
}
HMSCameraServices.CameraPosition getHMSLocation() {
return HMSCameraServices.CameraPosition(
target: HMSCameraServices.LatLng(appState.userLat, appState.userLong),zoom: 18);
}
handleHMSMapCameraMoved(HMSCameraServices.CameraPosition value) {
//todo handle the camera moved position for HMS devices
}
void navigateTOAmbulancePage() {
locationUtils!.getLocation(
isShowConfirmDialog: true,
onSuccess: (position) {
updateBottomSheetState(BottomSheetType.FIXED);
navServices.push(
CustomPageRoute(
page: CallAmbulancePage(), direction: AxisDirection.down
),
);
});
}
void updateBottomSheetState(BottomSheetType sheetType) {
bottomSheetType = sheetType;
notifyListeners();
}
void setIsGMSAvailable(bool value) {
notifyListeners();
}
}

@ -0,0 +1,452 @@
import 'dart:io';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart';
import 'package:hmg_patient_app_new/core/app_export.dart';
import 'package:hmg_patient_app_new/core/utils/utils.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/emergency_services/emergency_services_view_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/emergency_services/call_ambulance/requesting_services_page.dart' show RequestingServicesPage;
import 'package:hmg_patient_app_new/presentation/emergency_services/call_ambulance/tracking_screen.dart' show TrackingScreen;
import 'package:hmg_patient_app_new/presentation/emergency_services/call_ambulance/widgets/HospitalBottomSheetBody.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/CustomSwitch.dart';
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
import 'package:hmg_patient_app_new/widgets/expandable_bottom_sheet/ExpandableBottomSheet.dart';
import 'package:hmg_patient_app_new/widgets/expandable_bottom_sheet/model/BottomSheetType.dart';
import 'package:hmg_patient_app_new/widgets/input_widget.dart';
import 'package:hmg_patient_app_new/widgets/map/HMSMap.dart';
import 'package:hmg_patient_app_new/widgets/map/map.dart';
import 'package:hmg_patient_app_new/widgets/routes/custom_page_route.dart';
import 'package:provider/provider.dart';
import '../../../widgets/common_bottom_sheet.dart';
import 'widgets/AddressItem.dart';
class CallAmbulancePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
bottomSheet: ExpandableBottomSheet(
bottomSheetType:
context.watch<EmergencyServicesViewModel>().bottomSheetType,
children: {
BottomSheetType.EXPANDED: ExpanedBottomSheet(context),
BottomSheetType.FIXED: FixedBottomSheet(context),
},
),
body: Stack(
children: [
if (context.read<EmergencyServicesViewModel>().isGMSAvailable ||
Platform.isIOS)
GMSMap(
currentLocation:
context.read<EmergencyServicesViewModel>().getGMSLocation(),
onCameraMoved: (value) => context
.read<EmergencyServicesViewModel>()
.handleGMSMapCameraMoved(value))
else
HMSMap(
currentLocation:
context.read<EmergencyServicesViewModel>().getHMSLocation(),
onCameraMoved: (value) => context
.read<EmergencyServicesViewModel>()
.handleHMSMapCameraMoved(value)),
Align(
alignment: AlignmentDirectional.topStart,
child: Utils.buildSvgWithAssets(
icon: AppAssets.closeBottomNav, width: 32.h, height: 32.h),
).paddingOnly(top: 51.h, left: 24.h).onPress((){
Navigator.pop(context);
})
],
),
);
}
Widget FixedBottomSheet(BuildContext context) {
return GestureDetector(
onVerticalDragUpdate: (details){
print("the delta is ${details.delta.dy}");
if(details.delta.dy<0){
context.read<EmergencyServicesViewModel>().updateBottomSheetState(BottomSheetType.EXPANDED);
}
},
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Padding(
padding: EdgeInsetsDirectional.only(end:24.h, bottom: 24.h),
child: DecoratedBox(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor, borderRadius: 12.h),
child: Utils.buildSvgWithAssets(
icon: AppAssets.locate_me, width: 24.h, height: 24.h)
.paddingAll(12.h),
),
),
],
),
// PositionedDirectional(
// end: 1,
// child: Padding(
// padding: EdgeInsetsDirectional.only(end:24.h, bottom: 24.h),
// child: DecoratedBox(
// decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
// color: AppColors.whiteColor, borderRadius: 12.h),
// child: Utils.buildSvgWithAssets(
// icon: AppAssets.locate_me, width: 24.h, height: 24.h)
// .paddingAll(12.h),
// ),
// ),
// ),
// .paddingOnly(right: 24.h, bottom: 24.h),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
spacing: 24.h,
children: [
TextInputWidget(
labelText: "Enter Pickup Location Manually".needTranslation,
hintText: "Enter Pickup Location".needTranslation,
leadingIcon: AppAssets.location_pickup,
isAllowLeadingIcon: true,
isEnable: false,
prefix: null,
autoFocus: false,
isBorderAllowed: false,
keyboardType: TextInputType.text,
padding: EdgeInsets.symmetric(
vertical: ResponsiveExtension(10).h,
horizontal: ResponsiveExtension(15).h,
),
).onPress(() {
context
.read<EmergencyServicesViewModel>()
.updateBottomSheetState(BottomSheetType.EXPANDED);
}).paddingOnly(right: 24.h, left: 24.h),
SizedBox(
height: 200.h,
child: DecoratedBox(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.scaffoldBgColor,
customBorder: BorderRadius.only(
topLeft: Radius.circular(24.h),
topRight: Radius.circular(24.h),
),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
spacing: 24.h,
children: [
Column(
spacing: 4.h,
children: [
"Select Pickup Location".needTranslation.toText21(
weight: FontWeight.w600,
color: AppColors.textColor,
),
" Please select the location of pickup"
.needTranslation
.toText12(
fontWeight: FontWeight.w500,
color: AppColors.greyTextColor,
)
],
),
CustomButton(
text: "Select Location".needTranslation,
onPressed: () {
context
.read<EmergencyServicesViewModel>()
.updateBottomSheetState(BottomSheetType.EXPANDED);
})
],
).paddingOnly(top: 24.h, bottom: 32.h, left: 24.h, right: 24.h),
),
),
],
),
],
),
);
}
Widget ExpanedBottomSheet(BuildContext context) {
return GestureDetector(
onVerticalDragUpdate: (details){
if(details.delta.dy>0){
context.read<EmergencyServicesViewModel>().updateBottomSheetState(BottomSheetType.FIXED);
}
},
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
DecoratedBox(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.scaffoldBgColor,
customBorder: BorderRadius.only(
topLeft: Radius.circular(24.h),
topRight: Radius.circular(24.h),
),
),
child: Column(
children: [
SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
spacing: 16.h,
children: [
"Select Pickup Location".needTranslation.toText21(
weight: FontWeight.w600,
color: AppColors.textColor,
),
locationsSections(context),
hospitalAndPickUpSection(context),
],
).paddingOnly(top: 24.h, bottom: 32.h,left: 24.h, right: 24.h),
),
bottomPriceContent(context)
],
),
),
],
),
);
}
locationsSections(BuildContext context) {
return DecoratedBox(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor,
borderRadius: 24.h,
),
child: Column(mainAxisSize: MainAxisSize.min, children: [
ListView.separated(
separatorBuilder: (_, __) => Column(
children: [
SizedBox(height: 16.h),
Divider(
color: AppColors.bottomNAVBorder,
height: 1,
thickness: 1,
),
SizedBox(height: 16.h),
],
),
shrinkWrap: true,
itemCount: 3,
itemBuilder: (__, index) {
if (index ==
2) // todo means the end of the list so handle as per the viewmodel
{
return CustomButton(
height: 40.h,
backgroundColor: AppColors.lightRedButtonColor,
borderColor: Colors.transparent,
text: "Add new address".needTranslation,
textColor: AppColors.primaryRedColor,
iconColor: AppColors.primaryRedColor,
onPressed: () {},
icon: AppAssets.add_icon);
} else {
return AddressItem(
isSelected: index == 0,
address:
"Flat No 301, Building No 12, Palm Spring Apartment, Sector 45, Gurugram, Haryana 122003",
title: index == 0
? "Home".needTranslation
: "Work".needTranslation,
onTap: () {},
);
}
})
]).paddingAll(16.h),
);
}
hospitalAndPickUpSection(BuildContext context) {
return DecoratedBox(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor,
borderRadius: 24.h,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
hospitalAndPickUpItemContent(
title: "Select Hospital".needTranslation,
subTitle: "hospital".needTranslation,
leadingIcon: AppAssets.hospital,
),
Utils.buildSvgWithAssets(icon: AppAssets.down_cheveron,
width: 24.h, height: 24.h)
.paddingAll(16.h)
],
).onPress((){
showHospitalBottomSheet(context);
}),
SizedBox(height: 16.h),
Divider(
color: AppColors.bottomNAVBorder,
height: 1,
thickness: 1,
),
SizedBox(height: 16.h),
Row(
children: [
hospitalAndPickUpItemContent(
title: "Pick".needTranslation,
subTitle: "Inside the home".needTranslation,
leadingIcon: AppAssets.pickup_bed,
),
CustomSwitch(
value: context.watch<EmergencyServicesViewModel>().isGMSAvailable,
onChanged: (value){
context.read<EmergencyServicesViewModel>().setIsGMSAvailable( value);
},
)
],
),
],
).paddingAll(16.h),
);
}
leadingIcon(String leadingIcon) {
return Container(
height: 40.h,
width: 40.h,
margin: EdgeInsets.only(right: 10.h),
padding: EdgeInsets.all(8.h),
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
borderRadius: 12.h,
color: AppColors.greyColor,
),
child: Utils.buildSvgWithAssets(icon: leadingIcon),
);
}
hospitalAndPickUpItemContent({
required String title,
required String subTitle,
required String leadingIcon,
}) {
return Expanded(
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
this.leadingIcon(leadingIcon),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
title.toText12(
color: AppColors.greyTextColor,
fontWeight: FontWeight.w500,
),
SizedBox(height: 2.h),
subTitle.toText14(
color: AppColors.textColor,
weight: FontWeight.w500,
),
],
),
),
],
),
);
}
bottomPriceContent(BuildContext context) {
return Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
DecoratedBox(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.scaffoldBgColor,
customBorder: BorderRadius.only(
topLeft: Radius.circular(24.h),
topRight: Radius.circular(24.h),
),
hasShadow: true
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
spacing: 12.h,
children: [
Row(
children: [
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
spacing: 4.h,
children: [
"Total amount to pay".needTranslation.toText18(
weight: FontWeight.w600,
color: AppColors.textColor,
),
Row(
children: [
Utils.buildSvgWithAssets(icon: AppAssets.warning,
height: 18.h, width: 18.h),
SizedBox(width: 4.h,),
"Amount will be paid at the hospital"
.needTranslation
.toText12(
fontWeight: FontWeight.w500,
color: AppColors.greyTextColor,
),
],
)
],
),
),
"\$250".toText24(
fontWeight: FontWeight.w600,
color: AppColors.textColor,
)
],
),
CustomButton(
text: "Submit Request".needTranslation,
onPressed: () {
Navigator.push(context, CustomPageRoute(page: RequestingServicesPage()));
})
],
).paddingOnly(top: 24.h, bottom: 12.h, left: 24.h, right: 24.h),
),
],
);
}
showHospitalBottomSheet(BuildContext context){
showCommonBottomSheetWithoutHeight(
title:
LocaleKeys.selectHospital.tr(),
context,
child: HospitalBottomSheetBody(),
isFullScreen: false,
isCloseButtonVisible: true,
hasBottomPadding: false,
backgroundColor: AppColors.bottomSheetBgColor,
callBackFunc: () {},
);
}
}

@ -0,0 +1,53 @@
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart';
import 'package:hmg_patient_app_new/core/app_export.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/presentation/emergency_services/call_ambulance/tracking_screen.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/routes/custom_page_route.dart'
show CustomPageRoute;
import 'package:lottie/lottie.dart';
class RequestingServicesPage extends StatefulWidget {
@override
State<RequestingServicesPage> createState() => _RequestingServicesPageState();
}
class _RequestingServicesPageState extends State<RequestingServicesPage> {
@override
void initState() {
Timer(Duration(seconds: 3), () {
Navigator.pushReplacement(
context, CustomPageRoute(page: TrackingScreen()));
});
super.initState();
}
@override
Widget build(BuildContext context) {
return Material(
color: AppColors.scaffoldBgColor,
child: Stack(
children: [
Lottie.asset(AppAnimations.loadingAnimation,
width: 80.h,
height: 80.h,
repeat: true,
reverse: false,
frameRate: FrameRate(60),
fit: BoxFit.fill)
.center,
Positioned(
bottom: 1,
child: "Submitting your request. \nPlease wait for a moment"
.needTranslation
.toText16(color: AppColors.textColor, weight: FontWeight.w500)
.paddingOnly(bottom: 100.h, left: 100.h, right: 100.h))
],
),
);
}
}

@ -0,0 +1,416 @@
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart';
import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
import 'package:hmg_patient_app_new/core/utils/utils.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/emergency_services/emergency_services_view_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
import 'package:hmg_patient_app_new/widgets/chip/app_custom_chip_widget.dart';
import 'package:hmg_patient_app_new/widgets/map/HMSMap.dart';
import 'package:hmg_patient_app_new/widgets/map/map.dart' show GMSMap;
import 'package:hmg_patient_app_new/widgets/order_tracking/order_tracking_state.dart';
import 'package:hmg_patient_app_new/widgets/order_tracking/request_tracking.dart';
import 'package:lottie/lottie.dart';
import 'package:provider/provider.dart';
class TrackingScreen extends StatelessWidget {
final OrderTrackingState state = OrderTrackingState.ended;
@override
Widget build(BuildContext context) {
return Scaffold(
bottomNavigationBar: Visibility(
visible: state == OrderTrackingState.ended,
child: SafeArea(
child: CustomButton(
height: 56.h,
backgroundColor: AppColors.bgGreenColor,
borderColor: Colors.transparent,
text: "Close".needTranslation,
textColor: AppColors.whiteColor,
onPressed: () {},
).paddingOnly(left:16.h,right:16.h),
),
),
body: CollapsingListView(
title: "Tracking Details".needTranslation,
child: SingleChildScrollView(
child: Column(
children: [
animationSection(),
Column(
spacing: 16.h,
children: [OrderStatus(context), OrderTrackingId(), ContactSection()],
).paddingAll(16.h),
],
))),
);
}
animationSection(){
switch (state) {
case OrderTrackingState.waitingForCall:
case OrderTrackingState.dispactched:
case OrderTrackingState.returning:
return Lottie.asset(AppAnimations.ambulance, repeat: true, reverse: false, width: 260.h, height: 200.h);
case OrderTrackingState.ended:
default:
return Lottie.asset(AppAnimations.checkmark, repeat: true, width: 260.h, height: 200.h);
}
}
OrderStatus(BuildContext context) {
return Container(
padding: EdgeInsets.all(16.h),
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor,
borderRadius: 20.h,
hasShadow: false,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
getTitle(state),
SizedBox(height: 12.h),
OrderTrackingWidget(
height: 6.h,
state: state,
parentPaddingValue: 16.h,
),
SizedBox(height: 24.h),
informationRegardingTrackingSection(),
trackingBottomSection(context)
],
),
);
}
Widget trackingBottomSection(BuildContext context) {
switch (state) {
case OrderTrackingState.waitingForCall:
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(height: 16,),
CustomButton(
text: "Cancel Request".needTranslation,
onPressed: () async {},
backgroundColor: AppColors.primaryRedColor,
borderColor: AppColors.primaryRedColor,
textColor: Colors.white,
icon: AppAssets.cancel,
),
],
);
case OrderTrackingState.dispactched:
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
spacing: 12.h,
children: [
dividerSection,
doctorSection(),
mapSection(context),
CustomButton(
height: 40.h,
backgroundColor: AppColors.lightRedButtonColor,
borderColor: Colors.transparent,
text: "Share Your Live Locatin on Whatsapp".needTranslation,
fontSize: 12.fSize,
textColor: AppColors.primaryRedColor,
iconColor: AppColors.primaryRedColor,
onPressed: () {},
icon: AppAssets.share_location,
),
],
);
case OrderTrackingState.returning:
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
spacing: 12.h,
children: [
dividerSection,
doctorSection(),
mapSection(context)
],
);
case OrderTrackingState.ended:
default:
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
spacing: 12.h,
children: [
dividerSection,
doctorSection(),
],
);
}
}
Widget get dividerSection => Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 16,
),
Divider(
thickness: 1.5.h,
color: AppColors.borderGrayColor,
),
SizedBox(
height: 4,
)
],
);
doctorSection() {
return Row(
spacing: 16.h,
children: [
Utils.buildImgWithNetwork(url: "", iconColor: Colors.transparent)
.circle(52.h),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"Dr. John Doe".toText16(
color: AppColors.textColor, weight: FontWeight.w600),
SizedBox(height: 4.h),
"MBBS, MD - General Medicine".toText12(
color: AppColors.greyTextColor, fontWeight: FontWeight.w500),
],
),
),
SizedBox(
height: 36.h,
width: 36.h,
child: CustomButton(
text: '',
iconSize: 16.h,
icon: AppAssets.call_fill,
onPressed: () {},
backgroundColor: AppColors.lightRedButtonColor,
iconColor: AppColors.primaryRedColor,
borderColor: Colors.transparent,
height: 36.h,
),
)
],
);
}
Widget mapForRequestedCoordinate(BuildContext context) {
// return SizedBox.shrink();
if (context.read<EmergencyServicesViewModel>().isGMSAvailable ||
Platform.isIOS)
return GMSMap(
myLocationEnabled: false,
currentLocation:
context.read<EmergencyServicesViewModel>().getGMSLocation(),
onCameraMoved: (value) => context
.read<EmergencyServicesViewModel>()
.handleGMSMapCameraMoved(value));
else
return HMSMap(
myLocationEnabled: false,
currentLocation:
context.read<EmergencyServicesViewModel>().getHMSLocation(),
onCameraMoved: (value) => context
.read<EmergencyServicesViewModel>()
.handleHMSMapCameraMoved(value));
}
informationRegardingTrackingSection() {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
currentStatus(),
SizedBox(height: 4.h),
"You will receive a call from HMG for confirmation ".toText12(
color: AppColors.greyTextColor, fontWeight: FontWeight.w500)
],
);
}
currentStatus() {
switch (state) {
case OrderTrackingState.waitingForCall:
case OrderTrackingState.dispactched:
return RichText(
text: TextSpan(children: <TextSpan>[
TextSpan(
text: "Please wait for the call".needTranslation,
style: TextStyle(
fontSize: 21.fSize,
fontWeight: FontWeight.w600,
color: AppColors.textColor,
),
),
TextSpan(
text: "...".needTranslation,
style: TextStyle(
fontSize: 21.fSize,
fontWeight: FontWeight.w600,
color: AppColors.errorColor,
),
),
]),
);
case OrderTrackingState.returning:
return RichText(
text: TextSpan(children: <TextSpan>[
TextSpan(
text: "15:30".needTranslation,
style: TextStyle(
fontSize: 21.fSize,
fontWeight: FontWeight.w600,
color: AppColors.textColor,
),
),
TextSpan(
text: " mins ".needTranslation,
style: TextStyle(
fontSize: 21.fSize,
fontWeight: FontWeight.w600,
color: AppColors.errorColor,
),
),
TextSpan(
text: "to hospital".needTranslation,
style: TextStyle(
fontSize: 21.fSize,
fontWeight: FontWeight.w600,
color: AppColors.textColor,
),
),
]),
);
case OrderTrackingState.ended:
default:
return "Arrived"
.needTranslation
.toText21(color: AppColors.textColor, weight: FontWeight.w600);
}
}
OrderTrackingId() {
return Container(
padding: EdgeInsets.all(16.h),
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor,
borderRadius: 20.h,
hasShadow: false,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
spacing: 8.h,
children: [
"Req ID:1234567890"
.toText16(color: AppColors.textColor, weight: FontWeight.w600),
Row(
spacing: 8.h,
children: [
Chip("location name".needTranslation, AppAssets.location_pickup,
AppColors.blackBgColor),
Chip("hotel name ".needTranslation, AppAssets.hospital,
AppColors.blackBgColor),
],
),
Chip("hotel name ".needTranslation, AppAssets.hospital,
AppColors.blackBgColor),
],
),
);
}
Chip(String title, String iconString, Color iconColor) {
return AppCustomChipWidget(
labelText: title,
icon: iconString,
iconColor: iconColor,
iconSize: 14.h,
);
}
ContactSection() {
return Container(
padding: EdgeInsets.all(16.h),
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor,
borderRadius: 20.h,
hasShadow: false,
),
child: Row(
children: [
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
spacing: 4.h,
children: [
"Contact Rapid Response Team (RRT)".needTranslation.toText14(
color: AppColors.textColor, weight: FontWeight.w600),
"1223456789".needTranslation.toText12(
color: AppColors.primaryRedColor,
fontWeight: FontWeight.w500),
SizedBox(height: 8.h),
],
),
),
SizedBox(
height: 36.h,
width: 36.h,
child: CustomButton(
text: '',
iconSize: 16.h,
icon: AppAssets.call_fill,
onPressed: () {},
backgroundColor: AppColors.lightRedButtonColor,
iconColor: AppColors.primaryRedColor,
borderColor: Colors.transparent,
height: 36.h,
),
)
],
),
);
}
// "c": {
// "a": 0,
// "k": [
// 1,
// 1,
// 1
// ]
// }
getTitle(OrderTrackingState state) {
switch (state) {
case OrderTrackingState.waitingForCall:
return "Confirmation Call".needTranslation
.toText16(color: AppColors.textColor, weight: FontWeight.w600);
case OrderTrackingState.dispactched:
return "Pickup Up from Home".needTranslation
.toText16(color: AppColors.textColor, weight: FontWeight.w600);
case OrderTrackingState.returning:
return " On The Way To Hospital".needTranslation
.toText16(color: AppColors.textColor, weight: FontWeight.w600);
case OrderTrackingState.ended:
default:
return "Arrived at Hospital".needTranslation
.toText16(color: AppColors.textColor, weight: FontWeight.w600);
}
}
mapSection(BuildContext context) {
return SizedBox(
height: 170.h,
width: double.infinity,
child: ClipRRect(
borderRadius: BorderRadius.circular(20.h),child: mapForRequestedCoordinate(context)),
);
}
}

@ -0,0 +1,86 @@
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart';
import 'package:hmg_patient_app_new/core/app_export.dart';
import 'package:hmg_patient_app_new/core/utils/utils.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
class AddressItem extends StatelessWidget {
final bool isSelected;
final String address;
final VoidCallback? onTap;
final String title;
const AddressItem(
{super.key,
required this.isSelected,
required this.address,
this.onTap,
required this.title});
@override
Widget build(BuildContext context) {
return Row(
children: [
SizedBox(
height: 18.h,
width: 18.h,
child: DecoratedBox(
decoration: BoxDecoration(
border: Border.all(
color: AppColors.bottomNAVBorder,
width: 1.5,
),
borderRadius: BorderRadius.circular(70.h)),
child: CircleAvatar(
radius: 70.h,
backgroundColor:
isSelected ? AppColors.errorLightColor : Colors.transparent,
).paddingAll(3.h),
),
),
SizedBox(width: 12.h),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
spacing: 2.h,
children: [
title.toText12(
color: AppColors.greyTextColor,
fontWeight: FontWeight.w500,
),
Row(
mainAxisSize: MainAxisSize.max,
children: [
Expanded(
child: address.toText14(
color: AppColors.textColor,
weight: FontWeight.w500,
textOverflow : TextOverflow.ellipsis,
maxlines: 2
),
),
],
)
],
),
),
Container(
height: 40.h,
width: 40.h,
margin: EdgeInsets.only(right: 10.h),
padding: EdgeInsets.all(8.h),
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
borderRadius: 10.h,
color: AppColors.greyColor,
),
child: Utils.buildSvgWithAssets(
fit: BoxFit.contain,
icon: AppAssets.location,
iconColor: AppColors.greyTextColor))
],
);
}
}

@ -0,0 +1,81 @@
import 'package:easy_localization/easy_localization.dart'
show tr, StringTranslateExtension;
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/enums.dart';
import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/book_appointments/book_appointments_view_model.dart';
import 'package:hmg_patient_app_new/features/my_appointments/appointment_via_region_viewmodel.dart';
import 'package:hmg_patient_app_new/features/my_appointments/models/facility_selection.dart';
import 'package:hmg_patient_app_new/features/my_appointments/my_appointments_view_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/appointments/widgets/hospital_bottom_sheet/hospital_list_items.dart';
import 'package:hmg_patient_app_new/presentation/emergency_services/call_ambulance/widgets/type_selection_widget.dart';
import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
import 'package:hmg_patient_app_new/theme/colors.dart' show AppColors;
import 'package:hmg_patient_app_new/widgets/input_widget.dart';
import 'package:provider/provider.dart';
class HospitalBottomSheetBody extends StatelessWidget {
final TextEditingController searchText = TextEditingController();
HospitalBottomSheetBody({super.key});
@override
Widget build(BuildContext context) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
TextInputWidget(
labelText: LocaleKeys.search.tr(),
hintText: LocaleKeys.searchHospital.tr(),
controller: searchText,
onChange: (value) {
},
isEnable: true,
prefix: null,
autoFocus: false,
isBorderAllowed: false,
keyboardType: TextInputType.text,
isAllowLeadingIcon: true,
selectionType: SelectionTypeEnum.search,
padding: EdgeInsets.symmetric(
vertical: ResponsiveExtension(10).h,
horizontal: ResponsiveExtension(15).h,
),
),
SizedBox(height: 24.h),
TypeSelectionWidget(
hmcCount: "0",
hmgCount: "0",
onitemClicked: (selectedValue){
},
),
SizedBox(height: 21.h),
SizedBox(
height: MediaQuery.sizeOf(context).height * .4,
child: ListView.separated(
itemBuilder: (_, index)
{
var hospital = null;
return HospitalListItem(
hospitalData: hospital,
isLocationEnabled: false,
).onPress(() {
});},
separatorBuilder: (_, __) => SizedBox(
height: 16.h,
),
itemCount: 0,
))
],
);
}
}

@ -0,0 +1,51 @@
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart' show AppAssets;
import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/presentation/emergency_services/call_ambulance/widgets/transport_option_Item.dart' show TransportOptionItem;
import 'package:hmg_patient_app_new/theme/colors.dart';
class AmbulanceOptionSelectionBottomSheet extends StatelessWidget {
final Function onTap;
const AmbulanceOptionSelectionBottomSheet({super.key, required this.onTap});
@override
Widget build(BuildContext context) {
return Column(
spacing: 16.h,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
TransportOptionItem(
title: "Home to Hospital (One Way)",
subTitle: "Pickup from home location to hospital",
firstIcon: AppAssets.location_pickup,
middleIcon:AppAssets.to_arrow,
lastIcon: AppAssets.hospital,
price: "150 AED",
onTap: (){onTap();},
),
TransportOptionItem(
title: "Hospital to Home (One Way)",
subTitle: "Pickup from hospital to home",
lastIcon: AppAssets.location_pickup,
middleIcon:AppAssets.to_arrow,
firstIcon: AppAssets.hospital,
price: "150 AED",
onTap: (){onTap();},
),
TransportOptionItem(
title: "Home to Hospital (Two Way)",
subTitle: "Pick from home to hospital then drop off to home",
firstIcon: AppAssets.location_pickup,
middleIcon:AppAssets.dual_arrow,
lastIcon: AppAssets.hospital,
price: "150 AED",
onTap: (){onTap();},
),
SizedBox(height: 16.h,)
],
);
}
}

@ -0,0 +1,100 @@
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart';
import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
import 'package:hmg_patient_app_new/core/utils/utils.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
class TransportOptionItem extends StatelessWidget {
final String title;
final String subTitle;
final String firstIcon;
final String middleIcon;
final String lastIcon;
final String price;
final VoidCallback onTap;
const TransportOptionItem(
{super.key,
required this.title,
required this.subTitle,
required this.firstIcon,
required this.middleIcon,
required this.lastIcon,
required this.price,
required this.onTap});
@override
Widget build(BuildContext context) {
return Container(
padding: EdgeInsets.all(16.h),
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor,
borderRadius: 20.h,
hasShadow: false,
),
child: Column(
spacing: 16.h,
children: [
headerSection(),
titleSection(),
],
)).onPress((){
onTap();
});
}
titleSection() {
return Row(
children: [
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
title.toText16(
color: AppColors.textColor, weight: FontWeight.w600),
subTitle.toText12(
color: AppColors.greyTextColor, fontWeight: FontWeight.w500),
],
),
),
Utils.buildSvgWithAssets(
icon: AppAssets.forward_arrow_medium, width: 24.h, height: 24.h)
],
);
}
headerSection() {
return Row(
children: [
Expanded(
child: Row(
children: [
buildIcon(firstIcon),
Utils.buildSvgWithAssets(
icon: middleIcon, width: 24.h, height: 24.h).paddingAll(8.h),
buildIcon(lastIcon)
],
),
),
price.toText18(color: AppColors.textColor, weight: FontWeight.w600)
],
);
}
buildIcon(String icon) {
return CustomButton(
text: '',
iconSize: 24.h,
icon: icon,
onPressed: () {},
backgroundColor: AppColors.greyColor,
iconColor: AppColors.greyTextColor,
borderColor: Colors.transparent,
height: 40.h,
);
}
}

@ -0,0 +1,79 @@
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/book_appointments/book_appointments_view_model.dart';
import 'package:hmg_patient_app_new/features/my_appointments/models/facility_selection.dart';
import 'package:hmg_patient_app_new/features/my_appointments/my_appointments_view_model.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/chip/app_custom_chip_widget.dart';
import 'package:provider/provider.dart' show Consumer;
class TypeSelectionWidget extends StatelessWidget {
final String hmcCount;
final String hmgCount;
final Function(String) onitemClicked;
const TypeSelectionWidget(
{super.key, required this.hmcCount, required this.hmgCount, required this.onitemClicked});
@override
Widget build(BuildContext context) {
return Row(
spacing: 8,
mainAxisSize: MainAxisSize.max,
children: [
AppCustomChipWidget(
labelText: "All Facilities".needTranslation,
shape: RoundedRectangleBorder(
side: BorderSide(
color: AppColors.errorColor
,
width: 1,
),
borderRadius: BorderRadius.circular(10)),
backgroundColor:
AppColors.secondaryLightRedColor
,
textColor: AppColors.errorColor
,
).onPress((){
onitemClicked(FacilitySelection.ALL.name);
}),
AppCustomChipWidget(
icon: AppAssets.hmg,
iconHasColor: false,
labelText: "Hospitals".needTranslation,
shape: RoundedRectangleBorder(
side: BorderSide(
color: AppColors.chipBorderColorOpacity20,
width: 1,
),
borderRadius: BorderRadius.circular(10)),
backgroundColor:
AppColors.whiteColor,
textColor: AppColors.blackColor,
).onPress((){
onitemClicked(FacilitySelection.HMG.name);
}),
AppCustomChipWidget(
icon: AppAssets.hmc,
iconHasColor: false,
labelText: "Medical Centers".needTranslation,
shape: RoundedRectangleBorder(
side: BorderSide(
color:AppColors.chipBorderColorOpacity20,
width: 1,
),
borderRadius: BorderRadius.circular(10)),
backgroundColor:
AppColors.whiteColor,
textColor: AppColors.blackColor,
).onPress((){
onitemClicked(FacilitySelection.HMC.name);
}),
],
);
}
}

@ -10,6 +10,8 @@ import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/emergency_services/emergency_services_view_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/emergency_services/RRT/rrt_request_type_select.dart';
import 'package:hmg_patient_app_new/presentation/emergency_services/call_ambulance/call_ambulance_page.dart';
import 'package:hmg_patient_app_new/presentation/emergency_services/call_ambulance/widgets/ambulance_option_selection_bottomsheet.dart';
import 'package:hmg_patient_app_new/presentation/emergency_services/nearest_er_page.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
@ -61,7 +63,93 @@ class EmergencyServicesPage extends StatelessWidget {
SizedBox(width: 12.h),
Utils.buildSvgWithAssets(icon: AppAssets.forward_chevron_icon, width: 13.h, height: 13.h),
],
),
).onPress(() {
showCommonBottomSheetWithoutHeight(
context,
child: Container(
decoration:
RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.primaryRedColor,
borderRadius: 24.h,
),
child: Padding(
padding: EdgeInsets.all(24.h),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
"".toText14(),
Utils.buildSvgWithAssets(
icon: AppAssets.cancel_circle_icon,
iconColor: AppColors.whiteColor,
width: 24.h,
height: 24.h,
fit: BoxFit.contain,
).onPress(() {
Navigator.of(context).pop();
}),
],
),
Lottie.asset(AppAnimations.ambulance_alert,
repeat: false,
reverse: false,
frameRate: FrameRate(60),
width: 120.h,
height: 120.h,
fit: BoxFit.contain),
SizedBox(height: 8.h),
"Confirmation".needTranslation.toText28(
color: AppColors.whiteColor, isBold: true),
SizedBox(height: 8.h),
"Are you sure you want to call an ambulance?"
.needTranslation
.toText14(
color: AppColors.whiteColor,
weight: FontWeight.w500),
SizedBox(height: 24.h),
CustomButton(
text: LocaleKeys.confirm.tr(context: context),
onPressed: () async {
//
Navigator.of(context).pop();
showCommonBottomSheetWithoutHeight(
title:
"Transport Options".needTranslation,
context,
child: AmbulanceOptionSelectionBottomSheet(
onTap: () {
Navigator.of(context).pop();
context
.read<EmergencyServicesViewModel>()
.navigateTOAmbulancePage();
}),
isFullScreen: false,
isCloseButtonVisible: true,
hasBottomPadding: false,
backgroundColor: AppColors.bottomSheetBgColor,
callBackFunc: () {},
);
},
backgroundColor: AppColors.whiteColor,
borderColor: AppColors.whiteColor,
textColor: AppColors.primaryRedColor,
icon: AppAssets.checkmark_icon,
iconColor: AppColors.primaryRedColor,
),
SizedBox(height: 8.h),
],
),
),
),
isFullScreen: false,
isCloseButtonVisible: false,
hasBottomPadding: false,
backgroundColor: AppColors.primaryRedColor,
callBackFunc: () {},
);
}),
),
SizedBox(height: 16.h),
Container(

@ -27,9 +27,11 @@ class AppTheme {
// primaryColorDark: primaryColor,
// toggleableActiveColor: secondaryColor,
// indicatorColor: secondaryColor,
bottomSheetTheme: const BottomSheetThemeData(
backgroundColor: Color(0xFFE0E0E0),
),
// bottomSheetTheme: const BottomSheetThemeData(
// backgroundColor: Color(0xFFE0E0E0),
// ),
bottomSheetTheme: BottomSheetThemeData(
backgroundColor: Colors.black.withOpacity(0)),
// primaryTextTheme: const TextTheme(
// bodyText2: TextStyle(color: Colors.white),
// ),

@ -76,4 +76,6 @@ static const Color labelTextColor = Color(0xFF838383);
static const Color calenderTextColor = Color(0xFFD0D0D0);
static const Color lightGreenButtonColor = Color(0x2618C273);
static const Color lightRedButtonColor = Color(0x1AED1C2B);
}

@ -0,0 +1,42 @@
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
class CustomSwitch extends StatefulWidget {
final bool value;
final ValueChanged<bool> onChanged;
const CustomSwitch({super.key, required this.value, required this.onChanged});
@override
State<CustomSwitch> createState() => _CustomSwitchState();
}
class _CustomSwitchState extends State<CustomSwitch> {
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: () => widget.onChanged(!widget.value),
child: Container(
width: 48.h,
height: 30.h,
decoration: BoxDecoration(
color: widget.value ? Color(0xFFE6F7F0) : Color(0xFFE6F7F0),
borderRadius: BorderRadius.circular(18),
),
child: AnimatedAlign(
duration: Duration(milliseconds: 200),
alignment: widget.value ? Alignment.centerRight : Alignment.centerLeft,
child: Container(
margin: EdgeInsets.all(4),
width: 28,
height: 28,
decoration: BoxDecoration(
color: Color(0xFF5FCB89),
shape: BoxShape.circle,
),
),
),
),
);
}
}

@ -0,0 +1,29 @@
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/widgets/expandable_bottom_sheet/model/BottomSheetType.dart';
class ExpandableBottomSheet extends StatelessWidget {
final BottomSheetType bottomSheetType;
final Map<BottomSheetType, Widget> children;
const ExpandableBottomSheet(
{super.key, required this.bottomSheetType, required this.children});
@override
Widget build(BuildContext context) {
print("the currently selected item is ${bottomSheetType}");
return AnimatedCrossFade(
duration: const Duration(milliseconds: 600),
firstChild:children[BottomSheetType.FIXED] ?? SizedBox.shrink(),
secondChild: children[BottomSheetType.EXPANDED] ?? const SizedBox.shrink(),
crossFadeState: BottomSheetType.FIXED == bottomSheetType ? CrossFadeState.showFirst : CrossFadeState.showSecond,
);
// switch (bottomSheetType) {
// case BottomSheetType.EXPANDED:
// return children[BottomSheetType.EXPANDED] ??
// SizedBox.shrink();
// case BottomSheetType.FIXED:
// return children[BottomSheetType.FIXED] ?? SizedBox.shrink();
// }
// return SizedBox.shrink();
}
}

@ -0,0 +1,4 @@
enum BottomSheetType {
EXPANDED,
FIXED,
}

@ -0,0 +1,41 @@
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:huawei_map/huawei_map.dart' ;
class HMSMap extends StatefulWidget{
final CameraPosition currentLocation;
final Function(CameraPosition) onCameraMoved;
final MapType mapType;
final bool compassEnabled;
final bool myLocationEnabled;
HMSMap({super.key, required this.currentLocation ,required this.onCameraMoved, this.mapType = MapType.normal,this.compassEnabled = false, this.myLocationEnabled = true});
@override
State<HMSMap> createState() => _HMSMapState();
}
class _HMSMapState extends State<HMSMap> {
final Completer<HuaweiMapController> _controller = Completer<HuaweiMapController>();
@override
void initState() {
HuaweiMapInitializer.initializeMap();
super.initState();
}
// @override
@override
Widget build(BuildContext context) =>
HuaweiMap(
mapType: widget.mapType,
zoomControlsEnabled: false,
myLocationEnabled: widget.myLocationEnabled,
compassEnabled: widget.compassEnabled,
initialCameraPosition: widget.currentLocation,
onCameraMove: (value) => widget.onCameraMoved(value),
onMapCreated: (HuaweiMapController controller) {
_controller.complete(controller);
},
);
}

@ -0,0 +1,32 @@
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
class GMSMap extends StatelessWidget{
final Completer<GoogleMapController> _controller = Completer<GoogleMapController>();
final CameraPosition currentLocation;
final Function(CameraPosition) onCameraMoved;
final MapType mapType;
final bool compassEnabled;
final bool myLocationEnabled;
GMSMap({super.key, required this.currentLocation ,required this.onCameraMoved, this.mapType = MapType.normal,this.compassEnabled = false, this.myLocationEnabled = true});
@override
Widget build(BuildContext context) {
return GoogleMap(
mapType: mapType,
zoomControlsEnabled: false,
myLocationEnabled: myLocationEnabled,
compassEnabled: compassEnabled,
initialCameraPosition: currentLocation,
onCameraMove: (value) => onCameraMoved(value),
onMapCreated: (GoogleMapController controller) {
_controller.complete(controller);
},
);
}
}

@ -0,0 +1,6 @@
enum OrderTrackingState {
waitingForCall,
dispactched,
returning,
ended,
}

@ -0,0 +1,133 @@
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/order_tracking/order_tracking_state.dart';
class OrderTrackingWidget extends StatelessWidget {
final double? height;
final OrderTrackingState state;
final double parentPaddingValue;
const OrderTrackingWidget({super.key, this.height, required this.state, required this.parentPaddingValue});
@override
Widget build(BuildContext context) {
return SizedBox(
width: MediaQuery
.sizeOf(context)
.width,
height: height,
child: getBarAndDot(state, context, MediaQuery
.sizeOf(context)
.width),
);
}
Widget? getBarAndDot(OrderTrackingState state, BuildContext context,
double width) {
print("the parent padding value is $parentPaddingValue");
print("the parent padding value is ${(parentPaddingValue+24)}");
print("the width - (parentPaddingValue+24) ${(width - (parentPaddingValue+24))}");
double widthOfOneState = (width/4) - (parentPaddingValue+8.h);
print("te width of one state is $widthOfOneState");
print("the value of${width/4}");
switch (state) {
case OrderTrackingState.waitingForCall:
return Row(
children: List.generate(4, (index){
if(index == 0) {
return oneProgressBar(widthOfOneState, AppColors.primaryRedColor, true);
} else {
return oneProgressBar(widthOfOneState, AppColors.greyLightColor, false);
}
})
);
case OrderTrackingState.dispactched:
return Row(
children: List.generate(4, (index){
if(index == 1 || index == 0) {
return oneProgressBar(widthOfOneState, AppColors.primaryRedColor, index == 1 );
} else {
return oneProgressBar(widthOfOneState, AppColors.greyLightColor, false);
}
})
);
case OrderTrackingState.returning:
return Row(
children: List.generate(4, (index){
if(index == 2 || index == 1 || index == 0) {
return oneProgressBar(widthOfOneState, AppColors.primaryRedColor, index == 2);
} else {
return oneProgressBar(widthOfOneState, AppColors.greyLightColor, false);
}
})
);
case OrderTrackingState.ended:
return Row(
children: List.generate(4, (index){
// if(index == 3) {
return oneProgressBar(widthOfOneState, AppColors.successLightColor, index == 3);
// } else {
// return oneProgressBar(widthOfOneState, AppColors.greyLightColor, false);
// }
})
);
}
}
Widget oneProgressBar(double width, Color color, bool hasThumb) {
return Row(
children: [
AnimatedSize(
duration: const Duration(seconds:1),
child: SizedBox(
height: 28.h,
width: width,
child: Stack(
clipBehavior: Clip.none,
children: [
SizedBox(
height: 28.h,
child: Container(
width: width,
height: height,
decoration: BoxDecoration(
color: color,
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(30.h)
),
),
),
Visibility(
visible: hasThumb,
child: Positioned(
top: -6.h, // move thumb above bar center
left: width - 22.h, // move to right end
child: thumb(color),
),
)
],
),
),
),
SizedBox(width: 8.h)
],
);
}
Widget thumb(Color color) {
return Container(
width: 18.h,
height: 18.h,
padding: EdgeInsets.zero,
decoration: BoxDecoration(
color: color,
shape: BoxShape.circle,
border: Border.all(color: Colors.white, width: 2.h)
),
);
}
}

@ -58,7 +58,7 @@ dependencies:
fl_chart: 1.0.0
geolocator: ^14.0.2
dropdown_search: ^6.0.2
google_maps_flutter: ^2.12.3
google_maps_flutter: ^2.13.1
flutter_zoom_videosdk: ^2.1.10
dartz: ^0.10.1
equatable: ^2.0.7
@ -85,6 +85,10 @@ dependencies:
huawei_location: ^6.14.2+301
intl: ^0.20.2
flutter_widget_from_html: ^0.17.1
huawei_map:
git:
url: https://github.com/fleoparra/hms-flutter-plugin.git
path: flutter-hms-map
dev_dependencies:
flutter_test:

Loading…
Cancel
Save