Browse Source

tabbar screen

master
daivph 5 years ago
parent
commit
f18a89d244
9 changed files with 200 additions and 4 deletions
  1. +16
    -0
      assets/svg/ic_device.svg
  2. +4
    -0
      assets/svg/ic_notification.svg
  3. +6
    -0
      assets/svg/ic_person.svg
  4. +5
    -0
      assets/svg/ic_plot.svg
  5. +4
    -0
      assets/svg/ic_qr.svg
  6. +7
    -3
      lib/presentation/custom_widgets/widget_loading.dart
  7. +3
    -1
      lib/presentation/screens/plot/sc_plot.dart
  8. +150
    -0
      lib/presentation/screens/tabbar/tabbar.dart
  9. +5
    -0
      lib/utils/const_icons.dart

+ 16
- 0
assets/svg/ic_device.svg View File

<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M24 2.15625C24 2.54462 23.6852 2.85938 23.2969 2.85938C22.9085 2.85938 22.5938 2.54462 22.5938 2.15625C22.5938 1.76788 22.9085 1.45312 23.2969 1.45312C23.6852 1.45312 24 1.76788 24 2.15625Z" fill="#BDBDBD"/>
<path d="M24 4.96875C24 5.35712 23.6852 5.67188 23.2969 5.67188C22.9085 5.67188 22.5938 5.35712 22.5938 4.96875C22.5938 4.58038 22.9085 4.26562 23.2969 4.26562C23.6852 4.26562 24 4.58038 24 4.96875Z" fill="#BDBDBD"/>
<path d="M21.1406 3.5625C21.1406 3.95087 20.8259 4.26562 20.4375 4.26562C20.0491 4.26562 19.7344 3.95087 19.7344 3.5625C19.7344 3.17413 20.0491 2.85938 20.4375 2.85938C20.8259 2.85938 21.1406 3.17413 21.1406 3.5625Z" fill="#BDBDBD"/>
<path d="M21.1406 6.375C21.1406 6.76337 20.8259 7.07812 20.4375 7.07812C20.0491 7.07812 19.7344 6.76337 19.7344 6.375C19.7344 5.98663 20.0491 5.67188 20.4375 5.67188C20.8259 5.67188 21.1406 5.98663 21.1406 6.375Z" fill="#BDBDBD"/>
<path d="M18.3281 4.96875C18.3281 5.35712 18.0134 5.67188 17.625 5.67188C17.2366 5.67188 16.9219 5.35712 16.9219 4.96875C16.9219 4.58038 17.2366 4.26562 17.625 4.26562C18.0134 4.26562 18.3281 4.58038 18.3281 4.96875Z" fill="#BDBDBD"/>
<path d="M24 7.78125C24 8.16962 23.6852 8.48438 23.2969 8.48438C22.9085 8.48438 22.5938 8.16962 22.5938 7.78125C22.5938 7.39288 22.9085 7.07812 23.2969 7.07812C23.6852 7.07812 24 7.39288 24 7.78125Z" fill="#BDBDBD"/>
<path d="M1.40625 2.15625C1.40625 2.54462 1.09149 2.85938 0.703125 2.85938C0.314758 2.85938 0 2.54462 0 2.15625C0 1.76788 0.314758 1.45312 0.703125 1.45312C1.09149 1.45312 1.40625 1.76788 1.40625 2.15625Z" fill="#BDBDBD"/>
<path d="M1.40625 4.96875C1.40625 5.35712 1.09149 5.67188 0.703125 5.67188C0.314758 5.67188 0 5.35712 0 4.96875C0 4.58038 0.314758 4.26562 0.703125 4.26562C1.09149 4.26562 1.40625 4.58038 1.40625 4.96875Z" fill="#BDBDBD"/>
<path d="M4.26562 3.5625C4.26562 3.95087 3.95087 4.26562 3.5625 4.26562C3.17413 4.26562 2.85938 3.95087 2.85938 3.5625C2.85938 3.17413 3.17413 2.85938 3.5625 2.85938C3.95087 2.85938 4.26562 3.17413 4.26562 3.5625Z" fill="#BDBDBD"/>
<path d="M4.26562 6.375C4.26562 6.76337 3.95087 7.07812 3.5625 7.07812C3.17413 7.07812 2.85938 6.76337 2.85938 6.375C2.85938 5.98663 3.17413 5.67188 3.5625 5.67188C3.95087 5.67188 4.26562 5.98663 4.26562 6.375Z" fill="#BDBDBD"/>
<path d="M7.07812 4.96875C7.07812 5.35712 6.76337 5.67188 6.375 5.67188C5.98663 5.67188 5.67188 5.35712 5.67188 4.96875C5.67188 4.58038 5.98663 4.26562 6.375 4.26562C6.76337 4.26562 7.07812 4.58038 7.07812 4.96875Z" fill="#BDBDBD"/>
<path d="M1.40625 7.78125C1.40625 8.16962 1.09149 8.48438 0.703125 8.48438C0.314758 8.48438 0 8.16962 0 7.78125C0 7.39288 0.314758 7.07812 0.703125 7.07812C1.09149 7.07812 1.40625 7.39288 1.40625 7.78125Z" fill="#BDBDBD"/>
<path d="M0.703125 24H23.2956C23.6841 24 23.9987 23.6854 23.9987 23.2969V20.074C23.9987 19.7884 23.8262 19.5317 23.562 19.4231C23.3738 19.3462 23.1912 19.2502 23.0175 19.1342C21.4986 18.1219 19.4907 18.1219 17.9718 19.1342C17.1663 19.6707 16.1838 19.7838 15.2955 19.4934C17.688 18.6797 18.0906 16.2858 18.4085 14.3915C18.7771 12.1923 19.0642 11.2969 20.4375 11.2969C20.826 11.2969 21.1406 10.9823 21.1406 10.5938C21.1406 10.2052 20.826 9.89062 20.4375 9.89062H18.8602C15.9276 9.89062 15.2485 11.6464 14.592 13.3445C14.1848 14.3976 13.725 15.6149 12.7031 16.6983V7.07812H14.8125C15.201 7.07812 15.5156 6.76355 15.5156 6.375V4.96875C15.5156 4.5802 15.201 4.26562 14.8125 4.26562H9.1875C8.79895 4.26562 8.48438 4.5802 8.48438 4.96875V6.375C8.48438 6.76355 8.79895 7.07812 9.1875 7.07812H11.2969V16.6981C10.275 15.6151 9.81537 14.3978 9.40796 13.3451C8.75153 11.6464 8.07239 9.89062 5.13977 9.89062H3.5625C3.17395 9.89062 2.85938 10.2052 2.85938 10.5938C2.85938 10.9823 3.17395 11.2969 3.5625 11.2969C4.93579 11.2969 5.2229 12.193 5.59222 14.3923C5.91229 16.2977 6.31677 18.7051 8.74438 19.5064C7.86365 19.7849 6.89227 19.665 6.09558 19.1342C4.57672 18.1219 2.57007 18.1219 1.05139 19.1342C0.926331 19.2171 0.793213 19.264 0.6427 19.277C0.279419 19.3077 0 19.6121 0 19.9774V23.2969C0 23.6854 0.314575 24 0.703125 24ZM19.0312 20.4844H20.4375C20.826 20.4844 21.1406 20.799 21.1406 21.1875C21.1406 21.576 20.826 21.8906 20.4375 21.8906H19.0312C18.6427 21.8906 18.3281 21.576 18.3281 21.1875C18.3281 20.799 18.6427 20.4844 19.0312 20.4844ZM12.7031 21.8906H11.2969C10.9083 21.8906 10.5938 21.576 10.5938 21.1875C10.5938 20.799 10.9083 20.4844 11.2969 20.4844H12.7031C13.0917 20.4844 13.4062 20.799 13.4062 21.1875C13.4062 21.576 13.0917 21.8906 12.7031 21.8906ZM3.5625 20.4844H4.96875C5.3573 20.4844 5.67188 20.799 5.67188 21.1875C5.67188 21.576 5.3573 21.8906 4.96875 21.8906H3.5625C3.17395 21.8906 2.85938 21.576 2.85938 21.1875C2.85938 20.799 3.17395 20.4844 3.5625 20.4844Z" fill="#BDBDBD"/>
<path d="M10.5938 0C10.2052 0 9.89062 0.314575 9.89062 0.703125V2.85938H14.1094V0.703125C14.1094 0.314575 13.7948 0 13.4062 0H10.5938Z" fill="#BDBDBD"/>
</svg>

+ 4
- 0
assets/svg/ic_notification.svg View File

<svg width="19" height="24" viewBox="0 0 19 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M9.51 24C11.0396 24 12.2946 22.8161 12.4074 21.3135H6.61267C6.72543 22.8161 7.97798 24 9.51 24Z" fill="#BDBDBD"/>
<path d="M18.7634 18.6097C16.9054 16.5752 16.7779 13.4793 16.7706 12.8665V6.44674C16.7706 2.8851 13.883 0 10.3239 0H8.69134C5.1297 0 2.2446 2.88755 2.2446 6.44674V13.0038C2.21764 13.8495 1.99948 16.6978 0.254202 18.6097C-0.177214 19.0828 0.156153 19.8402 0.795924 19.8402H6.88723H12.1304H18.2217C18.8639 19.8427 19.1949 19.0828 18.7634 18.6097Z" fill="#BDBDBD"/>
</svg>

+ 6
- 0
assets/svg/ic_person.svg View File

<svg width="20" height="24" viewBox="0 0 20 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M10.0223 11.7376C12.6907 11.7376 14.8541 9.11006 14.8541 5.86882C14.8541 2.62752 14.1438 0 10.0223 0C5.90083 0 5.19043 2.62752 5.19043 5.86882C5.19043 9.11006 7.35379 11.7376 10.0223 11.7376Z" fill="#BDBDBD"/>
<path d="M0.896092 20.6985C0.895269 20.5009 0.894446 20.6428 0.896092 20.6985V20.6985Z" fill="#BDBDBD"/>
<path d="M19.1481 20.8529C19.1507 20.7988 19.149 20.4775 19.1481 20.8529V20.8529Z" fill="#BDBDBD"/>
<path d="M19.1378 20.4615C19.0484 14.8152 18.3109 13.2063 12.668 12.1879C12.668 12.1879 11.8737 13.2 10.0222 13.2C8.17081 13.2 7.37634 12.1879 7.37634 12.1879C1.79497 13.1952 1.0127 14.7802 0.909847 20.2781C0.901413 20.727 0.897505 20.7506 0.895996 20.6985C0.896339 20.7961 0.89675 20.9767 0.89675 21.2917C0.89675 21.2917 2.2402 24 10.0222 24C17.8041 24 19.1477 21.2917 19.1477 21.2917C19.1477 21.0893 19.1479 20.9486 19.1481 20.8529C19.1466 20.8851 19.1435 20.8227 19.1378 20.4615Z" fill="#BDBDBD"/>
</svg>

+ 5
- 0
assets/svg/ic_plot.svg View File

<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M23.625 19.5H18.4338C18.5364 19.1177 18.8179 18.557 19.5909 18.3638C19.6869 18.3393 19.7694 18.2777 19.8202 18.1926C19.8711 18.1075 19.8861 18.0056 19.862 17.9094C19.838 17.8133 19.7768 17.7305 19.6919 17.6793C19.607 17.6281 19.5052 17.6126 19.4089 17.6362C19.0233 17.7272 18.6673 17.9153 18.375 18.1828C18.3755 18.1333 18.4023 16.7859 19.5909 16.4888C19.687 16.4643 19.7695 16.4028 19.8203 16.3177C19.8711 16.2325 19.8862 16.1307 19.8621 16.0345C19.8381 15.9383 19.7769 15.8555 19.692 15.8043C19.6071 15.7531 19.5053 15.7376 19.409 15.7612C19.0233 15.8522 18.6673 16.0403 18.375 16.3078V15.375C18.375 15.2755 18.3355 15.1802 18.2651 15.1098C18.1948 15.0395 18.0994 15 18 15C17.9005 15 17.8051 15.0395 17.7348 15.1098C17.6645 15.1802 17.625 15.2755 17.625 15.375V16.3078C17.3326 16.0403 16.9766 15.8522 16.591 15.7612C16.4946 15.7376 16.3929 15.7531 16.308 15.8043C16.2231 15.8555 16.1619 15.9383 16.1379 16.0345C16.1138 16.1307 16.1288 16.2325 16.1797 16.3177C16.2305 16.4028 16.3129 16.4643 16.409 16.4888C17.5959 16.7856 17.6244 18.13 17.625 18.1828C17.3326 17.9153 16.9766 17.7272 16.591 17.6362C16.4946 17.6126 16.3929 17.6281 16.308 17.6793C16.2231 17.7305 16.1619 17.8133 16.1379 17.9095C16.1138 18.0057 16.1288 18.1075 16.1797 18.1926C16.2305 18.2778 16.3129 18.3393 16.409 18.3638C17.182 18.5571 17.4634 19.1177 17.566 19.5H12.4339C12.5365 19.1177 12.8179 18.5571 13.5909 18.3638C13.687 18.3393 13.7694 18.2778 13.8202 18.1926C13.8711 18.1075 13.8861 18.0057 13.862 17.9095C13.838 17.8133 13.7768 17.7305 13.6919 17.6793C13.607 17.6281 13.5052 17.6126 13.4089 17.6362C13.0233 17.7272 12.6673 17.9154 12.375 18.1828C12.3755 18.1333 12.4023 16.7859 13.591 16.4888C13.687 16.4643 13.7695 16.4028 13.8203 16.3177C13.8712 16.2325 13.8862 16.1307 13.8621 16.0345C13.8381 15.9383 13.7769 15.8555 13.692 15.8043C13.6071 15.7531 13.5053 15.7376 13.409 15.7612C13.0233 15.8522 12.6674 16.0403 12.375 16.3078V15.375C12.375 15.2755 12.3355 15.1802 12.2651 15.1098C12.1948 15.0395 12.0994 15 12 15C11.9005 15 11.8051 15.0395 11.7348 15.1098C11.6645 15.1802 11.625 15.2755 11.625 15.375V16.3078C11.3326 16.0403 10.9766 15.8522 10.591 15.7612C10.4947 15.7376 10.3929 15.7531 10.308 15.8043C10.2231 15.8555 10.1619 15.9383 10.1379 16.0345C10.1138 16.1307 10.1288 16.2325 10.1797 16.3177C10.2305 16.4028 10.313 16.4643 10.409 16.4888C11.5959 16.7856 11.6244 18.13 11.625 18.1828C11.3326 17.9153 10.9766 17.7272 10.591 17.6362C10.4947 17.6126 10.3929 17.6281 10.308 17.6793C10.2231 17.7305 10.1619 17.8133 10.1379 17.9095C10.1138 18.0057 10.1288 18.1075 10.1797 18.1926C10.2305 18.2778 10.313 18.3393 10.409 18.3638C11.182 18.5571 11.4634 19.1177 11.5661 19.5H6.43396C6.53657 19.1177 6.818 18.5571 7.59092 18.3638C7.639 18.3522 7.6843 18.3311 7.72421 18.3019C7.76412 18.2727 7.79784 18.2358 7.82345 18.1935C7.84906 18.1512 7.86603 18.1042 7.8734 18.0553C7.88077 18.0063 7.87839 17.9564 7.8664 17.9085C7.8544 17.8605 7.83302 17.8153 7.8035 17.7756C7.77398 17.7359 7.73689 17.7025 7.69438 17.6771C7.65187 17.6518 7.60477 17.6352 7.5558 17.6282C7.50683 17.6212 7.45696 17.6239 7.40905 17.6362C7.02336 17.7272 6.66737 17.9153 6.37499 18.1828C6.37555 18.1333 6.40232 16.7859 7.59092 16.4888C7.68678 16.4641 7.76899 16.4026 7.81962 16.3175C7.87025 16.2324 7.88519 16.1308 7.86119 16.0348C7.83718 15.9387 7.77618 15.8561 7.69148 15.8048C7.60678 15.7536 7.50525 15.7379 7.40905 15.7612C7.02336 15.8522 6.66737 16.0403 6.37499 16.3078V15.375C6.37499 15.2755 6.33548 15.1802 6.26515 15.1098C6.19483 15.0395 6.09944 15 5.99999 15C5.90053 15 5.80515 15.0395 5.73482 15.1098C5.6645 15.1802 5.62499 15.2755 5.62499 15.375V16.3078C5.33261 16.0403 4.97662 15.8522 4.59093 15.7612C4.49472 15.7379 4.3932 15.7536 4.3085 15.8048C4.2238 15.8561 4.1628 15.9387 4.13879 16.0348C4.11478 16.1308 4.12972 16.2324 4.18035 16.3175C4.23098 16.4026 4.31319 16.4641 4.40905 16.4888C5.59588 16.7856 5.62433 18.13 5.62499 18.1828C5.33261 17.9153 4.97662 17.7272 4.59093 17.6362C4.49472 17.6129 4.3932 17.6286 4.3085 17.6798C4.2238 17.7311 4.1628 17.8137 4.13879 17.9098C4.11478 18.0058 4.12972 18.1074 4.18035 18.1925C4.23098 18.2775 4.31319 18.3391 4.40905 18.3638C5.18197 18.5571 5.46341 19.1177 5.56602 19.5H0.374999C0.275543 19.5 0.180161 19.5395 0.109835 19.6099C0.0395087 19.6802 0 19.7756 0 19.875L0 21.375C0 21.4745 0.0395087 21.5699 0.109835 21.6402C0.180161 21.7105 0.275543 21.75 0.374999 21.75H0.749999V23.625C0.749999 23.7245 0.789507 23.8199 0.859833 23.8902C0.930159 23.9605 1.02554 24 1.125 24H3.37499C3.47445 24 3.56983 23.9605 3.64016 23.8902C3.71048 23.8199 3.74999 23.7245 3.74999 23.625V21.75H20.25V23.625C20.25 23.7244 20.2895 23.8198 20.3598 23.8901C20.4301 23.9605 20.5255 24 20.625 24H22.875C22.9744 24 23.0698 23.9605 23.1401 23.8901C23.2104 23.8198 23.25 23.7244 23.25 23.625V21.75H23.625C23.7244 21.75 23.8198 21.7105 23.8901 21.6402C23.9604 21.5698 24 21.4744 24 21.375V19.875C24 19.7755 23.9604 19.6802 23.8901 19.6098C23.8198 19.5395 23.7244 19.5 23.625 19.5Z" fill="#EECE52"/>
<path d="M23.625 11.9999H18.4329C18.5348 11.6176 18.8156 11.0541 19.5907 10.8603C19.6868 10.8358 19.7693 10.7743 19.8201 10.6891C19.8709 10.604 19.8859 10.5022 19.8619 10.406C19.8378 10.3098 19.7767 10.227 19.6917 10.1758C19.6068 10.1246 19.5051 10.1091 19.4088 10.1327C19.0232 10.2237 18.6673 10.4118 18.375 10.6793C18.3755 10.6297 18.4023 9.28239 19.5909 8.9853C19.687 8.96081 19.7695 8.89926 19.8203 8.81411C19.8711 8.72896 19.8862 8.62716 19.8621 8.53096C19.8381 8.43476 19.7769 8.35201 19.692 8.3008C19.6071 8.24959 19.5053 8.2341 19.409 8.25771C19.0233 8.34864 18.6673 8.5368 18.375 8.80427V7.87146C18.375 7.772 18.3355 7.67662 18.2651 7.6063C18.1948 7.53597 18.0994 7.49646 18 7.49646C17.9005 7.49646 17.8051 7.53597 17.7348 7.6063C17.6645 7.67662 17.625 7.772 17.625 7.87146V8.80427C17.3326 8.5368 16.9766 8.34864 16.591 8.25771C16.4946 8.2341 16.3929 8.24959 16.308 8.3008C16.2231 8.35201 16.1619 8.43476 16.1379 8.53096C16.1138 8.62716 16.1288 8.72896 16.1797 8.81411C16.2305 8.89926 16.3129 8.96081 16.409 8.9853C17.5959 9.28202 17.6244 10.6264 17.625 10.6793C17.3326 10.4118 16.9766 10.2236 16.591 10.1327C16.4946 10.1091 16.3929 10.1246 16.308 10.1758C16.2231 10.227 16.1619 10.3098 16.1379 10.406C16.1138 10.5022 16.1288 10.604 16.1797 10.6891C16.2305 10.7743 16.3129 10.8358 16.409 10.8603C17.1842 11.0541 17.4651 11.6176 17.5668 11.9999H12.4329C12.5348 11.6176 12.8156 11.0541 13.5907 10.8603C13.6868 10.8358 13.7693 10.7743 13.8201 10.6891C13.8709 10.604 13.886 10.5022 13.8619 10.406C13.8378 10.3098 13.7767 10.227 13.6918 10.1758C13.6068 10.1246 13.5051 10.1091 13.4088 10.1327C13.0232 10.2237 12.6673 10.4118 12.375 10.6793C12.3755 10.6297 12.4023 9.28239 13.591 8.9853C13.687 8.96081 13.7695 8.89926 13.8203 8.81411C13.8712 8.72896 13.8862 8.62716 13.8621 8.53096C13.8381 8.43476 13.7769 8.35201 13.692 8.3008C13.6071 8.24959 13.5053 8.2341 13.409 8.25771C13.0233 8.34864 12.6674 8.5368 12.375 8.80427V7.87146C12.375 7.772 12.3355 7.67662 12.2651 7.6063C12.1948 7.53597 12.0994 7.49646 12 7.49646C11.9005 7.49646 11.8051 7.53597 11.7348 7.6063C11.6645 7.67662 11.625 7.772 11.625 7.87146V8.80427C11.3326 8.5368 10.9766 8.34864 10.591 8.25771C10.4947 8.2341 10.3929 8.24959 10.308 8.3008C10.2231 8.35201 10.1619 8.43476 10.1379 8.53096C10.1138 8.62716 10.1288 8.72896 10.1797 8.81411C10.2305 8.89926 10.313 8.96081 10.409 8.9853C11.5959 9.28202 11.6244 10.6264 11.625 10.6793C11.3326 10.4118 10.9766 10.2236 10.591 10.1327C10.4947 10.1091 10.3929 10.1246 10.308 10.1758C10.2231 10.227 10.1619 10.3098 10.1379 10.406C10.1138 10.5022 10.1288 10.604 10.1797 10.6891C10.2305 10.7743 10.313 10.8358 10.409 10.8603C11.1842 11.0541 11.4651 11.6176 11.5669 11.9999H6.43302C6.53488 11.6176 6.81575 11.0541 7.59083 10.8603C7.68669 10.8356 7.7689 10.774 7.81953 10.6889C7.87016 10.6039 7.8851 10.5022 7.86109 10.4062C7.83709 10.3102 7.77608 10.2275 7.69138 10.1763C7.60668 10.1251 7.50516 10.1094 7.40895 10.1327C7.0233 10.2237 6.66734 10.4118 6.37499 10.6793C6.37555 10.6297 6.40232 9.28239 7.59092 8.9853C7.68678 8.96061 7.76899 8.89901 7.81962 8.81395C7.87025 8.72888 7.88519 8.62725 7.86119 8.53122C7.83718 8.43518 7.77618 8.35253 7.69148 8.30129C7.60678 8.25006 7.50525 8.23439 7.40905 8.25771C7.02336 8.34864 6.66737 8.5368 6.37499 8.80427V7.87146C6.37499 7.772 6.33548 7.67662 6.26515 7.6063C6.19483 7.53597 6.09944 7.49646 5.99999 7.49646C5.90053 7.49646 5.80515 7.53597 5.73482 7.6063C5.6645 7.67662 5.62499 7.772 5.62499 7.87146V8.80427C5.33261 8.5368 4.97662 8.34864 4.59093 8.25771C4.54302 8.24537 4.49315 8.24263 4.44417 8.24965C4.3952 8.25667 4.34811 8.27331 4.30559 8.29861C4.26308 8.32391 4.226 8.35738 4.19648 8.39708C4.16695 8.43677 4.14558 8.48192 4.13358 8.52991C4.12158 8.57791 4.1192 8.6278 4.12657 8.67672C4.13394 8.72564 4.15092 8.77262 4.17653 8.81495C4.20213 8.85728 4.23586 8.89412 4.27577 8.92336C4.31568 8.9526 4.36097 8.97365 4.40905 8.9853C5.59588 9.28202 5.62433 10.6264 5.62499 10.6793C5.33261 10.4118 4.97662 10.2236 4.59093 10.1327C4.49472 10.1094 4.3932 10.1251 4.3085 10.1763C4.2238 10.2275 4.1628 10.3102 4.13879 10.4062C4.11478 10.5022 4.12972 10.6039 4.18035 10.6889C4.23098 10.774 4.31319 10.8356 4.40905 10.8603C5.18422 11.0541 5.46515 11.6176 5.56686 11.9999H0.374999C0.275543 11.9999 0.180161 12.0394 0.109835 12.1098C0.0395087 12.1801 0 12.2755 0 12.3749L0 13.8749C0 13.9744 0.0395087 14.0698 0.109835 14.1401C0.180161 14.2104 0.275543 14.2499 0.374999 14.2499H0.749999V16.1249C0.746952 16.4483 1.16109 16.6233 1.39017 16.3901L3.53038 14.2499H20.4667L22.6069 16.3901C22.836 16.6233 23.25 16.4483 23.247 16.1249V14.2499H23.625C23.7244 14.2499 23.8198 14.2104 23.8901 14.1401C23.9604 14.0698 24 13.9744 24 13.8749V12.3749C24 12.2755 23.9604 12.1801 23.8901 12.1098C23.8198 12.0394 23.7244 11.9999 23.625 11.9999Z" fill="#EECE52"/>
<path d="M23.625 4.49999H18.4338C18.5364 4.11768 18.8179 3.55701 19.5909 3.36379C19.6869 3.3393 19.7694 3.27775 19.8202 3.1926C19.8711 3.10745 19.8861 3.00565 19.862 2.90945C19.838 2.81325 19.7768 2.7305 19.6919 2.67929C19.607 2.62808 19.5052 2.61259 19.4089 2.6362C19.0233 2.72716 18.6673 2.91534 18.375 3.18281C18.3755 3.13326 18.4023 1.78593 19.5909 1.48884C19.687 1.46435 19.7695 1.4028 19.8203 1.31765C19.8711 1.2325 19.8862 1.1307 19.8621 1.0345C19.8381 0.938302 19.7769 0.855546 19.692 0.804338C19.6071 0.753129 19.5053 0.737636 19.409 0.761249C19.0233 0.852182 18.6673 1.04034 18.375 1.30781V0.374999C18.375 0.275543 18.3355 0.180161 18.2651 0.109835C18.1948 0.0395087 18.0994 0 18 0C17.9005 0 17.8051 0.0395087 17.7348 0.109835C17.6645 0.180161 17.625 0.275543 17.625 0.374999V1.30781C17.3326 1.04034 16.9766 0.852184 16.591 0.761249C16.4946 0.737636 16.3929 0.753129 16.308 0.804338C16.2231 0.855546 16.1619 0.938302 16.1379 1.0345C16.1138 1.1307 16.1288 1.2325 16.1797 1.31765C16.2305 1.4028 16.3129 1.46435 16.409 1.48884C17.5958 1.78551 17.6243 3.12993 17.625 3.18281C17.3326 2.91534 16.9766 2.72718 16.591 2.63625C16.4946 2.61263 16.3929 2.62813 16.308 2.67933C16.2231 2.73054 16.1619 2.8133 16.1379 2.9095C16.1138 3.00569 16.1288 3.1075 16.1797 3.19265C16.2305 3.27779 16.3129 3.33935 16.409 3.36384C17.1819 3.55701 17.4633 4.11768 17.566 4.49999H12.4339C12.5365 4.11768 12.8179 3.55701 13.5909 3.36379C13.687 3.3393 13.7694 3.27775 13.8202 3.1926C13.8711 3.10745 13.8861 3.00565 13.862 2.90945C13.838 2.81325 13.7768 2.7305 13.6919 2.67929C13.607 2.62808 13.5052 2.61259 13.4089 2.6362C13.0233 2.72716 12.6673 2.91534 12.375 3.18281C12.3755 3.13326 12.4023 1.78593 13.591 1.48884C13.687 1.46435 13.7695 1.4028 13.8203 1.31765C13.8712 1.2325 13.8862 1.1307 13.8621 1.0345C13.8381 0.938302 13.7769 0.855546 13.692 0.804338C13.6071 0.753129 13.5053 0.737636 13.409 0.761249C13.0233 0.852182 12.6674 1.04034 12.375 1.30781V0.374999C12.375 0.275543 12.3355 0.180161 12.2651 0.109835C12.1948 0.0395087 12.0994 0 12 0C11.9005 0 11.8051 0.0395087 11.7348 0.109835C11.6645 0.180161 11.625 0.275543 11.625 0.374999V1.30781C11.3326 1.04034 10.9766 0.852184 10.591 0.761249C10.4947 0.737636 10.3929 0.753129 10.308 0.804338C10.2231 0.855546 10.1619 0.938302 10.1379 1.0345C10.1138 1.1307 10.1288 1.2325 10.1797 1.31765C10.2305 1.4028 10.313 1.46435 10.409 1.48884C11.5958 1.78551 11.6243 3.12993 11.625 3.18281C11.3326 2.91534 10.9766 2.72718 10.591 2.63625C10.4947 2.61263 10.3929 2.62813 10.308 2.67933C10.2231 2.73054 10.1619 2.8133 10.1379 2.9095C10.1138 3.00569 10.1288 3.1075 10.1797 3.19265C10.2305 3.27779 10.313 3.33935 10.409 3.36384C11.1819 3.55701 11.4634 4.11768 11.566 4.49999H6.43396C6.53657 4.11768 6.818 3.55701 7.59092 3.36379C7.68678 3.3391 7.76899 3.2775 7.81962 3.19244C7.87025 3.10737 7.88519 3.00574 7.86119 2.90971C7.83718 2.81367 7.77618 2.73102 7.69148 2.67978C7.60678 2.62855 7.50525 2.61288 7.40905 2.6362C7.02335 2.72715 6.66736 2.91532 6.37499 3.18281C6.37555 3.13326 6.40232 1.78593 7.59092 1.48884C7.68678 1.46415 7.76899 1.40255 7.81962 1.31749C7.87025 1.23242 7.88519 1.13079 7.86119 1.03476C7.83718 0.93872 7.77618 0.856071 7.69148 0.804835C7.60678 0.753598 7.50525 0.737931 7.40905 0.761249C7.02336 0.852182 6.66737 1.04034 6.37499 1.30781V0.374999C6.37499 0.275543 6.33548 0.180161 6.26515 0.109835C6.19483 0.0395087 6.09944 0 5.99999 0C5.90053 0 5.80515 0.0395087 5.73482 0.109835C5.6645 0.180161 5.62499 0.275543 5.62499 0.374999V1.30781C5.33261 1.04034 4.97662 0.852182 4.59093 0.761249C4.49472 0.737931 4.3932 0.753598 4.3085 0.804835C4.2238 0.856071 4.1628 0.93872 4.13879 1.03476C4.11478 1.13079 4.12972 1.23242 4.18035 1.31749C4.23098 1.40255 4.31319 1.46415 4.40905 1.48884C5.59588 1.78551 5.62433 3.12993 5.62499 3.18281C5.33261 2.91534 4.97662 2.72718 4.59093 2.63625C4.54302 2.6239 4.49315 2.62117 4.44417 2.62819C4.3952 2.63521 4.34811 2.65185 4.30559 2.67715C4.26308 2.70245 4.226 2.73591 4.19648 2.77561C4.16695 2.81531 4.14558 2.86046 4.13358 2.90845C4.12158 2.95645 4.1192 3.00634 4.12657 3.05526C4.13394 3.10418 4.15092 3.15116 4.17653 3.19349C4.20213 3.23581 4.23586 3.27266 4.27577 3.3019C4.31568 3.33113 4.36097 3.35218 4.40905 3.36384C5.18197 3.55701 5.46341 4.11768 5.56602 4.49999H0.374999C0.275543 4.49999 0.180161 4.5395 0.109835 4.60983C0.0395087 4.68015 0 4.77554 0 4.87499L0 6.37499C0 6.47444 0.0395087 6.56983 0.109835 6.64015C0.180161 6.71048 0.275543 6.74999 0.374999 6.74999H0.749999V8.62498C0.746952 8.94842 1.16109 9.12331 1.39017 8.89016L3.53034 6.74999H20.4667L22.6069 8.89016C22.836 9.12331 23.25 8.94842 23.247 8.62498V6.74999H23.625C23.7244 6.74999 23.8198 6.71048 23.8901 6.64015C23.9604 6.56983 24 6.47444 24 6.37499V4.87499C24 4.77554 23.9604 4.68015 23.8901 4.60983C23.8198 4.5395 23.7244 4.49999 23.625 4.49999Z" fill="#EECE52"/>
</svg>

+ 4
- 0
assets/svg/ic_qr.svg View File

<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M0 21.4059C0 22.8361 1.16391 24 2.59406 24H21.4059C22.8361 24 24 22.8361 24 21.4059V12.7031H0V21.4059ZM16.0144 18.75H18.2447C18.5489 18.75 18.7969 18.502 18.7969 18.1978V15.9675C18.7969 15.0374 20.2031 15.037 20.2031 15.9675V18.1978C20.2031 19.2778 19.3247 20.1562 18.2447 20.1562H16.0144C15.0842 20.1562 15.0839 18.75 16.0144 18.75ZM3.79688 15.9675C3.79688 15.0374 5.20312 15.037 5.20312 15.9675V18.1978C5.20312 18.502 5.45109 18.75 5.75531 18.75H7.98563C8.91581 18.75 8.91609 20.1562 7.98563 20.1562H5.75531C4.67531 20.1562 3.79688 19.2778 3.79688 18.1978V15.9675Z" fill="#BDBDBD"/>
<path d="M21.4059 0C16.4644 0 32.4709 0 2.59406 0C1.16391 0 0 1.16391 0 2.59406V11.2969H24V2.59406C24 1.16391 22.8361 0 21.4059 0ZM7.98563 5.15625H5.75531C5.45109 5.15625 5.20312 5.40422 5.20312 5.70844V7.93875C5.20312 8.86889 3.79688 8.86922 3.79688 7.93875V5.70844C3.79688 4.62844 4.67531 3.75 5.75531 3.75H7.98563C8.91581 3.75 8.91609 5.15625 7.98563 5.15625ZM20.2031 7.93875C20.2031 8.86889 18.7969 8.86922 18.7969 7.93875V5.70844C18.7969 5.40422 18.5489 5.15625 18.2447 5.15625H16.0144C15.0842 5.15625 15.0839 3.75 16.0144 3.75H18.2447C19.3247 3.75 20.2031 4.62844 20.2031 5.70844V7.93875Z" fill="#BDBDBD"/>
</svg>

+ 7
- 3
lib/presentation/custom_widgets/widget_loading.dart View File

import 'package:farm_tpf/utils/const_assets.dart';
import 'package:farm_tpf/utils/const_icons.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';


class LoadingDialog { class LoadingDialog {
static void showLoadingDialog(BuildContext context) { static void showLoadingDialog(BuildContext context) {
), ),
Container( Container(
alignment: Alignment.center, alignment: Alignment.center,
child: FlutterLogo(
size: 25,
),
child: SizedBox(
width: 25,
height: 25,
child: Image.asset(AppAssets.logo)),
), ),
Container( Container(
alignment: Alignment.center, alignment: Alignment.center,

+ 3
- 1
lib/presentation/screens/plot/sc_plot.dart View File

import 'package:farm_tpf/presentation/screens/plot/widget_search.dart'; import 'package:farm_tpf/presentation/screens/plot/widget_search.dart';
import 'package:farm_tpf/presentation/screens/plot_detail/sc_plot_detail.dart'; import 'package:farm_tpf/presentation/screens/plot_detail/sc_plot_detail.dart';
import 'package:farm_tpf/presentation/screens/plot_detail/sc_plot_information.dart'; import 'package:farm_tpf/presentation/screens/plot_detail/sc_plot_information.dart';
import 'package:farm_tpf/presentation/screens/tabbar/tabbar.dart';
import 'package:farm_tpf/utils/const_color.dart'; import 'package:farm_tpf/utils/const_color.dart';
import 'package:farm_tpf/utils/const_common.dart'; import 'package:farm_tpf/utils/const_common.dart';
import 'package:farm_tpf/utils/pref.dart'; import 'package:farm_tpf/utils/pref.dart';
IconButton( IconButton(
icon: Icon(FontAwesomeIcons.qrcode), icon: Icon(FontAwesomeIcons.qrcode),
onPressed: () { onPressed: () {
scan(context);
// scan(context);
Get.to(TabbarScreen());
}) })
], ],
), ),

+ 150
- 0
lib/presentation/screens/tabbar/tabbar.dart View File

import 'package:farm_tpf/main.dart';
import 'package:farm_tpf/presentation/screens/control_device/sc_control_device.dart';
import 'package:farm_tpf/presentation/screens/notification/sc_notification.dart';
import 'package:farm_tpf/presentation/screens/plot/sc_plot.dart';
import 'package:farm_tpf/presentation/screens/profile/sc_update_profile.dart';
import 'package:farm_tpf/utils/const_color.dart';
import 'package:farm_tpf/utils/const_icons.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:get/get.dart';

class TabbarScreen extends StatefulWidget {
static Route route() {
return MaterialPageRoute<void>(builder: (_) => TabbarScreen());
}

@override
_TabbarScreenState createState() => _TabbarScreenState();
}

class _TabbarScreenState extends State<TabbarScreen> {
final changeTabbar = Get.put(TabbarSelected());
List<TabbarItem> itemsTabbar = [
TabbarItem(
icon: AppIcons.icPlot, title: 'Lô trồng', index: TabBarIndex.plot),
TabbarItem(
icon: AppIcons.icDevice, title: 'Thiết bị', index: TabBarIndex.device),
TabbarItem(icon: AppIcons.icQr, title: 'Quét QR', index: TabBarIndex.qr),
TabbarItem(
icon: AppIcons.icNotification,
title: 'Thông báo',
index: TabBarIndex.notification),
TabbarItem(
icon: AppIcons.icPerson, title: 'Cá nhân', index: TabBarIndex.account)
];

@override
void initState() {
super.initState();
changeTabbar.initValue();
}

@override
Widget build(BuildContext context) {
return Container(
color: Colors.white,
child: SafeArea(
top: false,
bottom: true,
child: Scaffold(
body: GetBuilder<TabbarSelected>(builder: (tabbarSelected) {
switch (tabbarSelected.index) {
case TabBarIndex.plot:
return PlotListScreen();
break;
case TabBarIndex.device:
return ControlDeviceScreen();
break;
case TabBarIndex.qr:
// scan(context);
return PlotListScreen();
break;
case TabBarIndex.notification:
return NotificationScreen();
break;
case TabBarIndex.account:
return UpdateProfileScreen();
break;
default:
return PlotListScreen();
}
}),
bottomNavigationBar: Container(
padding: EdgeInsets.all(4),
height: 70,
decoration: BoxDecoration(
color: Colors.white,
border: Border(
top: BorderSide(color: Colors.grey, width: 0.35))),
child: GetBuilder<TabbarSelected>(builder: (tabbarSelected) {
return Center(
child: ListView.builder(
scrollDirection: Axis.horizontal,
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
itemCount: itemsTabbar.length,
itemBuilder: (context, index) {
return GestureDetector(
child: Container(
width: (Get.width - 20) / 5,
margin: EdgeInsets.all(1),
padding: EdgeInsets.all(10),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SvgPicture.asset(
itemsTabbar[index].icon,
width: 24,
height: 24,
color: (tabbarSelected.index ==
itemsTabbar[index].index)
? AppColors.YELLOW
: AppColors.GRAY1,
),
Flexible(
child: Text(
itemsTabbar[index].title,
style: TextStyle(
color: (tabbarSelected.index ==
itemsTabbar[index].index)
? AppColors.DEFAULT
: Colors.grey,
fontSize: 11),
),
)
],
)),
onTap: () {
changeTabbar
.changeIndex(itemsTabbar[index].index);
},
);
}),
);
})),
)));
}
}

class TabbarSelected extends GetxController {
TabBarIndex index;
void initValue() {
index = TabBarIndex.plot;
update();
}

void changeIndex(TabBarIndex changedIndex) {
index = changedIndex;
update();
}
}

enum TabBarIndex { plot, device, qr, notification, account }

class TabbarItem {
TabBarIndex index;
String icon;
String title;
TabbarItem({this.icon, this.title, this.index});
}

+ 5
- 0
lib/utils/const_icons.dart View File

static const baseAssets = 'assets/svg/'; static const baseAssets = 'assets/svg/';
static const appLogo = baseAssets + 'logo.svg'; static const appLogo = baseAssets + 'logo.svg';
static const appLogoWithSlogan = baseAssets + 'logoWithSlogan.svg'; static const appLogoWithSlogan = baseAssets + 'logoWithSlogan.svg';
static const icPlot = baseAssets + 'ic_plot.svg';
static const icDevice = baseAssets + 'ic_device.svg';
static const icNotification = baseAssets + 'ic_notification.svg';
static const icQr = baseAssets + 'ic_qr.svg';
static const icPerson = baseAssets + 'ic_person.svg';
} }

Loading…
Cancel
Save