Feat: add slicing home

This commit is contained in:
orangdeso 2025-02-16 23:49:03 +07:00
parent 59a1281dbb
commit 2cb2af96b8
42 changed files with 583 additions and 32 deletions

View File

@ -19,6 +19,12 @@
"packageUri": "lib/", "packageUri": "lib/",
"languageVersion": "2.17" "languageVersion": "2.17"
}, },
{
"name": "carousel_slider",
"rootUri": "file:///C:/Users/ASUS/AppData/Local/Pub/Cache/hosted/pub.dev/carousel_slider-5.0.0",
"packageUri": "lib/",
"languageVersion": "2.12"
},
{ {
"name": "characters", "name": "characters",
"rootUri": "file:///C:/Users/ASUS/AppData/Local/Pub/Cache/hosted/pub.dev/characters-1.3.0", "rootUri": "file:///C:/Users/ASUS/AppData/Local/Pub/Cache/hosted/pub.dev/characters-1.3.0",
@ -296,7 +302,7 @@
"languageVersion": "3.4" "languageVersion": "3.4"
} }
], ],
"generated": "2025-02-11T13:49:26.295004Z", "generated": "2025-02-14T14:21:57.719988Z",
"generator": "pub", "generator": "pub",
"generatorVersion": "3.5.0", "generatorVersion": "3.5.0",
"flutterRoot": "file:///D:/Flutter/flutter_sdk/flutter_3.24.0", "flutterRoot": "file:///D:/Flutter/flutter_sdk/flutter_3.24.0",

View File

@ -10,6 +10,10 @@ boolean_selector
2.17 2.17
file:///C:/Users/ASUS/AppData/Local/Pub/Cache/hosted/pub.dev/boolean_selector-2.1.1/ file:///C:/Users/ASUS/AppData/Local/Pub/Cache/hosted/pub.dev/boolean_selector-2.1.1/
file:///C:/Users/ASUS/AppData/Local/Pub/Cache/hosted/pub.dev/boolean_selector-2.1.1/lib/ file:///C:/Users/ASUS/AppData/Local/Pub/Cache/hosted/pub.dev/boolean_selector-2.1.1/lib/
carousel_slider
2.12
file:///C:/Users/ASUS/AppData/Local/Pub/Cache/hosted/pub.dev/carousel_slider-5.0.0/
file:///C:/Users/ASUS/AppData/Local/Pub/Cache/hosted/pub.dev/carousel_slider-5.0.0/lib/
characters characters
2.12 2.12
file:///C:/Users/ASUS/AppData/Local/Pub/Cache/hosted/pub.dev/characters-1.3.0/ file:///C:/Users/ASUS/AppData/Local/Pub/Cache/hosted/pub.dev/characters-1.3.0/

View File

@ -0,0 +1,3 @@
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M8.73007 1.30732C8.57879 1.31391 8.43599 1.37908 8.33188 1.48904L3.37354 6.5932C3.26763 6.70211 3.20837 6.84803 3.20837 6.99994C3.20837 7.15186 3.26763 7.29778 3.37354 7.40668L8.33188 12.5108C8.38497 12.5671 8.44872 12.6122 8.51942 12.6436C8.59011 12.675 8.66634 12.692 8.74367 12.6936C8.821 12.6953 8.89788 12.6815 8.96985 12.6532C9.04181 12.6248 9.10742 12.5825 9.16286 12.5285C9.21831 12.4746 9.26247 12.4102 9.29279 12.339C9.3231 12.2679 9.33897 12.1914 9.33946 12.1141C9.33995 12.0367 9.32506 11.96 9.29565 11.8885C9.26624 11.817 9.22289 11.752 9.16814 11.6974L4.60515 6.99994L9.16814 2.30251C9.25121 2.21938 9.30724 2.11309 9.32888 1.99757C9.35052 1.88205 9.33676 1.76269 9.28941 1.65512C9.24206 1.54755 9.16333 1.45679 9.06352 1.39473C8.96371 1.33267 8.84749 1.3022 8.73007 1.30732Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 918 B

View File

@ -0,0 +1,3 @@
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M5.99195 2.24268C5.84281 2.24286 5.69711 2.2875 5.57347 2.37089C5.44983 2.45428 5.35385 2.57264 5.2978 2.71084C5.24174 2.84905 5.22816 3.00082 5.25879 3.14678C5.28941 3.29274 5.36286 3.42626 5.46973 3.53027L10.9395 9L5.46973 14.4697C5.39775 14.5388 5.34028 14.6216 5.30069 14.7132C5.26111 14.8048 5.24019 14.9034 5.23917 15.0032C5.23816 15.1029 5.25706 15.2019 5.29478 15.2943C5.3325 15.3867 5.38827 15.4706 5.45883 15.5412C5.52939 15.6117 5.61332 15.6675 5.7057 15.7052C5.79808 15.7429 5.89706 15.7618 5.99684 15.7608C6.09663 15.7598 6.1952 15.7389 6.2868 15.6993C6.37839 15.6597 6.46117 15.6023 6.53028 15.5303L12.5303 9.53027C12.6709 9.38962 12.7499 9.19888 12.7499 9C12.7499 8.80112 12.6709 8.61038 12.5303 8.46973L6.53028 2.46973C6.4603 2.39779 6.3766 2.34063 6.28413 2.30163C6.19166 2.26263 6.09231 2.24258 5.99195 2.24268Z" fill="#004B87"/>
</svg>

After

Width:  |  Height:  |  Size: 960 B

View File

@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M11.6387 2.00884C7.59694 2.19921 4.50001 5.67175 4.50001 9.69048V13.3243L3.17481 15.9903C3.17248 15.9951 3.1702 16 3.16797 16.0049C2.63485 17.1387 3.49786 18.5 4.75098 18.5H9.00001C9.00001 20.148 10.3521 21.5 12 21.5C13.6479 21.5 15 20.148 15 18.5H19.2481C20.5012 18.5 21.3653 17.139 20.832 16.0049C20.8298 16 20.8275 15.9951 20.8252 15.9903L19.5 13.3243V9.50005C19.5 5.24695 15.9317 1.80673 11.6387 2.00884ZM11.709 3.50689C15.169 3.34399 18 6.08115 18 9.50005V13.5C17.9999 13.6159 18.0266 13.7302 18.0781 13.834L19.4746 16.6446C19.5644 16.8371 19.4605 17 19.2481 17H4.75098C4.53852 17 4.43546 16.8373 4.5254 16.6446V16.6436L5.92188 13.834C5.97337 13.7302 6.00011 13.6159 6.00001 13.5V9.69048C6.00001 6.44021 8.48973 3.65852 11.709 3.50689ZM10.5 18.5H13.5C13.5 19.3371 12.8371 20 12 20C11.1629 20 10.5 19.3371 10.5 18.5Z" fill="#004B87"/>
</svg>

After

Width:  |  Height:  |  Size: 951 B

3
assets/icons/ic_sent.svg Normal file
View File

@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M2.72266 2.00101C2.60218 2.00538 2.48453 2.03873 2.37968 2.09823C2.27482 2.15773 2.18586 2.24163 2.12032 2.34281C2.05478 2.444 2.01459 2.55949 2.00317 2.67951C1.99174 2.79952 2.00942 2.92052 2.05469 3.03226L5.69043 12L2.05469 20.9678C1.99735 21.109 1.9844 21.2644 2.01756 21.4131C2.05072 21.5619 2.12841 21.6971 2.2403 21.8006C2.35219 21.9041 2.49295 21.971 2.64385 21.9925C2.79475 22.014 2.94862 21.9891 3.08496 21.9209L21.585 12.6709C21.7096 12.6086 21.8143 12.5129 21.8876 12.3944C21.9608 12.2759 21.9996 12.1393 21.9996 12C21.9996 11.8607 21.9608 11.7242 21.8876 11.6057C21.8143 11.4872 21.7096 11.3914 21.585 11.3291L3.08496 2.07913C2.97263 2.0232 2.84806 1.99633 2.72266 2.00101ZM4.19141 4.3096L19.5732 12L4.19141 19.6905L7.00586 12.75H13.75C13.8494 12.7514 13.9481 12.7331 14.0403 12.696C14.1325 12.659 14.2164 12.6039 14.2872 12.5342C14.358 12.4644 14.4142 12.3812 14.4526 12.2895C14.4909 12.1978 14.5107 12.0994 14.5107 12C14.5107 11.9006 14.4909 11.8022 14.4526 11.7105C14.4142 11.6188 14.358 11.5357 14.2872 11.4659C14.2164 11.3961 14.1325 11.3411 14.0403 11.304C13.9481 11.267 13.8494 11.2486 13.75 11.25H7.00586L4.19141 4.3096Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
assets/images/banner.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

24
assets/images/ornamen.svg Normal file
View File

@ -0,0 +1,24 @@
<svg width="238" height="46" viewBox="0 0 238 46" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M14.7609 23.25L234.007 23.25" stroke="white" stroke-width="1.5"/>
<g clip-path="url(#clip0_240_3098)">
<path d="M167.612 23.4553C167.543 22.0157 166.253 20.8329 164.797 20.8711L159.743 21.0149L154.598 11.5222C154.178 10.6836 153.303 10.1796 152.368 10.2371C151.944 10.2626 151.56 10.4592 151.285 10.7896C151.002 11.1319 150.871 11.5825 150.928 12.0393L152.457 21.2077L145.59 21.3133L144.774 19.7803C144.462 18.844 143.59 18.2034 142.605 18.185C142.185 18.1775 141.786 18.3368 141.482 18.6352C141.177 18.9346 141.002 19.3508 141.007 19.8312L141.284 21.4844L140.912 21.557C139.997 21.7342 139.333 22.5389 139.333 23.4704L139.333 23.4714C139.333 24.4029 139.996 25.208 140.912 25.3848L141.285 25.4574L141.003 27.1658C141.003 27.5862 141.173 27.9973 141.472 28.2962C141.476 28.2995 141.479 28.3033 141.482 28.3061C141.786 28.6045 142.185 28.7638 142.605 28.7563C143.591 28.7384 144.463 28.0968 144.754 27.2115L145.592 25.6285L152.459 25.7346L150.928 34.9156C150.872 35.3588 151.003 35.8099 151.286 36.1521C151.562 36.484 151.946 36.6801 152.369 36.7046C153.304 36.7612 154.179 36.2568 154.593 35.4295L159.744 25.9269L164.798 26.0707C166.254 26.1103 167.543 24.9271 167.612 23.4553Z" fill="white"/>
</g>
<g clip-path="url(#clip1_240_3098)">
<path d="M102.357 23.4553C102.288 22.0157 100.998 20.8329 99.542 20.8711L94.488 21.0149L89.3427 11.5222C88.9226 10.6836 88.0482 10.1796 87.1129 10.2371C86.6896 10.2626 86.3054 10.4592 86.0306 10.7896C85.7468 11.1319 85.6157 11.5825 85.6728 12.0393L87.2025 21.2077L80.3351 21.3133L79.5195 19.7803C79.2075 18.844 78.3349 18.2034 77.3501 18.185C76.9296 18.1775 76.5308 18.3368 76.2268 18.6352C75.9218 18.9346 75.7469 19.3508 75.7521 19.8312L76.0288 21.4844L75.6573 21.557C74.7418 21.7342 74.0776 22.5389 74.0776 23.4704L74.0776 23.4714C74.0776 24.4029 74.7414 25.208 75.6573 25.3848L76.0297 25.4574L75.7478 27.1658C75.7478 27.5862 75.9185 27.9973 76.2173 28.2962C76.2206 28.2995 76.2244 28.3033 76.2272 28.3061C76.5313 28.6045 76.9301 28.7638 77.3506 28.7563C78.3358 28.7384 79.2084 28.0968 79.4988 27.2115L80.337 25.6285L87.2039 25.7346L85.6728 34.9156C85.6172 35.3588 85.7477 35.8099 86.0315 36.1521C86.3068 36.484 86.6915 36.6801 87.1139 36.7046C88.0491 36.7612 88.9241 36.2568 89.3384 35.4295L94.489 25.9269L99.5429 26.0707C101 26.1103 102.288 24.9271 102.357 23.4553Z" fill="white"/>
</g>
<g clip-path="url(#clip2_240_3098)">
<path d="M37.1024 23.4553C37.0335 22.0157 35.7433 20.8329 34.2871 20.8711L29.2332 21.0149L24.0878 11.5222C23.6678 10.6836 22.7934 10.1796 21.8581 10.2371C21.4348 10.2626 21.0506 10.4592 20.7757 10.7896C20.492 11.1319 20.3609 11.5825 20.4179 12.0393L21.9477 21.2077L15.0802 21.3133L14.2647 19.7803C13.9526 18.844 13.0801 18.2034 12.0953 18.185C11.6748 18.1775 11.276 18.3368 10.9719 18.6352C10.6669 18.9346 10.492 19.3508 10.4972 19.8312L10.7739 21.4844L10.4025 21.557C9.48701 21.7342 8.8228 22.5389 8.8228 23.4704L8.8228 23.4714C8.8228 24.4029 9.48654 25.208 10.4025 25.3848L10.7749 25.4574L10.493 27.1658C10.493 27.5862 10.6636 27.9973 10.9625 28.2962C10.9658 28.2995 10.9696 28.3033 10.9724 28.3061C11.2765 28.6045 11.6753 28.7638 12.0958 28.7563C13.081 28.7384 13.9536 28.0968 14.244 27.2115L15.0821 25.6285L21.9491 25.7346L20.4179 34.9156C20.3623 35.3588 20.4929 35.8099 20.7767 36.1521C21.052 36.484 21.4366 36.6801 21.859 36.7046C22.7943 36.7612 23.6692 36.2568 24.0836 35.4295L29.2342 25.9269L34.2881 26.0707C35.7447 26.1103 37.0335 24.9271 37.1024 23.4553Z" fill="white"/>
</g>
<circle cx="232.363" cy="23" r="5" transform="rotate(-180 232.363 23)" fill="white"/>
<defs>
<clipPath id="clip0_240_3098">
<rect width="32" height="32" fill="white" transform="translate(153.137 0.372559) rotate(45)"/>
</clipPath>
<clipPath id="clip1_240_3098">
<rect width="32" height="32" fill="white" transform="translate(87.8822 0.372559) rotate(45)"/>
</clipPath>
<clipPath id="clip2_240_3098">
<rect width="32" height="32" fill="white" transform="translate(22.6274 0.372559) rotate(45)"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@ -1 +1 @@
.env  asset.envassets/icons/ic_account.svg  assetassets/icons/ic_account.svgassets/icons/ic_email.svg  assetassets/icons/ic_email.svgassets/icons/ic_padlock.svg  assetassets/icons/ic_padlock.svgassets/images/taxi_homework.svg  assetassets/images/taxi_homework.svg2packages/cupertino_icons/assets/CupertinoIcons.ttf  asset2packages/cupertino_icons/assets/CupertinoIcons.ttf .env  asset.envassets/icons/ic_account.svg  assetassets/icons/ic_account.svgassets/icons/ic_email.svg  assetassets/icons/ic_email.svgassets/icons/ic_left.svg  assetassets/icons/ic_left.svgassets/icons/ic_less_than.svg  assetassets/icons/ic_less_than.svgassets/icons/ic_more _than.svg  .env  asset assets/icons/ic_notification.svgassets/icons/ic_padlock.svg  .env  asset.envassets/icons/ic_account.svg  .env  assetassets/icons/ic_account.svgassets/icons/ic_email.svg  .env  assetassets/icons/ic_email.svgassets/icons/ic_padlock.svg  .env  assetassets/icons/ic_padlockassetassets/images/taxi_female.svgassets/images/taxi_homework.svg  assetassets/images/taxi_homework.svg2packages/cupertino_icons/assets/CupertinoIcons.ttf  asset2packages/cupertino_icons/assets/CupertinoIcons.ttf

View File

@ -1 +1 @@
{".env":[".env"],"assets/icons/ic_account.svg":["assets/icons/ic_account.svg"],"assets/icons/ic_email.svg":["assets/icons/ic_email.svg"],"assets/icons/ic_padlock.svg":["assets/icons/ic_padlock.svg"],"assets/images/taxi_homework.svg":["assets/images/taxi_homework.svg"],"packages/cupertino_icons/assets/CupertinoIcons.ttf":["packages/cupertino_icons/assets/CupertinoIcons.ttf"]} {".env":[".env"],"assets/icons/ic_account.svg":["assets/icons/ic_account.svg"],"assets/icons/ic_email.svg":["assets/icons/ic_email.svg"],"assets/icons/ic_left.svg":["assets/icons/ic_left.svg"],"assets/icons/ic_less_than.svg":["assets/icons/ic_less_than.svg"],"assets/icons/ic_more _than.svg":["assets/icons/ic_more _than.svg"],"assets/icons/ic_notification.svg":["assets/icons/ic_notification.svg"],"assets/icons/ic_padlock.svg":["assets/icons/ic_padlock.svg"],"assets/icons/ic_sent.svg":["assets/icons/ic_sent.svg"],"assets/images/banner.png":["assets/images/banner.png"],"assets/images/ornamen.svg":["assets/images/ornamen.svg"],"assets/images/taxi_female.svg":["assets/images/taxi_female.svg"],"assets/images/taxi_homework.svg":["assets/images/taxi_homework.svg"],"packages/cupertino_icons/assets/CupertinoIcons.ttf":["packages/cupertino_icons/assets/CupertinoIcons.ttf"]}

View File

@ -1 +1 @@
a98642f7ec914a49407a786c86b25205 e5a42601b737771ef8a4800cd9e66dbd

View File

@ -1 +1 @@
.env  asset.envassets/icons/ic_account.svg  assetassets/icons/ic_account.svgassets/icons/ic_email.svg  assetassets/icons/ic_email.svgassets/icons/ic_padlock.svg  assetassets/icons/ic_padlock.svgassets/images/taxi_homework.svg  assetassets/images/taxi_homework.svg2packages/cupertino_icons/assets/CupertinoIcons.ttf  asset2packages/cupertino_icons/assets/CupertinoIcons.ttf .env  asset.envassets/icons/ic_account.svg  assetassets/icons/ic_account.svgassets/icons/ic_email.svg  assetassets/icons/ic_email.svgassets/icons/ic_left.svg  assetassets/icons/ic_left.svgassets/icons/ic_less_than.svg  assetassets/icons/ic_less_than.svgassets/icons/ic_more _than.svg  .env  asset assets/icons/ic_notification.svgassets/icons/ic_padlock.svg  .env  asset.envassets/icons/ic_account.svg  .env  assetassets/icons/ic_account.svgassets/icons/ic_email.svg  .env  assetassets/icons/ic_email.svgassets/icons/ic_padlock.svg  .env  assetassets/icons/ic_padlockassetassets/images/taxi_female.svgassets/images/taxi_homework.svg  assetassets/images/taxi_homework.svg2packages/cupertino_icons/assets/CupertinoIcons.ttf  asset2packages/cupertino_icons/assets/CupertinoIcons.ttf

View File

@ -1 +1 @@
{".env":[".env"],"assets/icons/ic_account.svg":["assets/icons/ic_account.svg"],"assets/icons/ic_email.svg":["assets/icons/ic_email.svg"],"assets/icons/ic_padlock.svg":["assets/icons/ic_padlock.svg"],"assets/images/taxi_homework.svg":["assets/images/taxi_homework.svg"],"packages/cupertino_icons/assets/CupertinoIcons.ttf":["packages/cupertino_icons/assets/CupertinoIcons.ttf"]} {".env":[".env"],"assets/icons/ic_account.svg":["assets/icons/ic_account.svg"],"assets/icons/ic_email.svg":["assets/icons/ic_email.svg"],"assets/icons/ic_left.svg":["assets/icons/ic_left.svg"],"assets/icons/ic_less_than.svg":["assets/icons/ic_less_than.svg"],"assets/icons/ic_more _than.svg":["assets/icons/ic_more _than.svg"],"assets/icons/ic_notification.svg":["assets/icons/ic_notification.svg"],"assets/icons/ic_padlock.svg":["assets/icons/ic_padlock.svg"],"assets/icons/ic_sent.svg":["assets/icons/ic_sent.svg"],"assets/images/banner.png":["assets/images/banner.png"],"assets/images/ornamen.svg":["assets/images/ornamen.svg"],"assets/images/taxi_female.svg":["assets/images/taxi_female.svg"],"assets/images/taxi_homework.svg":["assets/images/taxi_homework.svg"],"packages/cupertino_icons/assets/CupertinoIcons.ttf":["packages/cupertino_icons/assets/CupertinoIcons.ttf"]}

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
#Thu Feb 13 20:55:18 WIB 2025 #Sun Feb 16 21:29:11 WIB 2025
base.0=D\:\\Flutter\\Flutter Project\\e_porter\\build\\app\\intermediates\\dex\\debug\\mergeExtDexDebug\\classes.dex base.0=D\:\\Flutter\\Flutter Project\\e_porter\\build\\app\\intermediates\\dex\\debug\\mergeExtDexDebug\\classes.dex
base.1=D\:\\Flutter\\Flutter Project\\e_porter\\build\\app\\intermediates\\dex\\debug\\mergeLibDexDebug\\0\\classes.dex base.1=D\:\\Flutter\\Flutter Project\\e_porter\\build\\app\\intermediates\\dex\\debug\\mergeLibDexDebug\\0\\classes.dex
base.2=D\:\\Flutter\\Flutter Project\\e_porter\\build\\app\\intermediates\\dex\\debug\\mergeProjectDexDebug\\0\\classes.dex base.2=D\:\\Flutter\\Flutter Project\\e_porter\\build\\app\\intermediates\\dex\\debug\\mergeProjectDexDebug\\0\\classes.dex

View File

@ -1,20 +0,0 @@
{
"version": 3,
"artifactType": {
"type": "APK",
"kind": "Directory"
},
"applicationId": "com.example.e_porter",
"variantName": "debug",
"elements": [
{
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 1,
"versionName": "1.0.0",
"outputFile": "app-debug.apk"
}
],
"elementType": "File"
}

View File

@ -1 +0,0 @@
ea7d7b6b0886e5ddaf7c7316d1260f21c21cdba5

View File

@ -0,0 +1,131 @@
import 'package:e_porter/_core/constants/colors.dart';
import 'package:e_porter/_core/constants/typography.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_svg/flutter_svg.dart';
class AppbarHomeComponent extends StatelessWidget
implements PreferredSizeWidget {
final String title;
final String subtitle;
final Widget? leading;
final Widget? trailing;
final Color backgroundColor;
final bool automaticallyImplyLeading;
const AppbarHomeComponent({
Key? key,
required this.title,
required this.subtitle,
this.leading,
this.trailing,
this.backgroundColor = PrimaryColors.primary800,
this.automaticallyImplyLeading = false,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return AppBar(
automaticallyImplyLeading: automaticallyImplyLeading,
backgroundColor: backgroundColor,
elevation: 0,
title: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
if (leading != null) leading!,
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
title,
style: TextStyle(
fontSize: 18.sp,
color: Colors.white,
fontWeight: FontWeight.bold,
),
),
Text(
subtitle,
style: TextStyle(
fontSize: 14.sp,
color: Colors.white,
fontWeight: FontWeight.w400,
),
),
],
),
),
if (trailing != null) trailing!,
],
),
);
}
@override
Size get preferredSize => Size.fromHeight(kToolbarHeight);
}
class DefaultAppbarComponent extends StatelessWidget
implements PreferredSizeWidget {
final String title;
final Color backgroundColors;
final bool automaticallyImplyLeading;
final VoidCallback onTab;
const DefaultAppbarComponent({
Key? key,
required this.title,
this.backgroundColors = Colors.white,
this.automaticallyImplyLeading = false,
required this.onTab,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return AppBar(
automaticallyImplyLeading: automaticallyImplyLeading,
backgroundColor: backgroundColors,
elevation: 0,
centerTitle: true,
leadingWidth: 70,
title: TypographyStyles.h6(
title,
color: GrayColors.gray800,
),
leading: GestureDetector(
onTap: onTab,
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: CircleAvatar(
radius: 20,
backgroundColor: PrimaryColors.primary800,
child: SvgPicture.asset(
'assets/icons/ic_less_than.svg',
width: 14.w,
height: 14.h,
),
),
),
),
);
}
@override
Size get preferredSize => Size.fromHeight(kToolbarHeight);
}
class CustomeAppbarComponent extends StatelessWidget
implements PreferredSizeWidget {
const CustomeAppbarComponent({
Key? key,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return AppBar();
}
@override
Size get preferredSize => Size.fromHeight(kToolbarHeight);
}

View File

@ -0,0 +1,82 @@
import 'package:e_porter/_core/constants/colors.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_svg/svg.dart';
import 'package:zoom_tap_animation/zoom_tap_animation.dart';
import '../../constants/typography.dart';
class ButtonListTile extends StatelessWidget {
final String titleText;
final String subTitle;
final VoidCallback onTab;
final String imageAssets;
final String? svgIcon;
final Color backroundColor;
final Color strokeColor;
const ButtonListTile({
super.key,
required this.titleText,
required this.subTitle,
required this.onTab,
required this.imageAssets,
this.svgIcon,
required this.backroundColor,
required this.strokeColor,
});
@override
Widget build(BuildContext context) {
return ZoomTapAnimation(
child: Container(
decoration: BoxDecoration(
color: backroundColor,
border: Border.all(
color: strokeColor,
width: 1.w,
),
borderRadius: BorderRadius.circular(10.r)),
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 0.w, vertical: 0.h),
child: ListTile(
onTap: onTab,
leading: CircleAvatar(
backgroundColor: PrimaryColors.primary800,
radius: 22,
child: SvgPicture.asset(
imageAssets,
width: 24.w,
height: 24.w,
),
),
title: TypographyStyles.body(
titleText,
color: GrayColors.gray800,
overflow: TextOverflow.ellipsis,
maxlines: 1,
),
subtitle: TypographyStyles.small(
subTitle,
color: GrayColors.gray600,
overflow: TextOverflow.ellipsis,
maxlines: 1,
fontWeight: FontWeight.w400,
),
trailing: svgIcon != null
? SvgPicture.asset(
svgIcon!,
width: 18.w,
height: 18.h,
)
: SvgPicture.asset(
'assets/icons/ic_more _than.svg',
width: 18.w,
height: 18.h,
),
),
),
),
);
}
}

View File

@ -75,7 +75,9 @@ class _LoginScreenState extends State<LoginScreen> {
child: ButtonFill( child: ButtonFill(
text: 'Masuk', text: 'Masuk',
textColor: Colors.white, textColor: Colors.white,
onTap: () {}, onTap: () {
Get.toNamed(Routes.HOME);
},
), ),
), ),
], ],

View File

@ -3,9 +3,7 @@ import 'package:e_porter/routes/app_rountes.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:get/get_core/src/get_main.dart';
import 'package:zoom_tap_animation/zoom_tap_animation.dart'; import 'package:zoom_tap_animation/zoom_tap_animation.dart';
import '../../../../_core/component/button/button_fill.dart'; import '../../../../_core/component/button/button_fill.dart';
import '../../../../_core/constants/colors.dart'; import '../../../../_core/constants/colors.dart';
import '../../../../_core/constants/typography.dart'; import '../../../../_core/constants/typography.dart';

View File

@ -0,0 +1,55 @@
import 'package:flutter/material.dart';
import 'dart:math';
class ProfileAvatar extends StatefulWidget {
final String fullName;
const ProfileAvatar({
Key? key,
required this.fullName,
}) : super(key: key);
@override
State<ProfileAvatar> createState() => _ProfileAvatarState();
}
class _ProfileAvatarState extends State<ProfileAvatar> {
late final Color _randomColor;
@override
void initState() {
super.initState();
final colorChoices = [
Colors.red,
Colors.green,
Colors.blue,
Colors.orange,
Colors.purple,
Colors.teal,
];
_randomColor = colorChoices[Random().nextInt(colorChoices.length)];
}
@override
Widget build(BuildContext context) {
final initials = _getInitials(widget.fullName);
return CircleAvatar(
radius: 26,
backgroundColor: _randomColor,
child: Text(
initials,
style: const TextStyle(color: Colors.white),
),
);
}
String _getInitials(String name) {
final parts = name.split(' ');
if (parts.length == 1) {
return parts.first.substring(0, 1).toUpperCase();
} else {
return parts[0].substring(0, 1).toUpperCase() +
parts[1].substring(0, 1).toUpperCase();
}
}
}

View File

@ -0,0 +1,33 @@
import 'package:e_porter/_core/component/appbar/appbar_component.dart';
import 'package:e_porter/_core/constants/colors.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
class BookingTickets extends StatefulWidget {
const BookingTickets({super.key});
@override
State<BookingTickets> createState() => _BookingTicketsState();
}
class _BookingTicketsState extends State<BookingTickets> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: GrayColors.gray50,
appBar: DefaultAppbarComponent(
title: 'Pesan Tiket',
backgroundColors: Colors.white,
onTab: () {
Get.back();
},
),
body: SafeArea(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 16.h),
),
),
);
}
}

View File

@ -0,0 +1,189 @@
import 'package:e_porter/_core/component/appbar/appbar_component.dart';
import 'package:e_porter/_core/component/button/button_list_tile.dart';
import 'package:e_porter/_core/constants/colors.dart';
import 'package:e_porter/_core/constants/typography.dart';
import 'package:e_porter/presentation/screens/home/component/profile_avatar.dart';
import 'package:e_porter/routes/app_rountes.dart';
import 'package:flutter/material.dart';
import 'package:carousel_slider/carousel_slider.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:get/get.dart';
class HomeScreen extends StatefulWidget {
const HomeScreen({super.key});
@override
State<HomeScreen> createState() => _HomeScreenState();
}
class _HomeScreenState extends State<HomeScreen> {
int _current = 0;
final CarouselSliderController _carouselController =
CarouselSliderController();
final List<Widget> imageList = [
Container(
child: Image.asset(
'assets/images/banner.png',
),
),
Container(
child: Image.asset(
'assets/images/banner.png',
),
)
];
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: GrayColors.gray50,
appBar: AppbarHomeComponent(
title: 'E-Porter',
subtitle: 'Your Porter, Your Priority',
backgroundColor: PrimaryColors.primary800,
trailing: Flexible(
child: SvgPicture.asset(
'assets/images/ornamen.svg',
height: 40,
fit: BoxFit.contain,
),
),
),
body: Stack(
children: [
Container(
height: 60.h,
width: double.infinity,
color: PrimaryColors.primary800,
),
Container(
margin: EdgeInsets.symmetric(horizontal: 16.w, vertical: 16.h),
child: ListView(
children: [
Container(
padding:
EdgeInsets.symmetric(horizontal: 16.w, vertical: 16.h),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(10.r),
border: Border.all(
strokeAlign: 1.w,
color: GrayColors.gray100,
),
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.06),
offset: const Offset(0, 4),
blurRadius: 14,
spreadRadius: 10,
),
],
),
child: Column(
children: [
Row(
children: [
ProfileAvatar(
fullName: 'Muhammad Al Kahfi',
),
SizedBox(width: 16.w),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
TypographyStyles.h6(
'Muhammad Al Kahfi',
letterSpacing: 1,
),
SizedBox(height: 2.h),
TypographyStyles.caption(
'Jelajahi dunia dengan E-Porter',
color: GrayColors.gray500,
fontWeight: FontWeight.w400,
maxlines: 1,
),
],
),
),
SvgPicture.asset('assets/icons/ic_notification.svg'),
],
),
SizedBox(height: 20.h),
ButtonListTile(
onTab: () {
Get.toNamed(Routes.BOOKINGTICKETS);
},
titleText: 'Pesan Tiket',
subTitle: 'Jadwalkan penerbangan sekarang!',
imageAssets: 'assets/icons/ic_sent.svg',
backroundColor: GrayColors.gray100,
strokeColor: GrayColors.gray300,
),
],
),
),
SizedBox(height: 32.h),
Container(
child: CarouselSlider(
items: imageList,
options: CarouselOptions(
autoPlay: true,
enlargeCenterPage: true,
aspectRatio: 2.3,
viewportFraction: 0.8,
initialPage: 0,
reverse: false,
onPageChanged: (index, reason) {
setState(() {
_current = index;
});
},
)),
),
SizedBox(height: 10.h),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: imageList.asMap().entries.map(
(entry) {
return GestureDetector(
onTap: () =>
_carouselController.animateToPage(entry.key),
child: Container(
width: 8.w,
height: 8.h,
margin: EdgeInsets.symmetric(
vertical: 8.h, horizontal: 4.w),
decoration: BoxDecoration(
shape: BoxShape.circle,
color: (Theme.of(context).brightness ==
Brightness.dark
? Colors.white
: PrimaryColors.primary800)
.withOpacity(_current == entry.key ? 0.9 : 0.4),
),
),
);
},
).toList(),
),
SizedBox(height: 32.h),
TypographyStyles.h6(
'Layanan untuk Anda',
color: GrayColors.gray800,
),
SizedBox(height: 4.h),
TypographyStyles.caption(
'Layanan premium yang akan menemani Anda',
color: GrayColors.gray600,
fontWeight: FontWeight.w400,
),
],
),
)
],
),
);
}
}

View File

@ -0,0 +1,15 @@
import 'package:flutter/material.dart';
class MainNavigation extends StatefulWidget {
const MainNavigation({super.key});
@override
State<MainNavigation> createState() => _MainNavigationState();
}
class _MainNavigationState extends State<MainNavigation> {
@override
Widget build(BuildContext context) {
return const Placeholder();
}
}

View File

@ -2,6 +2,8 @@ import 'package:e_porter/presentation/screens/auth/pages/forget_password_screen.
import 'package:e_porter/presentation/screens/auth/pages/login_screen.dart'; import 'package:e_porter/presentation/screens/auth/pages/login_screen.dart';
import 'package:e_porter/presentation/screens/auth/pages/register_screen.dart'; import 'package:e_porter/presentation/screens/auth/pages/register_screen.dart';
import 'package:e_porter/presentation/screens/auth/pages/state_succes_screen.dart'; import 'package:e_porter/presentation/screens/auth/pages/state_succes_screen.dart';
import 'package:e_porter/presentation/screens/home/pages/booking_tickets.dart';
import 'package:e_porter/presentation/screens/home/pages/home_screen.dart';
import 'package:e_porter/presentation/screens/onboarding/onboarding_screen.dart'; import 'package:e_porter/presentation/screens/onboarding/onboarding_screen.dart';
import 'package:e_porter/presentation/screens/splash/splash_screen.dart'; import 'package:e_porter/presentation/screens/splash/splash_screen.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
@ -34,6 +36,14 @@ class AppRoutes {
name: Routes.STATESUCCES, name: Routes.STATESUCCES,
page: () => StateSuccesScreen(), page: () => StateSuccesScreen(),
), ),
GetPage(
name: Routes.HOME,
page: () => HomeScreen(),
),
GetPage(
name: Routes.BOOKINGTICKETS,
page: () => BookingTickets(),
),
]; ];
} }
@ -44,4 +54,6 @@ class Routes {
static const REGISTER = '/register'; static const REGISTER = '/register';
static const FORGETPASSWORD = '/forget_password'; static const FORGETPASSWORD = '/forget_password';
static const STATESUCCES = '/state_succes'; static const STATESUCCES = '/state_succes';
static const HOME = '/home';
static const BOOKINGTICKETS = '/booking_tickets';
} }

View File

@ -25,6 +25,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.1" version: "2.1.1"
carousel_slider:
dependency: "direct main"
description:
name: carousel_slider
sha256: "7b006ec356205054af5beaef62e2221160ea36b90fb70a35e4deacd49d0349ae"
url: "https://pub.dev"
source: hosted
version: "5.0.0"
characters: characters:
dependency: transitive dependency: transitive
description: description:

View File

@ -42,6 +42,7 @@ dependencies:
zoom_tap_animation: ^1.1.0 zoom_tap_animation: ^1.1.0
pin_code_fields: ^8.0.1 pin_code_fields: ^8.0.1
flutter_svg: ^2.0.17 flutter_svg: ^2.0.17
carousel_slider: ^5.0.0
dev_dependencies: dev_dependencies:
flutter_test: flutter_test: