Merge branch 'master' into faiz_cs
# Conflicts: # lib/classes/consts.dart # lib/ui/landing/dashboard_screen.dart # lib/ui/login/login_screen.dartfaiz_marathon_signalR_critical
@ -0,0 +1,3 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="21.279" height="22.831" viewBox="0 0 21.279 22.831">
|
||||||
|
<path id="Path_4751" data-name="Path 4751" d="M19.767,15.891c-1.379-1.18-2.779-1.894-4.141-.716l-.813.712c-.6.517-1.7,2.931-5.98-1.99S7.1,8.215,7.7,7.7l.818-.713c1.355-1.181.844-2.667-.134-4.2l-.59-.927C6.809.34,5.739-.662,4.381.517l-.734.642A6.892,6.892,0,0,0,.96,5.719c-.49,3.241,1.056,6.953,4.6,11.026s7,6.121,10.281,6.085a6.91,6.91,0,0,0,4.888-2.024l.737-.642c1.355-1.178.513-2.377-.867-3.559Z" transform="translate(-0.872 0)" fill="#2bb8a6"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 557 B |
@ -0,0 +1,54 @@
|
|||||||
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||||
|
viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
|
||||||
|
<path style="fill:#E2E5E7;" d="M128,0c-17.6,0-32,14.4-32,32v448c0,17.6,14.4,32,32,32h320c17.6,0,32-14.4,32-32V128L352,0H128z"/>
|
||||||
|
<path style="fill:#B0B7BD;" d="M384,128h96L352,0v96C352,113.6,366.4,128,384,128z"/>
|
||||||
|
<polygon style="fill:#CAD1D8;" points="480,224 384,128 480,128 "/>
|
||||||
|
<path style="fill:#50BEE8;" d="M416,416c0,8.8-7.2,16-16,16H48c-8.8,0-16-7.2-16-16V256c0-8.8,7.2-16,16-16h352c8.8,0,16,7.2,16,16
|
||||||
|
V416z"/>
|
||||||
|
<g>
|
||||||
|
<path style="fill:#FFFFFF;" d="M92.576,384c-4.224,0-8.832-2.32-8.832-7.936v-72.656c0-4.608,4.608-7.936,8.832-7.936h29.296
|
||||||
|
c58.464,0,57.168,88.528,1.136,88.528H92.576z M100.64,311.072v57.312h21.232c34.544,0,36.064-57.312,0-57.312H100.64z"/>
|
||||||
|
<path style="fill:#FFFFFF;" d="M228,385.28c-23.664,1.024-48.24-14.72-48.24-46.064c0-31.472,24.56-46.944,48.24-46.944
|
||||||
|
c22.384,1.136,45.792,16.624,45.792,46.944C273.792,369.552,250.384,385.28,228,385.28z M226.592,308.912
|
||||||
|
c-14.336,0-29.936,10.112-29.936,30.32c0,20.096,15.616,30.336,29.936,30.336c14.72,0,30.448-10.24,30.448-30.336
|
||||||
|
C257.04,319.008,241.312,308.912,226.592,308.912z"/>
|
||||||
|
<path style="fill:#FFFFFF;" d="M288.848,339.088c0-24.688,15.488-45.92,44.912-45.92c11.136,0,19.968,3.328,29.296,11.392
|
||||||
|
c3.456,3.184,3.84,8.816,0.384,12.4c-3.456,3.056-8.704,2.688-11.776-0.384c-5.232-5.504-10.608-7.024-17.904-7.024
|
||||||
|
c-19.696,0-29.152,13.952-29.152,29.552c0,15.872,9.328,30.448,29.152,30.448c7.296,0,14.08-2.96,19.968-8.192
|
||||||
|
c3.952-3.072,9.456-1.552,11.76,1.536c2.048,2.816,3.056,7.552-1.408,12.016c-8.96,8.336-19.696,10-30.336,10
|
||||||
|
C302.8,384.912,288.848,363.776,288.848,339.088z"/>
|
||||||
|
</g>
|
||||||
|
<path style="fill:#CAD1D8;" d="M400,432H96v16h304c8.8,0,16-7.2,16-16v-16C416,424.8,408.8,432,400,432z"/>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 2.1 KiB |
@ -0,0 +1,51 @@
|
|||||||
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||||
|
viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
|
||||||
|
<path style="fill:#E2E5E7;" d="M128,0c-17.6,0-32,14.4-32,32v448c0,17.6,14.4,32,32,32h320c17.6,0,32-14.4,32-32V128L352,0H128z"/>
|
||||||
|
<path style="fill:#B0B7BD;" d="M384,128h96L352,0v96C352,113.6,366.4,128,384,128z"/>
|
||||||
|
<polygon style="fill:#CAD1D8;" points="480,224 384,128 480,128 "/>
|
||||||
|
<path style="fill:#F15642;" d="M416,416c0,8.8-7.2,16-16,16H48c-8.8,0-16-7.2-16-16V256c0-8.8,7.2-16,16-16h352c8.8,0,16,7.2,16,16
|
||||||
|
V416z"/>
|
||||||
|
<g>
|
||||||
|
<path style="fill:#FFFFFF;" d="M105.456,303.152c0-4.224,3.328-8.832,8.688-8.832h29.552c16.64,0,31.616,11.136,31.616,32.48
|
||||||
|
c0,20.224-14.976,31.488-31.616,31.488h-21.36v16.896c0,5.632-3.568,8.816-8.176,8.816c-4.224,0-8.688-3.184-8.688-8.816v-72.032
|
||||||
|
H105.456z M122.336,310.432v31.872h21.36c8.576,0,15.36-7.568,15.36-15.504c0-8.944-6.784-16.368-15.36-16.368H122.336z"/>
|
||||||
|
<path style="fill:#FFFFFF;" d="M191.616,303.152c0-4.224,3.328-8.832,8.704-8.832h29.552c16.64,0,31.616,11.136,31.616,32.48
|
||||||
|
c0,20.224-14.976,31.488-31.616,31.488h-21.36v16.896c0,5.632-3.584,8.816-8.192,8.816c-4.224,0-8.704-3.184-8.704-8.816V303.152z
|
||||||
|
M208.496,310.432v31.872h21.36c8.576,0,15.36-7.568,15.36-15.504c0-8.944-6.784-16.368-15.36-16.368H208.496z"/>
|
||||||
|
<path style="fill:#FFFFFF;" d="M301.68,311.472h-22.368c-11.136,0-11.136-16.368,0-16.368h60.496c11.392,0,11.392,16.368,0,16.368
|
||||||
|
h-21.232v64.608c0,11.12-16.896,11.392-16.896,0V311.472z"/>
|
||||||
|
</g>
|
||||||
|
<path style="fill:#CAD1D8;" d="M400,432H96v16h304c8.8,0,16-7.2,16-16v-16C416,424.8,408.8,432,400,432z"/>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.9 KiB |
@ -0,0 +1,51 @@
|
|||||||
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||||
|
viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
|
||||||
|
<path style="fill:#E2E5E7;" d="M128,0c-17.6,0-32,14.4-32,32v448c0,17.6,14.4,32,32,32h320c17.6,0,32-14.4,32-32V128L352,0H128z"/>
|
||||||
|
<path style="fill:#B0B7BD;" d="M384,128h96L352,0v96C352,113.6,366.4,128,384,128z"/>
|
||||||
|
<polygon style="fill:#CAD1D8;" points="480,224 384,128 480,128 "/>
|
||||||
|
<path style="fill:#576D7E;" d="M416,416c0,8.8-7.2,16-16,16H48c-8.8,0-16-7.2-16-16V256c0-8.8,7.2-16,16-16h352c8.8,0,16,7.2,16,16
|
||||||
|
V416z"/>
|
||||||
|
<g>
|
||||||
|
<path style="fill:#FFFFFF;" d="M132.784,311.472H110.4c-11.136,0-11.136-16.368,0-16.368h60.512c11.392,0,11.392,16.368,0,16.368
|
||||||
|
h-21.248v64.592c0,11.12-16.896,11.392-16.896,0v-64.592H132.784z"/>
|
||||||
|
<path style="fill:#FFFFFF;" d="M224.416,326.176l22.272-27.888c6.656-8.688,19.568,2.432,12.288,10.752
|
||||||
|
c-7.68,9.088-15.728,18.944-23.424,29.024l26.112,32.496c7.024,9.6-7.04,18.816-13.952,9.344l-23.536-30.192l-23.152,30.832
|
||||||
|
c-6.528,9.328-20.992-1.152-13.68-9.856l25.696-32.624c-8.048-10.096-15.856-19.936-23.664-29.024
|
||||||
|
c-8.064-9.6,6.912-19.44,12.784-10.48L224.416,326.176z"/>
|
||||||
|
<path style="fill:#FFFFFF;" d="M298.288,311.472H275.92c-11.136,0-11.136-16.368,0-16.368h60.496c11.392,0,11.392,16.368,0,16.368
|
||||||
|
h-21.232v64.592c0,11.12-16.896,11.392-16.896,0V311.472z"/>
|
||||||
|
</g>
|
||||||
|
<path style="fill:#CAD1D8;" d="M400,432H96v16h304c8.8,0,16-7.2,16-16v-16C416,424.8,408.8,432,400,432z"/>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.8 KiB |
@ -0,0 +1,6 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="27.826" height="17.898" viewBox="0 0 27.826 17.898">
|
||||||
|
<g id="video-call" transform="translate(-10 -18)">
|
||||||
|
<rect id="Rectangle_17475" data-name="Rectangle 17475" width="21.057" height="17.898" rx="3" transform="translate(10 18)" fill="#2bb8a6"/>
|
||||||
|
<path id="Path_4752" data-name="Path 4752" d="M50.692,21.633V34.282a.635.635,0,0,1-.316.55.622.622,0,0,1-.316.082.638.638,0,0,1-.316-.082L45,32.1V23.815l4.743-2.732a.66.66,0,0,1,.632,0A.635.635,0,0,1,50.692,21.633Z" transform="translate(-12.866 -1.104)" fill="#2bb8a6"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 585 B |
@ -0,0 +1,53 @@
|
|||||||
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||||
|
viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
|
||||||
|
<path style="fill:#E2E5E7;" d="M128,0c-17.6,0-32,14.4-32,32v448c0,17.6,14.4,32,32,32h320c17.6,0,32-14.4,32-32V128L352,0H128z"/>
|
||||||
|
<path style="fill:#B0B7BD;" d="M384,128h96L352,0v96C352,113.6,366.4,128,384,128z"/>
|
||||||
|
<polygon style="fill:#CAD1D8;" points="480,224 384,128 480,128 "/>
|
||||||
|
<path style="fill:#84BD5A;" d="M416,416c0,8.8-7.2,16-16,16H48c-8.8,0-16-7.2-16-16V256c0-8.8,7.2-16,16-16h352c8.8,0,16,7.2,16,16
|
||||||
|
V416z"/>
|
||||||
|
<g>
|
||||||
|
<path style="fill:#FFFFFF;" d="M144.336,326.192l22.256-27.888c6.656-8.704,19.584,2.416,12.288,10.736
|
||||||
|
c-7.664,9.088-15.728,18.944-23.408,29.04l26.096,32.496c7.04,9.6-7.024,18.8-13.936,9.328l-23.552-30.192l-23.152,30.848
|
||||||
|
c-6.528,9.328-20.992-1.152-13.696-9.856l25.712-32.624c-8.064-10.112-15.872-19.952-23.664-29.04
|
||||||
|
c-8.048-9.6,6.912-19.44,12.8-10.464L144.336,326.192z"/>
|
||||||
|
<path style="fill:#FFFFFF;" d="M197.36,303.152c0-4.224,3.584-7.808,8.064-7.808c4.096,0,7.552,3.6,7.552,7.808v64.096h34.8
|
||||||
|
c12.528,0,12.8,16.752,0,16.752H205.44c-4.48,0-8.064-3.184-8.064-7.792v-73.056H197.36z"/>
|
||||||
|
<path style="fill:#FFFFFF;" d="M272.032,314.672c2.944-24.832,40.416-29.296,58.08-15.728c8.704,7.024-0.512,18.16-8.192,12.528
|
||||||
|
c-9.472-6-30.96-8.816-33.648,4.464c-3.456,20.992,52.192,8.976,51.296,43.008c-0.896,32.496-47.968,33.248-65.632,18.672
|
||||||
|
c-4.24-3.456-4.096-9.072-1.792-12.544c3.328-3.312,7.024-4.464,11.392-0.88c10.48,7.152,37.488,12.528,39.392-5.648
|
||||||
|
C321.28,339.632,268.064,351.008,272.032,314.672z"/>
|
||||||
|
</g>
|
||||||
|
<path style="fill:#CAD1D8;" d="M400,432H96v16h304c8.8,0,16-7.2,16-16v-16C416,424.8,408.8,432,400,432z"/>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 2.0 KiB |
@ -0,0 +1,51 @@
|
|||||||
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||||
|
viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
|
||||||
|
<path style="fill:#E2E5E7;" d="M128,0c-17.6,0-32,14.4-32,32v448c0,17.6,14.4,32,32,32h320c17.6,0,32-14.4,32-32V128L352,0H128z"/>
|
||||||
|
<path style="fill:#B0B7BD;" d="M384,128h96L352,0v96C352,113.6,366.4,128,384,128z"/>
|
||||||
|
<polygon style="fill:#CAD1D8;" points="480,224 384,128 480,128 "/>
|
||||||
|
<path style="fill:#84BD5A;" d="M416,416c0,8.8-7.2,16-16,16H48c-8.8,0-16-7.2-16-16V256c0-8.8,7.2-16,16-16h352c8.8,0,16,7.2,16,16
|
||||||
|
V416z"/>
|
||||||
|
<g>
|
||||||
|
<path style="fill:#FFFFFF;" d="M132.64,384c-8.064,0-11.264-7.792-6.656-13.296l45.552-60.512h-37.76
|
||||||
|
c-11.12,0-10.224-15.712,0-15.712h51.568c9.712,0,12.528,9.184,5.632,16.624l-43.632,56.656h41.584
|
||||||
|
c10.24,0,11.52,16.256-1.008,16.256h-55.28V384z"/>
|
||||||
|
<path style="fill:#FFFFFF;" d="M212.048,303.152c0-10.496,16.896-10.88,16.896,0v73.04c0,10.608-16.896,10.88-16.896,0V303.152z"/>
|
||||||
|
<path style="fill:#FFFFFF;" d="M251.616,303.152c0-4.224,3.328-8.832,8.704-8.832h29.552c16.64,0,31.616,11.136,31.616,32.48
|
||||||
|
c0,20.224-14.976,31.488-31.616,31.488h-21.36v16.896c0,5.632-3.584,8.816-8.192,8.816c-4.224,0-8.704-3.184-8.704-8.816
|
||||||
|
L251.616,303.152L251.616,303.152z M268.496,310.432v31.872h21.36c8.576,0,15.36-7.568,15.36-15.504
|
||||||
|
c0-8.944-6.784-16.368-15.36-16.368H268.496z"/>
|
||||||
|
</g>
|
||||||
|
<path style="fill:#CAD1D8;" d="M400,432H96v16h304c8.8,0,16-7.2,16-16v-16C416,424.8,408.8,432,400,432z"/>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
@ -1 +1 @@
|
|||||||
{"v":"5.8.1","fr":30,"ip":0,"op":60,"w":300,"h":300,"nm":"loading_6","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Shape Layer 2","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[0]},{"t":60,"s":[360]}],"ix":10},"p":{"a":0,"k":[150.00000000000003,150.00000000000003,0],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":0,"k":[30.000000000000004,30.000000000000004,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[300,300],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[0.12941176470588237,0.7411764705882353,0.7764705882352941,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":50,"ix":5},"lc":2,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":10,"s":[0]},{"t":60,"s":[99]}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":0,"s":[1]},{"t":50,"s":[100]}],"ix":2},"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[0]},{"t":60,"s":[3]}],"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":0,"op":300,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"Shape Layer 1","sr":1,"ks":{"o":{"a":0,"k":30,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[150.00000000000003,150.00000000000003,0],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":0,"k":[30.000000000000004,30.000000000000004,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[300,300],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[0.7450980392156863,0.9254901960784314,0.9372549019607843,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":50,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":300,"st":0,"bm":0}],"markers":[]}
|
{"v":"5.8.1","fr":30,"ip":0,"op":60,"w":100,"h":100,"nm":"loading_6","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Shape Layer 2","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[0]},{"t":60,"s":[360]}],"ix":10},"p":{"a":0,"k":[50.00000000000002,50.00000000000002,0],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":0,"k":[10.000000000000004,10.000000000000004,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[300,300],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[0.12941176470588237,0.7411764705882353,0.7764705882352941,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":50,"ix":5},"lc":2,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":10,"s":[0]},{"t":60,"s":[99]}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":0,"s":[1]},{"t":50,"s":[100]}],"ix":2},"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[0]},{"t":60,"s":[3]}],"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":0,"op":300,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"Shape Layer 1","sr":1,"ks":{"o":{"a":0,"k":30,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[50.00000000000002,50.00000000000002,0],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":0,"k":[10.000000000000004,10.000000000000004,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[300,300],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[0.7450980392156863,0.9254901960784314,0.9372549019607843,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":50,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":300,"st":0,"bm":0}],"markers":[]}
|
||||||
@ -0,0 +1,37 @@
|
|||||||
|
//
|
||||||
|
// Generated file. Do not edit.
|
||||||
|
//
|
||||||
|
|
||||||
|
// ignore_for_file: directives_ordering
|
||||||
|
// ignore_for_file: lines_longer_than_80_chars
|
||||||
|
// ignore_for_file: depend_on_referenced_packages
|
||||||
|
|
||||||
|
import 'package:file_picker/_internal/file_picker_web.dart';
|
||||||
|
import 'package:firebase_core_web/firebase_core_web.dart';
|
||||||
|
import 'package:firebase_messaging_web/firebase_messaging_web.dart';
|
||||||
|
import 'package:fluttertoast/fluttertoast_web.dart';
|
||||||
|
import 'package:geolocator_web/geolocator_web.dart';
|
||||||
|
import 'package:google_maps_flutter_web/google_maps_flutter_web.dart';
|
||||||
|
import 'package:image_picker_for_web/image_picker_for_web.dart';
|
||||||
|
import 'package:shared_preferences_web/shared_preferences_web.dart';
|
||||||
|
import 'package:url_launcher_web/url_launcher_web.dart';
|
||||||
|
import 'package:video_player_web/video_player_web.dart';
|
||||||
|
import 'package:wakelock_web/wakelock_web.dart';
|
||||||
|
|
||||||
|
import 'package:flutter_web_plugins/flutter_web_plugins.dart';
|
||||||
|
|
||||||
|
// ignore: public_member_api_docs
|
||||||
|
void registerPlugins(Registrar registrar) {
|
||||||
|
FilePickerWeb.registerWith(registrar);
|
||||||
|
FirebaseCoreWeb.registerWith(registrar);
|
||||||
|
FirebaseMessagingWeb.registerWith(registrar);
|
||||||
|
FluttertoastWebPlugin.registerWith(registrar);
|
||||||
|
GeolocatorPlugin.registerWith(registrar);
|
||||||
|
GoogleMapsPlugin.registerWith(registrar);
|
||||||
|
ImagePickerPlugin.registerWith(registrar);
|
||||||
|
SharedPreferencesPlugin.registerWith(registrar);
|
||||||
|
UrlLauncherPlugin.registerWith(registrar);
|
||||||
|
VideoPlayerPlugin.registerWith(registrar);
|
||||||
|
WakelockWeb.registerWith(registrar);
|
||||||
|
registrar.registerMessageHandler();
|
||||||
|
}
|
||||||
@ -0,0 +1,133 @@
|
|||||||
|
// To parse this JSON data, do
|
||||||
|
//
|
||||||
|
// final callDataModel = callDataModelFromJson(jsonString);
|
||||||
|
|
||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
class CallDataModel {
|
||||||
|
CallDataModel({
|
||||||
|
this.callerId,
|
||||||
|
this.callReciverId,
|
||||||
|
this.notificationForeground,
|
||||||
|
this.message,
|
||||||
|
this.title,
|
||||||
|
this.type,
|
||||||
|
this.identity,
|
||||||
|
this.name,
|
||||||
|
this.isCall,
|
||||||
|
this.isWebrtc,
|
||||||
|
this.contant,
|
||||||
|
this.contantNo,
|
||||||
|
this.chatEventId,
|
||||||
|
this.fileTypeId,
|
||||||
|
this.currentUserId,
|
||||||
|
this.chatSource,
|
||||||
|
this.userChatHistoryLineRequestList,
|
||||||
|
this.server,
|
||||||
|
});
|
||||||
|
|
||||||
|
String? callerId;
|
||||||
|
String? callReciverId;
|
||||||
|
String? notificationForeground;
|
||||||
|
String? message;
|
||||||
|
String? title;
|
||||||
|
String? type;
|
||||||
|
String? identity;
|
||||||
|
String? name;
|
||||||
|
String? isCall;
|
||||||
|
String? isWebrtc;
|
||||||
|
String? contant;
|
||||||
|
String? contantNo;
|
||||||
|
String? chatEventId;
|
||||||
|
dynamic? fileTypeId;
|
||||||
|
String? currentUserId;
|
||||||
|
String? chatSource;
|
||||||
|
List<UserChatHistoryLineRequestList>? userChatHistoryLineRequestList;
|
||||||
|
String? server;
|
||||||
|
|
||||||
|
factory CallDataModel.fromRawJson(String str) => CallDataModel.fromJson(json.decode(str));
|
||||||
|
|
||||||
|
String toRawJson() => json.encode(toJson());
|
||||||
|
|
||||||
|
factory CallDataModel.fromJson(Map<String, dynamic> json) => CallDataModel(
|
||||||
|
callerId: json["callerID"] == null ? null : json["callerID"],
|
||||||
|
callReciverId: json["callReciverID"] == null ? null : json["callReciverID"],
|
||||||
|
notificationForeground: json["notification_foreground"] == null ? null : json["notification_foreground"],
|
||||||
|
message: json["message"] == null ? null : json["message"],
|
||||||
|
title: json["title"] == null ? null : json["title"],
|
||||||
|
type: json["type"] == null ? null : json["type"],
|
||||||
|
identity: json["identity"] == null ? null : json["identity"],
|
||||||
|
name: json["name"] == null ? null : json["name"],
|
||||||
|
isCall: json["is_call"] == null ? null : json["is_call"],
|
||||||
|
isWebrtc: json["is_webrtc"] == null ? null : json["is_webrtc"],
|
||||||
|
contant: json["contant"] == null ? null : json["contant"],
|
||||||
|
contantNo: json["contantNo"] == null ? null : json["contantNo"],
|
||||||
|
chatEventId: json["chatEventId"] == null ? null : json["chatEventId"],
|
||||||
|
fileTypeId: json["fileTypeId"],
|
||||||
|
currentUserId: json["currentUserId"] == null ? null : json["currentUserId"],
|
||||||
|
chatSource: json["chatSource"] == null ? null : json["chatSource"],
|
||||||
|
userChatHistoryLineRequestList: json["userChatHistoryLineRequestList"] == null
|
||||||
|
? null
|
||||||
|
: List<UserChatHistoryLineRequestList>.from(
|
||||||
|
json["userChatHistoryLineRequestList"].map(
|
||||||
|
(x) => UserChatHistoryLineRequestList.fromJson(x),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
server: json["server"] == null ? null : json["server"],
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"callerID": callerId == null ? null : callerId,
|
||||||
|
"callReciverID": callReciverId == null ? null : callReciverId,
|
||||||
|
"notification_foreground": notificationForeground == null ? null : notificationForeground,
|
||||||
|
"message": message == null ? null : message,
|
||||||
|
"title": title == null ? null : title,
|
||||||
|
"type": type == null ? null : type,
|
||||||
|
"identity": identity == null ? null : identity,
|
||||||
|
"name": name == null ? null : name,
|
||||||
|
"is_call": isCall == null ? null : isCall,
|
||||||
|
"is_webrtc": isWebrtc == null ? null : isWebrtc,
|
||||||
|
"contant": contant == null ? null : contant,
|
||||||
|
"contantNo": contantNo == null ? null : contantNo,
|
||||||
|
"chatEventId": chatEventId == null ? null : chatEventId,
|
||||||
|
"fileTypeId": fileTypeId,
|
||||||
|
"currentUserId": currentUserId == null ? null : currentUserId,
|
||||||
|
"chatSource": chatSource == null ? null : chatSource,
|
||||||
|
"userChatHistoryLineRequestList": userChatHistoryLineRequestList == null
|
||||||
|
? null
|
||||||
|
: List<dynamic>.from(
|
||||||
|
userChatHistoryLineRequestList!.map(
|
||||||
|
(x) => x.toJson(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
"server": server == null ? null : server,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
class UserChatHistoryLineRequestList {
|
||||||
|
UserChatHistoryLineRequestList({
|
||||||
|
this.isSeen,
|
||||||
|
this.isDelivered,
|
||||||
|
this.targetUserId,
|
||||||
|
this.targetUserStatus,
|
||||||
|
});
|
||||||
|
|
||||||
|
bool? isSeen;
|
||||||
|
bool? isDelivered;
|
||||||
|
int? targetUserId;
|
||||||
|
int? targetUserStatus;
|
||||||
|
|
||||||
|
factory UserChatHistoryLineRequestList.fromJson(Map<String, dynamic> json) => UserChatHistoryLineRequestList(
|
||||||
|
isSeen: json["isSeen"] == null ? null : json["isSeen"],
|
||||||
|
isDelivered: json["isDelivered"] == null ? null : json["isDelivered"],
|
||||||
|
targetUserId: json["targetUserId"] == null ? null : json["targetUserId"],
|
||||||
|
targetUserStatus: json["targetUserStatus"] == null ? null : json["targetUserStatus"],
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"isSeen": isSeen == null ? null : isSeen,
|
||||||
|
"isDelivered": isDelivered == null ? null : isDelivered,
|
||||||
|
"targetUserId": targetUserId == null ? null : targetUserId,
|
||||||
|
"targetUserStatus": targetUserStatus == null ? null : targetUserStatus,
|
||||||
|
};
|
||||||
|
}
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
ChatUnreadCovnCountModel chatUnreadCovnCountModelFromJson(String str) => ChatUnreadCovnCountModel.fromJson(json.decode(str));
|
||||||
|
|
||||||
|
String chatUnreadCovnCountModelToJson(ChatUnreadCovnCountModel data) => json.encode(data.toJson());
|
||||||
|
|
||||||
|
class ChatUnreadCovnCountModel {
|
||||||
|
ChatUnreadCovnCountModel({
|
||||||
|
this.singleChatCount,
|
||||||
|
this.groupChatCount,
|
||||||
|
});
|
||||||
|
|
||||||
|
int? singleChatCount;
|
||||||
|
int? groupChatCount;
|
||||||
|
|
||||||
|
factory ChatUnreadCovnCountModel.fromJson(Map<String, dynamic> json) => ChatUnreadCovnCountModel(
|
||||||
|
singleChatCount: json["singleChatCount"] == null ? null : json["singleChatCount"],
|
||||||
|
groupChatCount: json["groupChatCount"] == null ? null : json["groupChatCount"],
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"singleChatCount": singleChatCount == null ? null : singleChatCount,
|
||||||
|
"groupChatCount": groupChatCount == null ? null : groupChatCount,
|
||||||
|
};
|
||||||
|
}
|
||||||
@ -0,0 +1,53 @@
|
|||||||
|
// To parse this JSON data, do
|
||||||
|
//
|
||||||
|
// final favoriteChatUser = favoriteChatUserFromJson(jsonString);
|
||||||
|
|
||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
class FavoriteChatUser {
|
||||||
|
FavoriteChatUser({
|
||||||
|
this.response,
|
||||||
|
this.errorResponses,
|
||||||
|
});
|
||||||
|
|
||||||
|
Response? response;
|
||||||
|
dynamic? errorResponses;
|
||||||
|
|
||||||
|
factory FavoriteChatUser.fromRawJson(String str) => FavoriteChatUser.fromJson(json.decode(str));
|
||||||
|
|
||||||
|
String toRawJson() => json.encode(toJson());
|
||||||
|
|
||||||
|
factory FavoriteChatUser.fromJson(Map<String, dynamic> json) => FavoriteChatUser(
|
||||||
|
response: json["response"] == null ? null : Response.fromJson(json["response"]),
|
||||||
|
errorResponses: json["errorResponses"],
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"response": response == null ? null : response!.toJson(),
|
||||||
|
"errorResponses": errorResponses,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
class Response {
|
||||||
|
Response({
|
||||||
|
this.targetUserId,
|
||||||
|
this.isFav,
|
||||||
|
});
|
||||||
|
|
||||||
|
int? targetUserId;
|
||||||
|
bool? isFav;
|
||||||
|
|
||||||
|
factory Response.fromRawJson(String str) => Response.fromJson(json.decode(str));
|
||||||
|
|
||||||
|
String toRawJson() => json.encode(toJson());
|
||||||
|
|
||||||
|
factory Response.fromJson(Map<String, dynamic> json) => Response(
|
||||||
|
targetUserId: json["targetUserId"] == null ? null : json["targetUserId"],
|
||||||
|
isFav: json["isFav"] == null ? null : json["isFav"],
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"targetUserId": targetUserId == null ? null : targetUserId,
|
||||||
|
"isFav": isFav == null ? null : isFav,
|
||||||
|
};
|
||||||
|
}
|
||||||
@ -0,0 +1,48 @@
|
|||||||
|
class GetRFCEmployeeList {
|
||||||
|
String? aCTION;
|
||||||
|
String? eMPLOYEEDISPLAYNAME;
|
||||||
|
String? eMPLOYEEIMAGE;
|
||||||
|
int? fROMROWNUM;
|
||||||
|
int? nOOFROWS;
|
||||||
|
int? rOWNUM;
|
||||||
|
int? sEQ;
|
||||||
|
int? tOROWNUM;
|
||||||
|
String? uSERNAME;
|
||||||
|
|
||||||
|
GetRFCEmployeeList(
|
||||||
|
{this.aCTION,
|
||||||
|
this.eMPLOYEEDISPLAYNAME,
|
||||||
|
this.eMPLOYEEIMAGE,
|
||||||
|
this.fROMROWNUM,
|
||||||
|
this.nOOFROWS,
|
||||||
|
this.rOWNUM,
|
||||||
|
this.sEQ,
|
||||||
|
this.tOROWNUM,
|
||||||
|
this.uSERNAME});
|
||||||
|
|
||||||
|
GetRFCEmployeeList.fromJson(Map<String, dynamic> json) {
|
||||||
|
aCTION = json['ACTION'];
|
||||||
|
eMPLOYEEDISPLAYNAME = json['EMPLOYEE_DISPLAY_NAME'];
|
||||||
|
eMPLOYEEIMAGE = json['EMPLOYEE_IMAGE'];
|
||||||
|
fROMROWNUM = json['FROM_ROW_NUM'];
|
||||||
|
nOOFROWS = json['NO_OF_ROWS'];
|
||||||
|
rOWNUM = json['ROW_NUM'];
|
||||||
|
sEQ = json['SEQ'];
|
||||||
|
tOROWNUM = json['TO_ROW_NUM'];
|
||||||
|
uSERNAME = json['USER_NAME'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['ACTION'] = this.aCTION;
|
||||||
|
data['EMPLOYEE_DISPLAY_NAME'] = this.eMPLOYEEDISPLAYNAME;
|
||||||
|
data['EMPLOYEE_IMAGE'] = this.eMPLOYEEIMAGE;
|
||||||
|
data['FROM_ROW_NUM'] = this.fROMROWNUM;
|
||||||
|
data['NO_OF_ROWS'] = this.nOOFROWS;
|
||||||
|
data['ROW_NUM'] = this.rOWNUM;
|
||||||
|
data['SEQ'] = this.sEQ;
|
||||||
|
data['TO_ROW_NUM'] = this.tOROWNUM;
|
||||||
|
data['USER_NAME'] = this.uSERNAME;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,22 @@
|
|||||||
|
class ResubmitEITRequestResponse {
|
||||||
|
String? pRETURNMSG;
|
||||||
|
String? pRETURNSTATUS;
|
||||||
|
int? pTRANSACTIONID;
|
||||||
|
|
||||||
|
ResubmitEITRequestResponse(
|
||||||
|
{this.pRETURNMSG, this.pRETURNSTATUS, this.pTRANSACTIONID});
|
||||||
|
|
||||||
|
ResubmitEITRequestResponse.fromJson(Map<String, dynamic> json) {
|
||||||
|
pRETURNMSG = json['P_RETURN_MSG'];
|
||||||
|
pRETURNSTATUS = json['P_RETURN_STATUS'];
|
||||||
|
pTRANSACTIONID = json['P_TRANSACTION_ID'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['P_RETURN_MSG'] = this.pRETURNMSG;
|
||||||
|
data['P_RETURN_STATUS'] = this.pRETURNSTATUS;
|
||||||
|
data['P_TRANSACTION_ID'] = this.pTRANSACTIONID;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,379 @@
|
|||||||
|
import 'dart:ui';
|
||||||
|
|
||||||
|
import 'package:camera/camera.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:mohem_flutter_app/classes/colors.dart';
|
||||||
|
import 'package:mohem_flutter_app/classes/utils.dart';
|
||||||
|
import 'package:mohem_flutter_app/models/chat/call.dart';
|
||||||
|
|
||||||
|
class IncomingCall extends StatefulWidget {
|
||||||
|
CallDataModel incomingCallData;
|
||||||
|
bool? isVideoCall;
|
||||||
|
|
||||||
|
IncomingCall({Key? key, required this.incomingCallData, this.isVideoCall}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
_IncomingCallState createState() => _IncomingCallState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _IncomingCallState extends State<IncomingCall> with SingleTickerProviderStateMixin {
|
||||||
|
AnimationController? _animationController;
|
||||||
|
CameraController? _controller;
|
||||||
|
Future<void>? _initializeControllerFuture;
|
||||||
|
bool isCameraReady = false;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
_animationController = AnimationController(
|
||||||
|
vsync: this,
|
||||||
|
duration: const Duration(
|
||||||
|
milliseconds: 500,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
//_runAnimation();
|
||||||
|
// connectSignaling();
|
||||||
|
WidgetsBinding.instance.addPostFrameCallback(
|
||||||
|
(_) => _runAnimation(),
|
||||||
|
);
|
||||||
|
|
||||||
|
super.initState();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
body: FutureBuilder<void>(
|
||||||
|
future: _initializeControllerFuture,
|
||||||
|
builder: (BuildContext context, AsyncSnapshot<void> snapshot) {
|
||||||
|
if (snapshot.connectionState == ConnectionState.done) {
|
||||||
|
return Stack(
|
||||||
|
alignment: FractionalOffset.center,
|
||||||
|
children: <Widget>[
|
||||||
|
if (widget.isVideoCall!)
|
||||||
|
Positioned.fill(
|
||||||
|
child: AspectRatio(
|
||||||
|
aspectRatio: _controller!.value.aspectRatio,
|
||||||
|
child: CameraPreview(
|
||||||
|
_controller!,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Positioned.fill(
|
||||||
|
child: ClipRect(
|
||||||
|
child: BackdropFilter(
|
||||||
|
filter: ImageFilter.blur(sigmaX: 10.0, sigmaY: 10.0),
|
||||||
|
child: Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: MyColors.grey57Color.withOpacity(
|
||||||
|
0.7,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
children: <Widget>[
|
||||||
|
Container(
|
||||||
|
margin: const EdgeInsets.all(21.0),
|
||||||
|
child: Row(
|
||||||
|
children: <Widget>[
|
||||||
|
Image.asset(
|
||||||
|
"assets/images/logos/main_mohemm_logo.png",
|
||||||
|
height: 70,
|
||||||
|
width: 70,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: const EdgeInsets.only(
|
||||||
|
left: 10.0,
|
||||||
|
right: 10.0,
|
||||||
|
),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
|
children: const <Widget>[
|
||||||
|
Text(
|
||||||
|
"Aamir Saleem Ahmad",
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 21,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: MyColors.white,
|
||||||
|
letterSpacing: -1.26,
|
||||||
|
height: 23 / 12,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
"Calling...",
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 16,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
color: Color(
|
||||||
|
0xffC6C6C6,
|
||||||
|
),
|
||||||
|
letterSpacing: -0.48,
|
||||||
|
height: 23 / 24,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 2,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
// Container(
|
||||||
|
// margin: const EdgeInsets.all(21.0),
|
||||||
|
// width: MediaQuery.of(context).size.width,
|
||||||
|
// decoration: cardRadius(15.0, color: MyColors.black, elevation: null),
|
||||||
|
// child: Column(
|
||||||
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
// mainAxisSize: MainAxisSize.min,
|
||||||
|
// children: [
|
||||||
|
// Container(
|
||||||
|
// padding: const EdgeInsets.fromLTRB(16.0, 16.0, 16.0, 6.0),
|
||||||
|
// child: Text(
|
||||||
|
// "TranslationBase.of(context).appoInfo",
|
||||||
|
// style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: MyColors.white, letterSpacing: -0.64, height: 23 / 12),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// Container(
|
||||||
|
// padding: const EdgeInsets.only(left: 16.0, right: 16.0),
|
||||||
|
// child: Text(
|
||||||
|
// "widget.incomingCallData.appointmentdate + widget.incomingCallData.appointmenttime",
|
||||||
|
// style: TextStyle(fontSize: 12.0, letterSpacing: -0.48, color: Color(0xff8E8E8E), fontWeight: FontWeight.w600),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// Container(
|
||||||
|
// padding: const EdgeInsets.only(left: 16.0, right: 16.0, bottom: 21.0),
|
||||||
|
// child: Text(
|
||||||
|
// "widget.incomingCallData.clinicname",
|
||||||
|
// style: TextStyle(fontSize: 12.0, letterSpacing: -0.48, color: Color(0xff8E8E8E), fontWeight: FontWeight.w600),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
const Spacer(),
|
||||||
|
Container(
|
||||||
|
margin: const EdgeInsets.only(
|
||||||
|
bottom: 70.0,
|
||||||
|
left: 49,
|
||||||
|
right: 49,
|
||||||
|
),
|
||||||
|
child: Row(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: <Widget>[
|
||||||
|
RotationTransition(
|
||||||
|
turns: Tween(
|
||||||
|
begin: 0.0,
|
||||||
|
end: -.1,
|
||||||
|
)
|
||||||
|
.chain(
|
||||||
|
CurveTween(
|
||||||
|
curve: Curves.elasticIn,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
.animate(
|
||||||
|
_animationController!,
|
||||||
|
),
|
||||||
|
child: RawMaterialButton(
|
||||||
|
onPressed: () {
|
||||||
|
_submit();
|
||||||
|
},
|
||||||
|
elevation: 2.0,
|
||||||
|
fillColor: MyColors.green2DColor,
|
||||||
|
padding: const EdgeInsets.all(
|
||||||
|
15.0,
|
||||||
|
),
|
||||||
|
shape: const CircleBorder(),
|
||||||
|
child: const Icon(
|
||||||
|
Icons.call,
|
||||||
|
color: MyColors.white,
|
||||||
|
size: 35.0,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
RawMaterialButton(
|
||||||
|
onPressed: () {
|
||||||
|
backToHome();
|
||||||
|
},
|
||||||
|
elevation: 2.0,
|
||||||
|
fillColor: MyColors.redA3Color,
|
||||||
|
padding: const EdgeInsets.all(
|
||||||
|
15.0,
|
||||||
|
),
|
||||||
|
shape: const CircleBorder(),
|
||||||
|
child: const Icon(
|
||||||
|
Icons.call_end,
|
||||||
|
color: MyColors.white,
|
||||||
|
size: 35.0,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
return const Center(
|
||||||
|
child: CircularProgressIndicator(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void _runAnimation() async {
|
||||||
|
List<CameraDescription> cameras = await availableCameras();
|
||||||
|
CameraDescription firstCamera = cameras[1];
|
||||||
|
_controller = CameraController(
|
||||||
|
firstCamera,
|
||||||
|
ResolutionPreset.medium,
|
||||||
|
);
|
||||||
|
_initializeControllerFuture = _controller!.initialize();
|
||||||
|
setState(() {});
|
||||||
|
// setAudioFile();
|
||||||
|
for (int i = 0; i < 100; i++) {
|
||||||
|
await _animationController!.forward();
|
||||||
|
await _animationController!.reverse();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> _submit() async {
|
||||||
|
try {
|
||||||
|
// backToHome();
|
||||||
|
// final roomModel = RoomModel(name: widget.incomingCallData.name, token: widget.incomingCallData.sessionId, identity: widget.incomingCallData.identity);
|
||||||
|
await _controller?.dispose();
|
||||||
|
|
||||||
|
// changeCallStatusAPI(4);
|
||||||
|
|
||||||
|
// if (_session != null && _signaling != null) {
|
||||||
|
// await Navigator.of(context).pushReplacement(
|
||||||
|
// MaterialPageRoute(
|
||||||
|
// // fullscreenDialog: true,
|
||||||
|
// builder: (BuildContext context) {
|
||||||
|
// // if (widget.incomingCallData.isWebRTC == "true") {
|
||||||
|
// return StartVideoCall(signaling: _signaling, session: _session);
|
||||||
|
//
|
||||||
|
// // else {
|
||||||
|
// // return OpenTokConnectCallPage(apiKey: OPENTOK_API_KEY, sessionId: widget.incomingCallData.sessionId, token: widget.incomingCallData.token);
|
||||||
|
// // }
|
||||||
|
//
|
||||||
|
// // return VideoCallWebPage(receiverId: widget.incomingCallData.receiverID, callerId: widget.incomingCallData.callerID); // Web WebRTC VideoCall
|
||||||
|
//
|
||||||
|
// // return CallHomePage(receiverId: widget.incomingCallData.receiverID, callerId: widget.incomingCallData.callerID); // App WebRTC VideoCall
|
||||||
|
// },
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
|
// } else {
|
||||||
|
// // Invalid Params/Data
|
||||||
|
// Utils.showToast("Failed to establish connection with server");
|
||||||
|
// }
|
||||||
|
} catch (err) {
|
||||||
|
print(err);
|
||||||
|
// await PlatformExceptionAlertDialog(
|
||||||
|
// exception: err,
|
||||||
|
// ).show(context);
|
||||||
|
|
||||||
|
Utils.showToast(err.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// void changeCallStatusAPI(int sessionStatus) {
|
||||||
|
// LiveCareService service = new LiveCareService();
|
||||||
|
// service.endCallAPI(widget.incomingCallData.sessionId, sessionStatus, context).then((res) {}).catchError((err) {
|
||||||
|
// print(err);
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
|
||||||
|
void backToHome() async {
|
||||||
|
// final connected = await signaling.declineCall(widget.incomingCallData.callerID, widget.incomingCallData.receiverID);
|
||||||
|
// LandingPage.isOpenCallPage = false;
|
||||||
|
// _signaling
|
||||||
|
_animationController!.dispose();
|
||||||
|
// player.stop();
|
||||||
|
// changeCallStatusAPI(3);
|
||||||
|
// _signaling.bye(_session, callRejected: true);
|
||||||
|
// _signaling.callDisconnected(_session, callRejected: true);
|
||||||
|
Navigator.of(context).pop();
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// void disposeAudioResources() async {
|
||||||
|
// await player.dispose();
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// void setAudioFile() async {
|
||||||
|
// player.stop();
|
||||||
|
// await player.setVolume(1.0); // full volume
|
||||||
|
// try {
|
||||||
|
// await player.setAsset('assets/sounds/ring_60Sec.mp3').then((value) {
|
||||||
|
// player.setLoopMode(LoopMode.one); // loop ring sound
|
||||||
|
// player.play();
|
||||||
|
// }).catchError((err) {
|
||||||
|
// print("Error: $err");
|
||||||
|
// });
|
||||||
|
// } catch (e) {
|
||||||
|
// print("Error: $e");
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// void connectSignaling({@required bool iAmCaller = false}) async {
|
||||||
|
// print("----------------- + Signaling Connection Started ---------------------------");
|
||||||
|
// var caller = widget.incomingCallData.callerID;
|
||||||
|
// var receiver = widget.incomingCallData.receiverID;
|
||||||
|
// var host = widget.incomingCallData.server;
|
||||||
|
//
|
||||||
|
// var selfRole = iAmCaller ? "Caller" : "Receiver";
|
||||||
|
// var selfId = iAmCaller ? caller : receiver;
|
||||||
|
// var selfUser = SocketUser(id: selfId, name: "$selfRole-$selfId", userAgent: DeviceInfo.userAgent, moreInfo: {});
|
||||||
|
//
|
||||||
|
// var remoteRole = !iAmCaller ? "Caller" : "Receiver";
|
||||||
|
// var remoteId = !iAmCaller ? caller : receiver;
|
||||||
|
// var remoteUser = SocketUser(id: remoteId, name: "$remoteRole-$remoteId", userAgent: DeviceInfo.userAgent, moreInfo: {});
|
||||||
|
//
|
||||||
|
// var sessionId = "$caller-$receiver";
|
||||||
|
// _session = SessionOneToOne(id: sessionId, local_user: selfUser, remote_user: remoteUser);
|
||||||
|
//
|
||||||
|
// _signaling = Signaling(host, session: _session);
|
||||||
|
// await _signaling.connect();
|
||||||
|
//
|
||||||
|
// if (_signaling.state == SignalingState.Open) {
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
BoxDecoration cardRadius(double radius, {required Color color, double? elevation}) {
|
||||||
|
return BoxDecoration(
|
||||||
|
shape: BoxShape.rectangle,
|
||||||
|
color: color ?? Colors.white,
|
||||||
|
borderRadius: BorderRadius.all(
|
||||||
|
Radius.circular(radius),
|
||||||
|
),
|
||||||
|
boxShadow: <BoxShadow>[
|
||||||
|
BoxShadow(
|
||||||
|
color: const Color(
|
||||||
|
0xff000000,
|
||||||
|
).withOpacity(
|
||||||
|
.05,
|
||||||
|
),
|
||||||
|
//spreadRadius: 5,
|
||||||
|
blurRadius: elevation ?? 27,
|
||||||
|
offset: const Offset(
|
||||||
|
-2,
|
||||||
|
3,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,431 @@
|
|||||||
|
import 'dart:convert';
|
||||||
|
import 'dart:ui';
|
||||||
|
|
||||||
|
import 'package:camera/camera.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_svg/flutter_svg.dart';
|
||||||
|
import 'package:mohem_flutter_app/classes/colors.dart';
|
||||||
|
import 'package:mohem_flutter_app/classes/utils.dart';
|
||||||
|
import 'package:mohem_flutter_app/extensions/int_extensions.dart';
|
||||||
|
import 'package:mohem_flutter_app/main.dart';
|
||||||
|
import 'package:mohem_flutter_app/models/chat/call.dart';
|
||||||
|
|
||||||
|
class OutGoingCall extends StatefulWidget {
|
||||||
|
CallDataModel OutGoingCallData;
|
||||||
|
bool? isVideoCall;
|
||||||
|
|
||||||
|
OutGoingCall({Key? key, required this.OutGoingCallData, this.isVideoCall}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
_OutGoingCallState createState() => _OutGoingCallState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _OutGoingCallState extends State<OutGoingCall> with SingleTickerProviderStateMixin {
|
||||||
|
AnimationController? _animationController;
|
||||||
|
CameraController? _controller;
|
||||||
|
Future<void>? _initializeControllerFuture;
|
||||||
|
bool isCameraReady = false;
|
||||||
|
bool isMicOff = false;
|
||||||
|
bool isLoudSpeaker = false;
|
||||||
|
bool isCamOff = false;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
_animationController = AnimationController(
|
||||||
|
vsync: this,
|
||||||
|
duration: const Duration(
|
||||||
|
milliseconds: 500,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
logger.d(jsonEncode(widget.OutGoingCallData));
|
||||||
|
//_runAnimation();
|
||||||
|
// connectSignaling();
|
||||||
|
WidgetsBinding.instance.addPostFrameCallback(
|
||||||
|
(_) => _runAnimation(),
|
||||||
|
);
|
||||||
|
|
||||||
|
super.initState();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
body: FutureBuilder<void>(
|
||||||
|
future: _initializeControllerFuture,
|
||||||
|
builder: (BuildContext context, AsyncSnapshot<void> snapshot) {
|
||||||
|
if (snapshot.connectionState == ConnectionState.done) {
|
||||||
|
return Stack(
|
||||||
|
alignment: FractionalOffset.center,
|
||||||
|
children: <Widget>[
|
||||||
|
if (widget.isVideoCall!)
|
||||||
|
Positioned.fill(
|
||||||
|
child: AspectRatio(
|
||||||
|
aspectRatio: _controller!.value.aspectRatio,
|
||||||
|
child: CameraPreview(
|
||||||
|
_controller!,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Positioned.fill(
|
||||||
|
child: ClipRect(
|
||||||
|
child: BackdropFilter(
|
||||||
|
filter: ImageFilter.blur(sigmaX: 10.0, sigmaY: 10.0),
|
||||||
|
child: Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: MyColors.grey57Color.withOpacity(
|
||||||
|
0.7,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
children: <Widget>[
|
||||||
|
40.height,
|
||||||
|
Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: <Widget>[
|
||||||
|
Container(
|
||||||
|
margin: const EdgeInsets.all(21.0),
|
||||||
|
child: Container(
|
||||||
|
margin: const EdgeInsets.only(
|
||||||
|
left: 10.0,
|
||||||
|
right: 10.0,
|
||||||
|
),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
|
children: <Widget>[
|
||||||
|
SvgPicture.asset(
|
||||||
|
"assets/images/user.svg",
|
||||||
|
height: 70,
|
||||||
|
width: 70,
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
),
|
||||||
|
10.height,
|
||||||
|
const Text(
|
||||||
|
"Aamir Saleem Ahmad",
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 21,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: MyColors.white,
|
||||||
|
letterSpacing: -1.26,
|
||||||
|
height: 23 / 12,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const Text(
|
||||||
|
"Ringing...",
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 16,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
color: Color(
|
||||||
|
0xffC6C6C6,
|
||||||
|
),
|
||||||
|
letterSpacing: -0.48,
|
||||||
|
height: 23 / 24,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(
|
||||||
|
height: 2,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
// Container(
|
||||||
|
// margin: const EdgeInsets.all(21.0),
|
||||||
|
// width: MediaQuery.of(context).size.width,
|
||||||
|
// decoration: cardRadius(15.0, color: MyColors.black, elevation: null),
|
||||||
|
// child: Column(
|
||||||
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
// mainAxisSize: MainAxisSize.min,
|
||||||
|
// children: [
|
||||||
|
// Container(
|
||||||
|
// padding: const EdgeInsets.fromLTRB(16.0, 16.0, 16.0, 6.0),
|
||||||
|
// child: Text(
|
||||||
|
// "TranslationBase.of(context).appoInfo",
|
||||||
|
// style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: MyColors.white, letterSpacing: -0.64, height: 23 / 12),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// Container(
|
||||||
|
// padding: const EdgeInsets.only(left: 16.0, right: 16.0),
|
||||||
|
// child: Text(
|
||||||
|
// "widget.OutGoingCallData.appointmentdate + widget.OutGoingCallData.appointmenttime",
|
||||||
|
// style: TextStyle(fontSize: 12.0, letterSpacing: -0.48, color: Color(0xff8E8E8E), fontWeight: FontWeight.w600),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// Container(
|
||||||
|
// padding: const EdgeInsets.only(left: 16.0, right: 16.0, bottom: 21.0),
|
||||||
|
// child: Text(
|
||||||
|
// "widget.OutGoingCallData.clinicname",
|
||||||
|
// style: TextStyle(fontSize: 12.0, letterSpacing: -0.48, color: Color(0xff8E8E8E), fontWeight: FontWeight.w600),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
const Spacer(),
|
||||||
|
Container(
|
||||||
|
margin: const EdgeInsets.only(
|
||||||
|
bottom: 70.0,
|
||||||
|
left: 49,
|
||||||
|
right: 49,
|
||||||
|
),
|
||||||
|
child: Row(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: <Widget>[
|
||||||
|
if (widget.isVideoCall!)
|
||||||
|
RawMaterialButton(
|
||||||
|
onPressed: () {
|
||||||
|
_camOff();
|
||||||
|
},
|
||||||
|
elevation: 2.0,
|
||||||
|
fillColor: isCamOff ? MyColors.green2DColor : Colors.grey,
|
||||||
|
padding: const EdgeInsets.all(
|
||||||
|
15.0,
|
||||||
|
),
|
||||||
|
shape: const CircleBorder(),
|
||||||
|
child: Icon(
|
||||||
|
isCamOff ? Icons.videocam_off : Icons.videocam,
|
||||||
|
color: MyColors.white,
|
||||||
|
size: 35.0,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
else
|
||||||
|
RawMaterialButton(
|
||||||
|
onPressed: () {
|
||||||
|
_loudOn();
|
||||||
|
},
|
||||||
|
elevation: 2.0,
|
||||||
|
fillColor: isLoudSpeaker ? MyColors.green2DColor : Colors.grey,
|
||||||
|
padding: const EdgeInsets.all(
|
||||||
|
15.0,
|
||||||
|
),
|
||||||
|
shape: const CircleBorder(),
|
||||||
|
child: const Icon(
|
||||||
|
Icons.volume_up,
|
||||||
|
color: MyColors.white,
|
||||||
|
size: 35.0,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
RawMaterialButton(
|
||||||
|
onPressed: () {
|
||||||
|
_micOff();
|
||||||
|
},
|
||||||
|
elevation: 2.0,
|
||||||
|
fillColor: isMicOff ? MyColors.green2DColor : Colors.grey,
|
||||||
|
padding: const EdgeInsets.all(
|
||||||
|
15.0,
|
||||||
|
),
|
||||||
|
shape: const CircleBorder(),
|
||||||
|
child: Icon(
|
||||||
|
isMicOff ? Icons.mic_off : Icons.mic,
|
||||||
|
color: MyColors.white,
|
||||||
|
size: 35.0,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
RawMaterialButton(
|
||||||
|
onPressed: () {
|
||||||
|
backToHome();
|
||||||
|
},
|
||||||
|
elevation: 2.0,
|
||||||
|
fillColor: MyColors.redA3Color,
|
||||||
|
padding: const EdgeInsets.all(
|
||||||
|
15.0,
|
||||||
|
),
|
||||||
|
shape: const CircleBorder(),
|
||||||
|
child: const Icon(
|
||||||
|
Icons.call_end,
|
||||||
|
color: MyColors.white,
|
||||||
|
size: 35.0,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
return const Center(
|
||||||
|
child: CircularProgressIndicator(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void _runAnimation() async {
|
||||||
|
List<CameraDescription> cameras = await availableCameras();
|
||||||
|
CameraDescription firstCamera = cameras[1];
|
||||||
|
_controller = CameraController(
|
||||||
|
firstCamera,
|
||||||
|
ResolutionPreset.medium,
|
||||||
|
);
|
||||||
|
_initializeControllerFuture = _controller!.initialize();
|
||||||
|
setState(() {});
|
||||||
|
// setAudioFile();
|
||||||
|
for (int i = 0; i < 100; i++) {
|
||||||
|
await _animationController!.forward();
|
||||||
|
await _animationController!.reverse();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void _micOff() {
|
||||||
|
setState(() {
|
||||||
|
isMicOff = !isMicOff;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void _camOff() {
|
||||||
|
setState(() {
|
||||||
|
isCamOff = !isCamOff;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void _loudOn() {
|
||||||
|
setState(() {
|
||||||
|
isLoudSpeaker = !isLoudSpeaker;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> _submit() async {
|
||||||
|
try {
|
||||||
|
// backToHome();
|
||||||
|
// final roomModel = RoomModel(name: widget.OutGoingCallData.name, token: widget.OutGoingCallData.sessionId, identity: widget.OutGoingCallData.identity);
|
||||||
|
await _controller?.dispose();
|
||||||
|
|
||||||
|
// changeCallStatusAPI(4);
|
||||||
|
|
||||||
|
// if (_session != null && _signaling != null) {
|
||||||
|
// await Navigator.of(context).pushReplacement(
|
||||||
|
// MaterialPageRoute(
|
||||||
|
// // fullscreenDialog: true,
|
||||||
|
// builder: (BuildContext context) {
|
||||||
|
// // if (widget.OutGoingCallData.isWebRTC == "true") {
|
||||||
|
// return StartVideoCall(signaling: _signaling, session: _session);
|
||||||
|
//
|
||||||
|
// // else {
|
||||||
|
// // return OpenTokConnectCallPage(apiKey: OPENTOK_API_KEY, sessionId: widget.OutGoingCallData.sessionId, token: widget.OutGoingCallData.token);
|
||||||
|
// // }
|
||||||
|
//
|
||||||
|
// // return VideoCallWebPage(receiverId: widget.OutGoingCallData.receiverID, callerId: widget.OutGoingCallData.callerID); // Web WebRTC VideoCall
|
||||||
|
//
|
||||||
|
// // return CallHomePage(receiverId: widget.OutGoingCallData.receiverID, callerId: widget.OutGoingCallData.callerID); // App WebRTC VideoCall
|
||||||
|
// },
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
|
// } else {
|
||||||
|
// // Invalid Params/Data
|
||||||
|
// Utils.showToast("Failed to establish connection with server");
|
||||||
|
// }
|
||||||
|
} catch (err) {
|
||||||
|
print(err);
|
||||||
|
// await PlatformExceptionAlertDialog(
|
||||||
|
// exception: err,
|
||||||
|
// ).show(context);
|
||||||
|
|
||||||
|
Utils.showToast(err.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// void changeCallStatusAPI(int sessionStatus) {
|
||||||
|
// LiveCareService service = new LiveCareService();
|
||||||
|
// service.endCallAPI(widget.OutGoingCallData.sessionId, sessionStatus, context).then((res) {}).catchError((err) {
|
||||||
|
// print(err);
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
|
||||||
|
void backToHome() async {
|
||||||
|
// final connected = await signaling.declineCall(widget.OutGoingCallData.callerID, widget.OutGoingCallData.receiverID);
|
||||||
|
// LandingPage.isOpenCallPage = false;
|
||||||
|
// _signaling
|
||||||
|
_animationController!.dispose();
|
||||||
|
// player.stop();
|
||||||
|
// changeCallStatusAPI(3);
|
||||||
|
// _signaling.bye(_session, callRejected: true);
|
||||||
|
// _signaling.callDisconnected(_session, callRejected: true);
|
||||||
|
Navigator.of(context).pop();
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// void disposeAudioResources() async {
|
||||||
|
// await player.dispose();
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// void setAudioFile() async {
|
||||||
|
// player.stop();
|
||||||
|
// await player.setVolume(1.0); // full volume
|
||||||
|
// try {
|
||||||
|
// await player.setAsset('assets/sounds/ring_60Sec.mp3').then((value) {
|
||||||
|
// player.setLoopMode(LoopMode.one); // loop ring sound
|
||||||
|
// player.play();
|
||||||
|
// }).catchError((err) {
|
||||||
|
// print("Error: $err");
|
||||||
|
// });
|
||||||
|
// } catch (e) {
|
||||||
|
// print("Error: $e");
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// void connectSignaling({@required bool iAmCaller = false}) async {
|
||||||
|
// print("----------------- + Signaling Connection Started ---------------------------");
|
||||||
|
// var caller = widget.OutGoingCallData.callerID;
|
||||||
|
// var receiver = widget.OutGoingCallData.receiverID;
|
||||||
|
// var host = widget.OutGoingCallData.server;
|
||||||
|
//
|
||||||
|
// var selfRole = iAmCaller ? "Caller" : "Receiver";
|
||||||
|
// var selfId = iAmCaller ? caller : receiver;
|
||||||
|
// var selfUser = SocketUser(id: selfId, name: "$selfRole-$selfId", userAgent: DeviceInfo.userAgent, moreInfo: {});
|
||||||
|
//
|
||||||
|
// var remoteRole = !iAmCaller ? "Caller" : "Receiver";
|
||||||
|
// var remoteId = !iAmCaller ? caller : receiver;
|
||||||
|
// var remoteUser = SocketUser(id: remoteId, name: "$remoteRole-$remoteId", userAgent: DeviceInfo.userAgent, moreInfo: {});
|
||||||
|
//
|
||||||
|
// var sessionId = "$caller-$receiver";
|
||||||
|
// _session = SessionOneToOne(id: sessionId, local_user: selfUser, remote_user: remoteUser);
|
||||||
|
//
|
||||||
|
// _signaling = Signaling(host, session: _session);
|
||||||
|
// await _signaling.connect();
|
||||||
|
//
|
||||||
|
// if (_signaling.state == SignalingState.Open) {
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
BoxDecoration cardRadius(double radius, {required Color color, double? elevation}) {
|
||||||
|
return BoxDecoration(
|
||||||
|
shape: BoxShape.rectangle,
|
||||||
|
color: color ?? Colors.white,
|
||||||
|
borderRadius: BorderRadius.all(
|
||||||
|
Radius.circular(radius),
|
||||||
|
),
|
||||||
|
boxShadow: <BoxShadow>[
|
||||||
|
BoxShadow(
|
||||||
|
color: const Color(
|
||||||
|
0xff000000,
|
||||||
|
).withOpacity(
|
||||||
|
.05,
|
||||||
|
),
|
||||||
|
//spreadRadius: 5,
|
||||||
|
blurRadius: elevation ?? 27,
|
||||||
|
offset: const Offset(
|
||||||
|
-2,
|
||||||
|
3,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,109 +1,396 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.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:mohem_flutter_app/api/chat/chat_provider_model.dart';
|
import 'package:mohem_flutter_app/api/chat/chat_provider_model.dart';
|
||||||
import 'package:mohem_flutter_app/app_state/app_state.dart';
|
import 'package:mohem_flutter_app/app_state/app_state.dart';
|
||||||
import 'package:mohem_flutter_app/classes/colors.dart';
|
import 'package:mohem_flutter_app/classes/colors.dart';
|
||||||
|
import 'package:mohem_flutter_app/extensions/int_extensions.dart';
|
||||||
|
import 'package:mohem_flutter_app/extensions/string_extensions.dart';
|
||||||
|
import 'package:mohem_flutter_app/extensions/widget_extensions.dart';
|
||||||
import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
|
import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
|
||||||
|
import 'package:mohem_flutter_app/main.dart';
|
||||||
|
import 'package:mohem_flutter_app/models/chat/call.dart';
|
||||||
|
import 'package:mohem_flutter_app/ui/chat/call/chat_outgoing_call_screen.dart';
|
||||||
import 'package:mohem_flutter_app/ui/chat/chat_bubble.dart';
|
import 'package:mohem_flutter_app/ui/chat/chat_bubble.dart';
|
||||||
import 'package:mohem_flutter_app/widgets/app_bar_widget.dart';
|
import 'package:mohem_flutter_app/widgets/app_bar_widget.dart';
|
||||||
import 'package:mohem_flutter_app/widgets/shimmer/dashboard_shimmer_widget.dart';
|
import 'package:mohem_flutter_app/widgets/shimmer/dashboard_shimmer_widget.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
import 'package:pull_to_refresh/pull_to_refresh.dart';
|
||||||
|
import 'package:signalr_netcore/signalr_client.dart';
|
||||||
|
import 'package:swipe_to/swipe_to.dart';
|
||||||
|
|
||||||
|
class ChatDetailScreen extends StatefulWidget {
|
||||||
|
// ignore: prefer_const_constructors_in_immutables
|
||||||
|
ChatDetailScreen({Key? key}) : super(key: key);
|
||||||
|
|
||||||
class ChatDetailScreen extends StatelessWidget {
|
@override
|
||||||
|
State<ChatDetailScreen> createState() => _ChatDetailScreenState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _ChatDetailScreenState extends State<ChatDetailScreen> {
|
||||||
dynamic userDetails;
|
dynamic userDetails;
|
||||||
late ChatProviderModel data;
|
late ChatProviderModel data;
|
||||||
|
final RefreshController _rc = RefreshController(initialRefresh: false);
|
||||||
|
|
||||||
ChatDetailScreen({Key? key}) : super(key: key);
|
void getMoreChat() async {
|
||||||
|
if (userDetails != null) {
|
||||||
|
data.paginationVal = data.paginationVal + 10;
|
||||||
|
if (userDetails != null)
|
||||||
|
data.getSingleUserChatHistory(
|
||||||
|
senderUID: AppState().chatDetails!.response!.id!.toInt(),
|
||||||
|
receiverUID: userDetails["targetUser"].id,
|
||||||
|
loadMore: true,
|
||||||
|
isNewChat: false,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
await Future.delayed(
|
||||||
|
const Duration(
|
||||||
|
milliseconds: 1000,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
_rc.loadComplete();
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
userDetails = ModalRoute
|
userDetails = ModalRoute.of(context)!.settings.arguments;
|
||||||
.of(context)!
|
|
||||||
.settings
|
|
||||||
.arguments;
|
|
||||||
data = Provider.of<ChatProviderModel>(context, listen: false);
|
data = Provider.of<ChatProviderModel>(context, listen: false);
|
||||||
data.getSingleUserChatHistory(senderUID: AppState().chatDetails!.response!.id.toString(), receiverUID: userDetails["targetUser"].id, pagination: "0");
|
if (userDetails != null) {
|
||||||
Timer(const Duration(seconds: 1), () => data.scrollDown());
|
data.getSingleUserChatHistory(
|
||||||
|
senderUID: AppState().chatDetails!.response!.id!.toInt(),
|
||||||
|
receiverUID: userDetails["targetUser"].id,
|
||||||
|
loadMore: false,
|
||||||
|
isNewChat: userDetails["isNewChat"],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: const Color(0xFFF8F8F8),
|
backgroundColor: const Color(0xFFF8F8F8),
|
||||||
appBar: AppBarWidget(context, title: userDetails["targetUser"].userName, showHomeButton: false, image: userDetails["targetUser"].image),
|
appBar: AppBarWidget(context,
|
||||||
|
title: userDetails["targetUser"].userName.toString().replaceAll(".", " ").capitalizeFirstofEach,
|
||||||
|
showHomeButton: false,
|
||||||
|
image: userDetails["targetUser"].image,
|
||||||
|
actions: [
|
||||||
|
IconButton(
|
||||||
|
onPressed: () {
|
||||||
|
// makeCall(
|
||||||
|
// callType: "AUDIO",
|
||||||
|
// con: data.hubConnection,
|
||||||
|
// );
|
||||||
|
},
|
||||||
|
icon: SvgPicture.asset(
|
||||||
|
"assets/icons/chat/call.svg",
|
||||||
|
width: 22,
|
||||||
|
height: 22,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
IconButton(
|
||||||
|
onPressed: () {
|
||||||
|
// makeCall(
|
||||||
|
// callType: "VIDEO",
|
||||||
|
// con: data.hubConnection,
|
||||||
|
// );
|
||||||
|
},
|
||||||
|
icon: SvgPicture.asset(
|
||||||
|
"assets/icons/chat/video_call.svg",
|
||||||
|
width: 20,
|
||||||
|
height: 20,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
10.width,
|
||||||
|
]),
|
||||||
body: Consumer<ChatProviderModel>(
|
body: Consumer<ChatProviderModel>(
|
||||||
builder: (BuildContext context, ChatProviderModel m, Widget? child) {
|
builder: (BuildContext context, ChatProviderModel m, Widget? child) {
|
||||||
return (m.isLoading
|
return (m.isLoading
|
||||||
? ChatHomeShimmer()
|
? ChatHomeShimmer()
|
||||||
: Column(
|
: Column(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Expanded(
|
Expanded(
|
||||||
child: ListView.builder(
|
flex: 2,
|
||||||
controller: m.scrollController,
|
child: SmartRefresher(
|
||||||
shrinkWrap: true,
|
enablePullDown: false,
|
||||||
itemCount: m.userChatHistory.length,
|
enablePullUp: true,
|
||||||
padding: const EdgeInsets.symmetric(vertical: 10),
|
onLoading: () {
|
||||||
itemBuilder: (BuildContext context, int i) {
|
getMoreChat();
|
||||||
i == 0 ? m.logger.d(m.userChatHistory.length) : "";
|
},
|
||||||
return ChatBubble(
|
header: const MaterialClassicHeader(
|
||||||
text: m.userChatHistory[i].contant.toString(),
|
color: MyColors.gradiantEndColor,
|
||||||
isSeen: m.userChatHistory[i].isSeen == true ? true : false,
|
),
|
||||||
isCurrentUser: m.userChatHistory[i].currentUserId == AppState().chatDetails!.response!.id ? true : false,
|
controller: _rc,
|
||||||
isDelivered: m.userChatHistory[i].currentUserId == AppState().chatDetails!.response!.id && m.userChatHistory[i].isDelivered == true ? true : false,
|
reverse: true,
|
||||||
dateTime: m.userChatHistory[i].createdDate.toString(),
|
child: ListView.builder(
|
||||||
);
|
controller: m.scrollController,
|
||||||
},
|
shrinkWrap: true,
|
||||||
),
|
physics: const BouncingScrollPhysics(),
|
||||||
),
|
reverse: true,
|
||||||
Card(
|
itemCount: m.userChatHistory.length,
|
||||||
margin: EdgeInsets.zero,
|
padding: const EdgeInsets.only(top: 20),
|
||||||
child: Padding(
|
itemBuilder: (BuildContext context, int i) {
|
||||||
padding: const EdgeInsets.symmetric(vertical: 10),
|
return SwipeTo(
|
||||||
child: TextField(
|
iconColor: MyColors.lightGreenColor,
|
||||||
controller: m.message,
|
child: ChatBubble(
|
||||||
decoration: InputDecoration(
|
text: m.userChatHistory[i].contant.toString(),
|
||||||
hintText: LocaleKeys.typeheretoreply.tr(),
|
replyText: m.userChatHistory[i].userChatReplyResponse != null ? m.userChatHistory[i].userChatReplyResponse!.contant.toString() : "",
|
||||||
hintStyle: const TextStyle(color: MyColors.grey98Color),
|
isSeen: m.userChatHistory[i].isSeen == true ? true : false,
|
||||||
border: InputBorder.none,
|
isCurrentUser: m.userChatHistory[i].currentUserId == AppState().chatDetails!.response!.id ? true : false,
|
||||||
focusedBorder: InputBorder.none,
|
isDelivered: m.userChatHistory[i].currentUserId == AppState().chatDetails!.response!.id && m.userChatHistory[i].isDelivered == true ? true : false,
|
||||||
enabledBorder: InputBorder.none,
|
dateTime: m.dateFormte(m.userChatHistory[i].createdDate!),
|
||||||
errorBorder: InputBorder.none,
|
isReplied: m.userChatHistory[i].userChatReplyResponse != null ? true : false,
|
||||||
disabledBorder: InputBorder.none,
|
userName: AppState().chatDetails!.response!.userName == m.userChatHistory[i].currentUserName.toString() ? "You" : m.userChatHistory[i].currentUserName.toString(),
|
||||||
contentPadding: const EdgeInsets.symmetric(vertical: 10, horizontal: 15),
|
|
||||||
suffixIcon: SizedBox(
|
|
||||||
width: 100,
|
|
||||||
child: Row(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.end,
|
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
|
||||||
children: [
|
|
||||||
IconButton(
|
|
||||||
icon: const Icon(
|
|
||||||
Icons.attach_file_rounded,
|
|
||||||
size: 27,
|
|
||||||
color: MyColors.lightGreenColor,
|
|
||||||
),
|
),
|
||||||
onPressed: () {},
|
onRightSwipe: () {
|
||||||
|
m.chatReply(
|
||||||
|
m.userChatHistory[i],
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
if (m.isMsgReply)
|
||||||
|
Row(
|
||||||
|
children: <Widget>[
|
||||||
|
Container(
|
||||||
|
height: 80,
|
||||||
|
color: MyColors.textMixColor,
|
||||||
|
width: 6,
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
|
height: 80,
|
||||||
|
color: MyColors.black.withOpacity(0.10),
|
||||||
|
child: ListTile(
|
||||||
|
title: (AppState().chatDetails!.response!.userName == m.repliedMsg.first.currentUserName.toString()
|
||||||
|
? "You"
|
||||||
|
: m.repliedMsg.first.currentUserName.toString().replaceAll(".", " "))
|
||||||
|
.toText14(color: MyColors.lightGreenColor),
|
||||||
|
subtitle: (m.repliedMsg.isNotEmpty ? m.repliedMsg.first.contant! : "").toText12(
|
||||||
|
color: MyColors.white,
|
||||||
|
maxLine: 2,
|
||||||
|
),
|
||||||
|
trailing: GestureDetector(
|
||||||
|
onTap: m.closeMe,
|
||||||
|
child: Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: MyColors.white.withOpacity(0.5),
|
||||||
|
borderRadius: const BorderRadius.all(
|
||||||
|
Radius.circular(20),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: const Icon(
|
||||||
|
Icons.close,
|
||||||
|
size: 23,
|
||||||
|
color: MyColors.white,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
if (m.isFileSelected && m.sFileType == ".png" || m.sFileType == ".jpeg" || m.sFileType == ".jpg")
|
||||||
|
Card(
|
||||||
|
margin: EdgeInsets.zero,
|
||||||
|
elevation: 0,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.only(
|
||||||
|
left: 20,
|
||||||
|
right: 20,
|
||||||
|
top: 20,
|
||||||
|
bottom: 0,
|
||||||
|
),
|
||||||
|
child: Card(
|
||||||
|
margin: EdgeInsets.zero,
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(0),
|
||||||
),
|
),
|
||||||
IconButton(
|
elevation: 0,
|
||||||
icon: SvgPicture.asset(
|
child: Container(
|
||||||
"assets/icons/chat/chat_send_icon.svg",
|
height: 200,
|
||||||
height: 26,
|
decoration: BoxDecoration(
|
||||||
width: 35,
|
image: DecorationImage(
|
||||||
|
image: FileImage(
|
||||||
|
m.selectedFile,
|
||||||
|
),
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
),
|
||||||
|
borderRadius: const BorderRadius.all(
|
||||||
|
Radius.circular(0),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
onPressed: () {
|
child: const SizedBox(
|
||||||
m.sendChatMessage(m.message.text, userDetails["targetUser"].id, userDetails["targetUser"].userName);
|
width: double.infinity,
|
||||||
},
|
height: 200,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Card(
|
||||||
|
margin: EdgeInsets.zero,
|
||||||
|
child: TextField(
|
||||||
|
controller: m.message,
|
||||||
|
decoration: InputDecoration(
|
||||||
|
hintText: m.isFileSelected ? m.selectedFile.path.split("/").last : LocaleKeys.typeheretoreply.tr(),
|
||||||
|
hintStyle: TextStyle(
|
||||||
|
color: m.isFileSelected ? MyColors.darkTextColor : MyColors.grey98Color,
|
||||||
|
fontSize: 14,
|
||||||
|
),
|
||||||
|
border: InputBorder.none,
|
||||||
|
focusedBorder: InputBorder.none,
|
||||||
|
enabledBorder: InputBorder.none,
|
||||||
|
errorBorder: InputBorder.none,
|
||||||
|
disabledBorder: InputBorder.none,
|
||||||
|
contentPadding: EdgeInsets.only(
|
||||||
|
left: m.sFileType.isNotEmpty ? 10 : 20,
|
||||||
|
right: m.sFileType.isNotEmpty ? 0 : 5,
|
||||||
|
top: 20,
|
||||||
|
bottom: 20,
|
||||||
|
),
|
||||||
|
prefixIcon: m.sFileType.isNotEmpty
|
||||||
|
? Row(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: <Widget>[
|
||||||
|
SvgPicture.asset(
|
||||||
|
m.getType(m.sFileType),
|
||||||
|
height: 30,
|
||||||
|
width: 25,
|
||||||
|
alignment: Alignment.center,
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
).paddingOnly(left: 20),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
: null,
|
||||||
|
suffixIcon: SizedBox(
|
||||||
|
width: 96,
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center, // added line
|
||||||
|
children: <Widget>[
|
||||||
|
if (m.sFileType.isNotEmpty)
|
||||||
|
IconButton(
|
||||||
|
padding: EdgeInsets.zero,
|
||||||
|
alignment: Alignment.centerRight,
|
||||||
|
icon: Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
children: <Widget>[
|
||||||
|
Container(
|
||||||
|
decoration: const BoxDecoration(
|
||||||
|
color: MyColors.redA3Color,
|
||||||
|
borderRadius: BorderRadius.all(
|
||||||
|
Radius.circular(20),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: const Icon(
|
||||||
|
Icons.close,
|
||||||
|
size: 15,
|
||||||
|
color: MyColors.white,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
("Clear")
|
||||||
|
.toText11(
|
||||||
|
color: MyColors.redA3Color,
|
||||||
|
)
|
||||||
|
.paddingOnly(
|
||||||
|
left: 4,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
onPressed: () async {
|
||||||
|
m.removeAttachment();
|
||||||
|
},
|
||||||
|
),
|
||||||
|
if (m.sFileType.isEmpty)
|
||||||
|
RotationTransition(
|
||||||
|
turns: const AlwaysStoppedAnimation(45 / 360),
|
||||||
|
child: IconButton(
|
||||||
|
padding: EdgeInsets.zero,
|
||||||
|
alignment: Alignment.topRight,
|
||||||
|
icon: const Icon(
|
||||||
|
Icons.attach_file_rounded,
|
||||||
|
size: 26,
|
||||||
|
color: MyColors.grey3AColor,
|
||||||
|
),
|
||||||
|
onPressed: () async {
|
||||||
|
m.selectImageToUpload(context);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
IconButton(
|
||||||
|
alignment: Alignment.centerRight,
|
||||||
|
padding: EdgeInsets.zero,
|
||||||
|
icon: SvgPicture.asset(
|
||||||
|
"assets/icons/chat/chat_send_icon.svg",
|
||||||
|
height: 26,
|
||||||
|
width: 26,
|
||||||
|
),
|
||||||
|
onPressed: () {
|
||||||
|
m.sendChatMessage(
|
||||||
|
userDetails["targetUser"].id,
|
||||||
|
userDetails["targetUser"].userName,
|
||||||
|
context,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
)
|
||||||
|
],
|
||||||
),
|
),
|
||||||
],
|
).paddingOnly(
|
||||||
|
right: 20,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
),
|
));
|
||||||
),
|
|
||||||
],
|
|
||||||
));
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void makeCall({required String callType, required HubConnection con}) async {
|
||||||
|
print("================== Make call Triggered ============================");
|
||||||
|
logger.d(jsonEncode(AppState().chatDetails!.response));
|
||||||
|
Map<String, dynamic> json = {
|
||||||
|
"callerID": AppState().chatDetails!.response!.id!.toString(),
|
||||||
|
"callReciverID": userDetails["targetUser"].id.toString(),
|
||||||
|
"notification_foreground": "true",
|
||||||
|
"message": "Aamir is calling ",
|
||||||
|
"title": "Video Call",
|
||||||
|
"type": callType == "VIDEO" ? "Video" : "Audio",
|
||||||
|
"identity": "Aamir.Muhammad",
|
||||||
|
"name": "Aamir Saleem Ahmad",
|
||||||
|
"is_call": "true",
|
||||||
|
"is_webrtc": "true",
|
||||||
|
"contant": "Start video Call Aamir.Muhammad",
|
||||||
|
"contantNo": "775d1f11-62d9-6fcc-91f6-21f8c14559fb",
|
||||||
|
"chatEventId": "3",
|
||||||
|
"fileTypeId": null,
|
||||||
|
"currentUserId": "266642",
|
||||||
|
"chatSource": "1",
|
||||||
|
"userChatHistoryLineRequestList": [
|
||||||
|
{"isSeen": false, "isDelivered": false, "targetUserId": 341682, "targetUserStatus": 4}
|
||||||
|
],
|
||||||
|
// "server": "https://192.168.8.163:8086",
|
||||||
|
"server": "https://livecareturn.hmg.com:8086",
|
||||||
|
};
|
||||||
|
|
||||||
|
CallDataModel incomingCallData = CallDataModel.fromJson(json);
|
||||||
|
await Navigator.push(
|
||||||
|
context,
|
||||||
|
MaterialPageRoute(
|
||||||
|
builder: (BuildContext context) => OutGoingCall(
|
||||||
|
isVideoCall: callType == "VIDEO" ? true : false,
|
||||||
|
OutGoingCallData: incomingCallData,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,270 @@
|
|||||||
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_svg/flutter_svg.dart';
|
||||||
|
import 'package:mohem_flutter_app/api/chat/chat_provider_model.dart';
|
||||||
|
import 'package:mohem_flutter_app/app_state/app_state.dart';
|
||||||
|
import 'package:mohem_flutter_app/classes/colors.dart';
|
||||||
|
import 'package:mohem_flutter_app/config/routes.dart';
|
||||||
|
import 'package:mohem_flutter_app/extensions/string_extensions.dart';
|
||||||
|
import 'package:mohem_flutter_app/extensions/widget_extensions.dart';
|
||||||
|
import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
|
||||||
|
import 'package:mohem_flutter_app/widgets/bottom_sheet.dart';
|
||||||
|
import 'package:mohem_flutter_app/widgets/bottom_sheets/search_employee_bottom_sheet.dart';
|
||||||
|
import 'package:mohem_flutter_app/widgets/shimmer/dashboard_shimmer_widget.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
|
class ChatHomeScreen extends StatefulWidget {
|
||||||
|
@override
|
||||||
|
State<ChatHomeScreen> createState() => _ChatHomeScreenState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _ChatHomeScreenState extends State<ChatHomeScreen> {
|
||||||
|
TextEditingController search = TextEditingController();
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
super.dispose();
|
||||||
|
search.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
backgroundColor: MyColors.white,
|
||||||
|
body: Consumer<ChatProviderModel>(
|
||||||
|
builder: (BuildContext context, ChatProviderModel m, Widget? child) {
|
||||||
|
return m.isLoading
|
||||||
|
? ChatHomeShimmer()
|
||||||
|
: ListView(
|
||||||
|
shrinkWrap: true,
|
||||||
|
physics: const AlwaysScrollableScrollPhysics(),
|
||||||
|
children: <Widget>[
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(
|
||||||
|
vertical: 20,
|
||||||
|
horizontal: 20,
|
||||||
|
),
|
||||||
|
child: TextField(
|
||||||
|
controller: m.search,
|
||||||
|
onChanged: (String val) {
|
||||||
|
m.filter(val);
|
||||||
|
},
|
||||||
|
decoration: InputDecoration(
|
||||||
|
border: fieldBorder(
|
||||||
|
radius: 5,
|
||||||
|
color: 0xFFE5E5E5,
|
||||||
|
),
|
||||||
|
focusedBorder: fieldBorder(
|
||||||
|
radius: 5,
|
||||||
|
color: 0xFFE5E5E5,
|
||||||
|
),
|
||||||
|
enabledBorder: fieldBorder(
|
||||||
|
radius: 5,
|
||||||
|
color: 0xFFE5E5E5,
|
||||||
|
),
|
||||||
|
contentPadding: const EdgeInsets.symmetric(
|
||||||
|
horizontal: 15,
|
||||||
|
vertical: 10,
|
||||||
|
),
|
||||||
|
hintText: LocaleKeys.searchfromchat.tr(),
|
||||||
|
hintStyle: const TextStyle(
|
||||||
|
color: MyColors.lightTextColor,
|
||||||
|
fontStyle: FontStyle.italic,
|
||||||
|
),
|
||||||
|
filled: true,
|
||||||
|
fillColor: const Color(
|
||||||
|
0xFFF7F7F7,
|
||||||
|
),
|
||||||
|
suffixIcon: m.search.text.isNotEmpty
|
||||||
|
? IconButton(
|
||||||
|
onPressed: () {
|
||||||
|
m.clearSelections();
|
||||||
|
},
|
||||||
|
icon: const Icon(
|
||||||
|
Icons.clear,
|
||||||
|
size: 22,
|
||||||
|
),
|
||||||
|
color: MyColors.redA3Color,
|
||||||
|
)
|
||||||
|
: null,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
if (m.searchedChats != null)
|
||||||
|
ListView.separated(
|
||||||
|
itemCount: m.searchedChats!.length,
|
||||||
|
padding: const EdgeInsets.only(
|
||||||
|
bottom: 80,
|
||||||
|
),
|
||||||
|
shrinkWrap: true,
|
||||||
|
physics: const NeverScrollableScrollPhysics(),
|
||||||
|
itemBuilder: (BuildContext context, int index) {
|
||||||
|
return SizedBox(
|
||||||
|
height: 55,
|
||||||
|
child: ListTile(
|
||||||
|
leading: Stack(
|
||||||
|
children: <Widget>[
|
||||||
|
SvgPicture.asset(
|
||||||
|
"assets/images/user.svg",
|
||||||
|
height: 48,
|
||||||
|
width: 48,
|
||||||
|
),
|
||||||
|
Positioned(
|
||||||
|
right: 5,
|
||||||
|
bottom: 1,
|
||||||
|
child: Container(
|
||||||
|
width: 10,
|
||||||
|
height: 10,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: m.searchedChats![index].userStatus == 1 ? MyColors.green2DColor : Colors.red,
|
||||||
|
borderRadius: const BorderRadius.all(
|
||||||
|
Radius.circular(10),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
title: (m.searchedChats![index].userName!.replaceFirst(".", " ").capitalizeFirstofEach ?? "").toText14(color: MyColors.darkTextColor),
|
||||||
|
// subtitle: (m.searchedChats![index].isTyping == true ? "Typing ..." : "").toText11(color: MyColors.normalTextColor),
|
||||||
|
trailing: SizedBox(
|
||||||
|
width: 60,
|
||||||
|
child: Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
children: <Widget>[
|
||||||
|
if (m.searchedChats![index].unreadMessageCount! > 0)
|
||||||
|
Flexible(
|
||||||
|
child: Container(
|
||||||
|
padding: EdgeInsets.zero,
|
||||||
|
alignment: Alignment.centerRight,
|
||||||
|
width: 18,
|
||||||
|
height: 18,
|
||||||
|
decoration: const BoxDecoration(
|
||||||
|
color: MyColors.redColor,
|
||||||
|
borderRadius: BorderRadius.all(
|
||||||
|
Radius.circular(20),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: (m.searchedChats![index].unreadMessageCount!.toString())
|
||||||
|
.toText10(
|
||||||
|
color: MyColors.white,
|
||||||
|
)
|
||||||
|
.center,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Flexible(
|
||||||
|
child: IconButton(
|
||||||
|
alignment: Alignment.centerRight,
|
||||||
|
padding: EdgeInsets.zero,
|
||||||
|
icon: Icon(
|
||||||
|
m.searchedChats![index].isFav != null && m.searchedChats![index].isFav == false ? Icons.star_sharp : Icons.star_sharp,
|
||||||
|
),
|
||||||
|
color: m.searchedChats![index].isFav != null && m.searchedChats![index].isFav == true ? MyColors.yellowColor : MyColors.grey35Color,
|
||||||
|
onPressed: () {
|
||||||
|
if (m.searchedChats![index].isFav == null || m.searchedChats![index].isFav == false) {
|
||||||
|
m.favoriteUser(
|
||||||
|
userID: AppState().chatDetails!.response!.id!,
|
||||||
|
targetUserID: m.searchedChats![index].id!,
|
||||||
|
);
|
||||||
|
} else if (m.searchedChats![index].isFav == true) {
|
||||||
|
m.unFavoriteUser(
|
||||||
|
userID: AppState().chatDetails!.response!.id!,
|
||||||
|
targetUserID: m.searchedChats![index].id!,
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
m.favoriteUser(
|
||||||
|
userID: AppState().chatDetails!.response!.id!,
|
||||||
|
targetUserID: m.searchedChats![index].id!,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
minVerticalPadding: 0,
|
||||||
|
onTap: () {
|
||||||
|
Navigator.pushNamed(
|
||||||
|
context,
|
||||||
|
AppRoutes.chatDetailed,
|
||||||
|
arguments: {"targetUser": m.searchedChats![index], "isNewChat": false},
|
||||||
|
).then((Object? value) {
|
||||||
|
// m.GetUserChatHistoryNotDeliveredAsync(userId: int.parse(AppState().chatDetails!.response!.id.toString()));
|
||||||
|
m.clearSelections();
|
||||||
|
m.notifyListeners();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
separatorBuilder: (BuildContext context, int index) => const Padding(
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
right: 10,
|
||||||
|
left: 70,
|
||||||
|
),
|
||||||
|
child: Divider(
|
||||||
|
color: Color(
|
||||||
|
0xFFE5E5E5,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
floatingActionButton: FloatingActionButton(
|
||||||
|
child: Container(
|
||||||
|
width: 60,
|
||||||
|
height: 60,
|
||||||
|
decoration: const BoxDecoration(
|
||||||
|
shape: BoxShape.circle,
|
||||||
|
gradient: LinearGradient(
|
||||||
|
transform: GradientRotation(.46),
|
||||||
|
begin: Alignment.topRight,
|
||||||
|
end: Alignment.bottomLeft,
|
||||||
|
colors: [
|
||||||
|
MyColors.gradiantEndColor,
|
||||||
|
MyColors.gradiantStartColor,
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: const Icon(
|
||||||
|
Icons.add,
|
||||||
|
size: 30,
|
||||||
|
color: MyColors.white,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
onPressed: () async {
|
||||||
|
showMyBottomSheet(
|
||||||
|
context,
|
||||||
|
callBackFunc: () {},
|
||||||
|
child: SearchEmployeeBottomSheet(
|
||||||
|
title: LocaleKeys.searchForEmployee.tr(),
|
||||||
|
apiMode: LocaleKeys.delegate.tr(),
|
||||||
|
fromChat: true,
|
||||||
|
onSelectEmployee: (_selectedEmployee) {},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
OutlineInputBorder fieldBorder({required double radius, required int color}) {
|
||||||
|
return OutlineInputBorder(
|
||||||
|
borderRadius: BorderRadius.circular(
|
||||||
|
radius,
|
||||||
|
),
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: Color(
|
||||||
|
color,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,114 @@
|
|||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_svg/flutter_svg.dart';
|
||||||
|
import 'package:mohem_flutter_app/api/chat/chat_provider_model.dart';
|
||||||
|
import 'package:mohem_flutter_app/app_state/app_state.dart';
|
||||||
|
import 'package:mohem_flutter_app/classes/colors.dart';
|
||||||
|
import 'package:mohem_flutter_app/classes/utils.dart';
|
||||||
|
import 'package:mohem_flutter_app/config/routes.dart';
|
||||||
|
import 'package:mohem_flutter_app/extensions/string_extensions.dart';
|
||||||
|
import 'package:mohem_flutter_app/extensions/widget_extensions.dart';
|
||||||
|
import 'package:mohem_flutter_app/widgets/shimmer/dashboard_shimmer_widget.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
|
class ChatFavoriteUsersScreen extends StatelessWidget {
|
||||||
|
const ChatFavoriteUsersScreen({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
backgroundColor: MyColors.white,
|
||||||
|
body: Consumer<ChatProviderModel>(
|
||||||
|
builder: (BuildContext context, ChatProviderModel m, Widget? child) {
|
||||||
|
if (m.isLoading) {
|
||||||
|
return ChatHomeShimmer();
|
||||||
|
} else {
|
||||||
|
return m.favUsersList != null && m.favUsersList.isNotEmpty
|
||||||
|
? ListView.separated(
|
||||||
|
itemCount: m.favUsersList!.length,
|
||||||
|
padding: const EdgeInsets.only(top: 20),
|
||||||
|
shrinkWrap: true,
|
||||||
|
physics: const NeverScrollableScrollPhysics(),
|
||||||
|
itemBuilder: (BuildContext context, int index) {
|
||||||
|
return SizedBox(
|
||||||
|
height: 55,
|
||||||
|
child: ListTile(
|
||||||
|
leading: Stack(
|
||||||
|
children: <Widget>[
|
||||||
|
SvgPicture.asset(
|
||||||
|
"assets/images/user.svg",
|
||||||
|
height: 48,
|
||||||
|
width: 48,
|
||||||
|
),
|
||||||
|
Positioned(
|
||||||
|
right: 5,
|
||||||
|
bottom: 1,
|
||||||
|
child: Container(
|
||||||
|
width: 10,
|
||||||
|
height: 10,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: m.favUsersList![index].userStatus == 1 ? MyColors.green2DColor : Colors.red,
|
||||||
|
borderRadius: const BorderRadius.all(
|
||||||
|
Radius.circular(10),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
title: (m.favUsersList![index].userName!.replaceFirst(".", " ").capitalizeFirstofEach ?? "").toText14(
|
||||||
|
color: MyColors.darkTextColor,
|
||||||
|
),
|
||||||
|
trailing: IconButton(
|
||||||
|
alignment: Alignment.centerRight,
|
||||||
|
padding: EdgeInsets.zero,
|
||||||
|
icon: Icon(
|
||||||
|
m.favUsersList![index].isFav! ? Icons.star : Icons.star_border,
|
||||||
|
),
|
||||||
|
color: m.favUsersList![index].isFav! ? MyColors.yellowColor : MyColors.grey35Color,
|
||||||
|
onPressed: () {
|
||||||
|
if (m.favUsersList![index].isFav!)
|
||||||
|
m.unFavoriteUser(
|
||||||
|
userID: AppState().chatDetails!.response!.id!,
|
||||||
|
targetUserID: m.favUsersList![index].id!,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
minVerticalPadding: 0,
|
||||||
|
onTap: () {
|
||||||
|
Navigator.pushNamed(
|
||||||
|
context,
|
||||||
|
AppRoutes.chatDetailed,
|
||||||
|
arguments: {"targetUser": m.favUsersList![index], "isNewChat": false},
|
||||||
|
).then(
|
||||||
|
(Object? value) {
|
||||||
|
m.clearSelections();
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
separatorBuilder: (BuildContext context, int index) => const Padding(
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
right: 10,
|
||||||
|
left: 70,
|
||||||
|
),
|
||||||
|
child: Divider(
|
||||||
|
color: Color(
|
||||||
|
0xFFE5E5E5,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
: Column(
|
||||||
|
children: <Widget>[
|
||||||
|
Utils.getNoDataWidget(context).expanded,
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,137 @@
|
|||||||
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:mohem_flutter_app/api/my_attendance_api_client.dart';
|
||||||
|
import 'package:mohem_flutter_app/classes/utils.dart';
|
||||||
|
import 'package:mohem_flutter_app/config/routes.dart';
|
||||||
|
import 'package:mohem_flutter_app/extensions/int_extensions.dart';
|
||||||
|
import 'package:mohem_flutter_app/extensions/string_extensions.dart';
|
||||||
|
import 'package:mohem_flutter_app/extensions/widget_extensions.dart';
|
||||||
|
import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
|
||||||
|
import 'package:mohem_flutter_app/models/worklist/hr/eit_otification_body_model.dart';
|
||||||
|
import 'package:mohem_flutter_app/models/worklist/resubmit_eit_response_model.dart';
|
||||||
|
import 'package:mohem_flutter_app/models/worklist_response_model.dart';
|
||||||
|
import 'package:mohem_flutter_app/ui/misc/request_submit_screen.dart';
|
||||||
|
import 'package:mohem_flutter_app/ui/my_attendance/dynamic_screens/dynamic_listview_screen.dart';
|
||||||
|
import 'package:mohem_flutter_app/widgets/button/default_button.dart';
|
||||||
|
import 'package:mohem_flutter_app/widgets/item_detail_view_widget.dart';
|
||||||
|
|
||||||
|
class UpdateContinueSheet extends StatefulWidget {
|
||||||
|
WorkListResponseModel? workListData;
|
||||||
|
List<GetEitCollectionNotificationBodyList>? getEitCollectionNotificationBodyList;
|
||||||
|
DynamicListViewParams? dynamicParams;
|
||||||
|
|
||||||
|
UpdateContinueSheet({this.workListData, this.getEitCollectionNotificationBodyList, this.dynamicParams, Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<UpdateContinueSheet> createState() => _UpdateContinueSheetState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _UpdateContinueSheetState extends State<UpdateContinueSheet> {
|
||||||
|
double itemHeight = 0;
|
||||||
|
double itemWidth = 0;
|
||||||
|
List<Map<String, dynamic>> validatedValues = [];
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
var size = MediaQuery.of(context).size;
|
||||||
|
itemHeight = (size.height - kToolbarHeight - 24) / 9;
|
||||||
|
itemWidth = size.width / 2;
|
||||||
|
return Column(
|
||||||
|
children: [
|
||||||
|
if ((widget.workListData?.sUBJECT ?? "").isNotEmpty) widget.workListData!.sUBJECT!.toText14().paddingOnly(top: 10, right: 21, left: 21, bottom: 21),
|
||||||
|
ListView.separated(
|
||||||
|
shrinkWrap: true,
|
||||||
|
physics: const NeverScrollableScrollPhysics(),
|
||||||
|
itemBuilder: (cxt, index) {
|
||||||
|
List<CollectionNotificationEit> dataList = widget.getEitCollectionNotificationBodyList!.isEmpty ? [] : (widget.getEitCollectionNotificationBodyList![index].collectionNotification ?? []);
|
||||||
|
dataList = dataList.where((o) => o.displayFlag == "Y").toList();
|
||||||
|
bool isOdd = false;
|
||||||
|
if (dataList.length % 2 != 0) {
|
||||||
|
isOdd = true;
|
||||||
|
dataList.add(new CollectionNotificationEit());
|
||||||
|
}
|
||||||
|
return GridView.builder(
|
||||||
|
itemCount: dataList.length,
|
||||||
|
shrinkWrap: true,
|
||||||
|
physics: const NeverScrollableScrollPhysics(),
|
||||||
|
itemBuilder: (context, index) => ItemDetailViewGridItem(
|
||||||
|
index,
|
||||||
|
dataList[index].segmentPrompt,
|
||||||
|
dataList[index].segmentValueDsp,
|
||||||
|
isNeedToShowEmptyDivider: (dataList.length == index + 1)
|
||||||
|
? isOdd
|
||||||
|
? true
|
||||||
|
: false
|
||||||
|
: false,
|
||||||
|
),
|
||||||
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||||
|
crossAxisCount: 2,
|
||||||
|
childAspectRatio: (itemWidth / itemHeight),
|
||||||
|
),
|
||||||
|
).objectContainerView();
|
||||||
|
},
|
||||||
|
separatorBuilder: (cxt, index) => 12.height,
|
||||||
|
itemCount: widget.getEitCollectionNotificationBodyList!.length,
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(right: 21, left: 21, bottom: 21),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
DefaultButton(
|
||||||
|
LocaleKeys.edit.tr(),
|
||||||
|
() => performEditAction(),
|
||||||
|
colors: const [Color(0xffE47A7E), Color(0xffDE6D71)],
|
||||||
|
).expanded,
|
||||||
|
8.width,
|
||||||
|
DefaultButton(
|
||||||
|
LocaleKeys.next.tr(),
|
||||||
|
() => performNextAction(),
|
||||||
|
colors: const [Color(0xff28C884), Color(0xff1BB271)],
|
||||||
|
).expanded,
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void performNextAction() async {
|
||||||
|
//Resubmit EIT Transaction
|
||||||
|
try {
|
||||||
|
Utils.showLoading(context);
|
||||||
|
List<Map<String, dynamic>> values = [];
|
||||||
|
if (validatedValues!.isNotEmpty) {
|
||||||
|
values = validatedValues;
|
||||||
|
} else {
|
||||||
|
for (GetEitCollectionNotificationBodyList element in widget.getEitCollectionNotificationBodyList!) {
|
||||||
|
for (CollectionNotificationEit collectionElement in element.collectionNotification!) {
|
||||||
|
values.add({
|
||||||
|
"TRANSACTION_NUMBER": collectionElement.transactionNumber,
|
||||||
|
"NAME": collectionElement.applicationColumnName,
|
||||||
|
"VARCHAR2_VALUE": collectionElement.varchar2Value,
|
||||||
|
"NUMBER_VALUE": collectionElement.numberValue,
|
||||||
|
"DATE_VALUE": collectionElement.dateValue,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ResubmitEITRequestResponse resubmitEITRequestResponse = await MyAttendanceApiClient().reSubmitEitTransaction(widget.workListData!.iTEMKEY!, widget.workListData!.nOTIFICATIONID, values);
|
||||||
|
Utils.hideLoading(context);
|
||||||
|
await Navigator.pushNamed(
|
||||||
|
context,
|
||||||
|
AppRoutes.requestSubmitScreen,
|
||||||
|
arguments: RequestSubmitScreenParams(LocaleKeys.submit.tr(), resubmitEITRequestResponse.pTRANSACTIONID!, widget.workListData!.iTEMKEY!, 'eit'),
|
||||||
|
);
|
||||||
|
} catch (ex) {
|
||||||
|
Utils.hideLoading(context);
|
||||||
|
Utils.handleException(ex, context, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void performEditAction() {
|
||||||
|
// ignore: avoid_annotating_with_dynamic
|
||||||
|
Navigator.pushNamed(context, AppRoutes.addDynamicInput, arguments: widget.dynamicParams).then((dynamic value) {
|
||||||
|
validatedValues = value;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||