Feat: add fetch data page ticket booking step1
This commit is contained in:
parent
3d7f7cc35e
commit
5f4153fe62
|
@ -211,6 +211,12 @@
|
||||||
"packageUri": "lib/",
|
"packageUri": "lib/",
|
||||||
"languageVersion": "3.2"
|
"languageVersion": "3.2"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "logger",
|
||||||
|
"rootUri": "file:///C:/Users/ASUS/AppData/Local/Pub/Cache/hosted/pub.dev/logger-2.5.0",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.17"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "matcher",
|
"name": "matcher",
|
||||||
"rootUri": "file:///C:/Users/ASUS/AppData/Local/Pub/Cache/hosted/pub.dev/matcher-0.12.16+1",
|
"rootUri": "file:///C:/Users/ASUS/AppData/Local/Pub/Cache/hosted/pub.dev/matcher-0.12.16+1",
|
||||||
|
@ -434,7 +440,7 @@
|
||||||
"languageVersion": "3.4"
|
"languageVersion": "3.4"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"generated": "2025-03-07T08:39:17.979426Z",
|
"generated": "2025-03-11T15:01:28.490605Z",
|
||||||
"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",
|
||||||
|
|
|
@ -126,6 +126,10 @@ leak_tracker_testing
|
||||||
3.2
|
3.2
|
||||||
file:///C:/Users/ASUS/AppData/Local/Pub/Cache/hosted/pub.dev/leak_tracker_testing-3.0.1/
|
file:///C:/Users/ASUS/AppData/Local/Pub/Cache/hosted/pub.dev/leak_tracker_testing-3.0.1/
|
||||||
file:///C:/Users/ASUS/AppData/Local/Pub/Cache/hosted/pub.dev/leak_tracker_testing-3.0.1/lib/
|
file:///C:/Users/ASUS/AppData/Local/Pub/Cache/hosted/pub.dev/leak_tracker_testing-3.0.1/lib/
|
||||||
|
logger
|
||||||
|
2.17
|
||||||
|
file:///C:/Users/ASUS/AppData/Local/Pub/Cache/hosted/pub.dev/logger-2.5.0/
|
||||||
|
file:///C:/Users/ASUS/AppData/Local/Pub/Cache/hosted/pub.dev/logger-2.5.0/lib/
|
||||||
matcher
|
matcher
|
||||||
3.0
|
3.0
|
||||||
file:///C:/Users/ASUS/AppData/Local/Pub/Cache/hosted/pub.dev/matcher-0.12.16+1/
|
file:///C:/Users/ASUS/AppData/Local/Pub/Cache/hosted/pub.dev/matcher-0.12.16+1/
|
||||||
|
|
|
@ -1,8 +1,20 @@
|
||||||
<component name="libraryTable">
|
<component name="libraryTable">
|
||||||
<library name="Flutter Plugins" type="FlutterPluginsLibraryType">
|
<library name="Flutter Plugins" type="FlutterPluginsLibraryType">
|
||||||
<CLASSES>
|
<CLASSES>
|
||||||
<root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/firebase_core_web-2.20.0" />
|
<root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/shared_preferences_android-2.4.6" />
|
||||||
<root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/firebase_core-3.11.0" />
|
<root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/path_provider_windows-2.3.0" />
|
||||||
|
<root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/shared_preferences_foundation-2.5.4" />
|
||||||
|
<root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/firebase_auth_web-5.14.1" />
|
||||||
|
<root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/cloud_firestore-5.6.4" />
|
||||||
|
<root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/shared_preferences_linux-2.4.1" />
|
||||||
|
<root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/shared_preferences_windows-2.4.1" />
|
||||||
|
<root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/shared_preferences-2.5.2" />
|
||||||
|
<root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/shared_preferences_web-2.4.3" />
|
||||||
|
<root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/firebase_core_web-2.21.1" />
|
||||||
|
<root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/path_provider_linux-2.2.1" />
|
||||||
|
<root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/firebase_core-3.12.1" />
|
||||||
|
<root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/firebase_auth-5.5.1" />
|
||||||
|
<root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/cloud_firestore_web-4.4.4" />
|
||||||
</CLASSES>
|
</CLASSES>
|
||||||
<JAVADOC />
|
<JAVADOC />
|
||||||
<SOURCES />
|
<SOURCES />
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M9.99996 1.66675C5.40499 1.66675 1.66663 5.40511 1.66663 10.0001C1.66663 14.5951 5.40499 18.3334 9.99996 18.3334C14.5949 18.3334 18.3333 14.5951 18.3333 10.0001C18.3333 5.40511 14.5949 1.66675 9.99996 1.66675ZM9.99996 2.91675C13.9194 2.91675 17.0833 6.08066 17.0833 10.0001C17.0833 13.9195 13.9194 17.0834 9.99996 17.0834C6.08054 17.0834 2.91663 13.9195 2.91663 10.0001C2.91663 6.08066 6.08054 2.91675 9.99996 2.91675ZM9.99019 5.82446C9.82458 5.82705 9.66676 5.89527 9.5514 6.01413C9.43604 6.133 9.37258 6.29279 9.37496 6.45841V9.37508H6.45829C6.37547 9.37391 6.29325 9.38921 6.21639 9.42009C6.13954 9.45098 6.06958 9.49683 6.0106 9.55498C5.95162 9.61313 5.90479 9.68243 5.87282 9.75884C5.84085 9.83525 5.82439 9.91725 5.82439 10.0001C5.82439 10.0829 5.84085 10.1649 5.87282 10.2413C5.90479 10.3177 5.95162 10.387 6.0106 10.4452C6.06958 10.5033 6.13954 10.5492 6.21639 10.5801C6.29325 10.611 6.37547 10.6263 6.45829 10.6251H9.37496V13.5417C9.37379 13.6246 9.38909 13.7068 9.41997 13.7837C9.45086 13.8605 9.49671 13.9305 9.55486 13.9894C9.61301 14.0484 9.68231 14.0953 9.75872 14.1272C9.83513 14.1592 9.91713 14.1756 9.99996 14.1756C10.0828 14.1756 10.1648 14.1592 10.2412 14.1272C10.3176 14.0953 10.3869 14.0484 10.4451 13.9894C10.5032 13.9305 10.5491 13.8605 10.5799 13.7837C10.6108 13.7068 10.6261 13.6246 10.625 13.5417V10.6251H13.5416C13.6244 10.6263 13.7067 10.611 13.7835 10.5801C13.8604 10.5492 13.9303 10.5033 13.9893 10.4452C14.0483 10.387 14.0951 10.3177 14.1271 10.2413C14.1591 10.1649 14.1755 10.0829 14.1755 10.0001C14.1755 9.91725 14.1591 9.83525 14.1271 9.75884C14.0951 9.68243 14.0483 9.61313 13.9893 9.55498C13.9303 9.49683 13.8604 9.45098 13.7835 9.42009C13.7067 9.38921 13.6244 9.37391 13.5416 9.37508H10.625V6.45841C10.6262 6.37476 10.6106 6.29172 10.5791 6.21421C10.5476 6.1367 10.5009 6.0663 10.4417 6.00718C10.3825 5.94806 10.312 5.90143 10.2345 5.87004C10.1569 5.83865 10.0738 5.82316 9.99019 5.82446Z" fill="#004B87"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 2.0 KiB |
|
@ -1 +1 @@
|
||||||
).env
asset.envassets/icons/ic_account.svg
assetassets/icons/ic_account.svg$assets/icons/ic_airplane_landing.svg
asset$assets/icons/ic_airplane_landing.svg%assets/icons/ic_airplane_take_off.svg
asset%assets/icons/ic_airplane_take_off.svg!assets/icons/ic_boarding_pass.svg
asset!assets/icons/ic_boarding_pass.svg(assets/icons/ic_boarding_pass_filled.svg
asset(assets/icons/ic_boarding_pass_filled.svgassets/icons/ic_calendar.svg
assetassets/icons/ic_calendar.svg!assets/icons/ic_data_transfer.svg
asset!assets/icons/ic_data_transfer.svgassets/icons/ic_edit.svg
assetassets/icons/ic_edit.svgassets/icons/ic_email.svg
assetassets/icons/ic_email.svgassets/icons/ic_flight_seat.svg
assetassets/icons/ic_flight_seat.svg&assets/icons/ic_flight_seat_filled.svg
asset&assets/icons/ic_flight_seat_filled.svgassets/icons/ic_home.svg
assetassets/icons/ic_home.svgassets/icons/ic_home_filled.svg
assetassets/icons/ic_home_filled.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
assetassets/icons/ic_more _than.svg assets/icons/ic_notification.svg
asset assets/icons/ic_notification.svg!assets/icons/ic_order_history.svg
asset!assets/icons/ic_order_history.svgassets/icons/ic_padlock.svg
assetassets/icons/ic_padlock.svgassets/icons/ic_passenger.svg
assetassets/icons/ic_passenger.svg assets/icons/ic_plane_filled.svg
asset assets/icons/ic_plane_filled.svgassets/icons/ic_plane_left.svg
assetassets/icons/ic_plane_left.svgassets/icons/ic_plane_right.svg
assetassets/icons/ic_plane_right.svgassets/icons/ic_profile.svg
assetassets/icons/ic_profile.svg"assets/icons/ic_profile_filled.svg
asset"assets/icons/ic_profile_filled.svgassets/icons/ic_protect.svg
assetassets/icons/ic_protect.svgassets/icons/ic_right.svg
assetassets/icons/ic_right.svgassets/icons/ic_search.svg
assetassets/icons/ic_search.svgassets/icons/ic_sent.svg
assetassets/icons/ic_sent.svgassets/icons/ic_transit.svg
assetassets/icons/ic_transit.svgassets/images/banner.png
assetassets/images/banner.pngassets/images/citilink.svg
assetassets/images/citilink.svg!assets/images/divider_custome.svg
asset!assets/images/divider_custome.svgassets/images/garis.svg
assetassets/images/garis.svg"assets/images/ilustrasi_flight.svg
asset"assets/images/ilustrasi_flight.svgassets/images/ornamen.svg
assetassets/images/ornamen.svgassets/images/qris.svg
assetassets/images/qris.svgassets/images/taxi_female.svg
assetassets/images/taxi_female.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.svg$assets/icons/ic_airplane_landing.svg
asset$assets/icons/ic_airplane_landing.svg%assets/icons/ic_airplane_take_off.svg
asset%assets/icons/ic_airplane_take_off.svg!assets/icons/ic_boarding_pass.svg
asset!assets/icons/ic_boarding_pass.svg(assets/icons/ic_boarding_pass_filled.svg
asset(assets/icons/ic_boarding_pass_filled.svgassets/icons/ic_calendar.svg
assetassets/icons/ic_calendar.svg!assets/icons/ic_data_transfer.svg
asset!assets/icons/ic_data_transfer.svgassets/icons/ic_edit.svg
assetassets/icons/ic_edit.svgassets/icons/ic_email.svg
assetassets/icons/ic_email.svgassets/icons/ic_flight_seat.svg
assetassets/icons/ic_flight_seat.svg&assets/icons/ic_flight_seat_filled.svg
asset&assets/icons/ic_flight_seat_filled.svgassets/icons/ic_home.svg
assetassets/icons/ic_home.svgassets/icons/ic_home_filled.svg
assetassets/icons/ic_home_filled.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
assetassets/icons/ic_more _than.svg assets/icons/ic_notification.svg
asset assets/icons/ic_notification.svg!assets/icons/ic_order_history.svg
asset!assets/icons/ic_order_history.svgassets/icons/ic_padlock.svg
assetassets/icons/ic_padlock.svgassets/icons/ic_passenger.svg
assetassets/icons/ic_passenger.svg assets/icons/ic_plane_filled.svg
asset assets/icons/ic_plane_filled.svgassets/icons/ic_plane_left.svg
assetassets/icons/ic_plane_left.svgassets/icons/ic_plane_right.svg
assetassets/icons/ic_plane_right.svgassets/icons/ic_plus.svg
assetassets/icons/ic_plus.svgassets/icons/ic_profile.svg
assetassets/icons/ic_profile.svg"assets/icons/ic_profile_filled.svg
asset"assets/icons/ic_profile_filled.svgassets/icons/ic_protect.svg
assetassets/icons/ic_protect.svgassets/icons/ic_right.svg
assetassets/icons/ic_right.svgassets/icons/ic_search.svg
assetassets/icons/ic_search.svgassets/icons/ic_sent.svg
assetassets/icons/ic_sent.svgassets/icons/ic_transit.svg
assetassets/icons/ic_transit.svgassets/images/banner.png
assetassets/images/banner.pngassets/images/citilink.svg
assetassets/images/citilink.svg!assets/images/divider_custome.svg
asset!assets/images/divider_custome.svgassets/images/garis.svg
assetassets/images/garis.svg"assets/images/ilustrasi_flight.svg
asset"assets/images/ilustrasi_flight.svgassets/images/ornamen.svg
assetassets/images/ornamen.svgassets/images/qris.svg
assetassets/images/qris.svgassets/images/taxi_female.svg
assetassets/images/taxi_female.svgassets/images/taxi_homework.svg
assetassets/images/taxi_homework.svg2packages/cupertino_icons/assets/CupertinoIcons.ttf
asset2packages/cupertino_icons/assets/CupertinoIcons.ttf
|
|
@ -1 +1 @@
|
||||||
{".env":[".env"],"assets/icons/ic_account.svg":["assets/icons/ic_account.svg"],"assets/icons/ic_airplane_landing.svg":["assets/icons/ic_airplane_landing.svg"],"assets/icons/ic_airplane_take_off.svg":["assets/icons/ic_airplane_take_off.svg"],"assets/icons/ic_boarding_pass.svg":["assets/icons/ic_boarding_pass.svg"],"assets/icons/ic_boarding_pass_filled.svg":["assets/icons/ic_boarding_pass_filled.svg"],"assets/icons/ic_calendar.svg":["assets/icons/ic_calendar.svg"],"assets/icons/ic_data_transfer.svg":["assets/icons/ic_data_transfer.svg"],"assets/icons/ic_edit.svg":["assets/icons/ic_edit.svg"],"assets/icons/ic_email.svg":["assets/icons/ic_email.svg"],"assets/icons/ic_flight_seat.svg":["assets/icons/ic_flight_seat.svg"],"assets/icons/ic_flight_seat_filled.svg":["assets/icons/ic_flight_seat_filled.svg"],"assets/icons/ic_home.svg":["assets/icons/ic_home.svg"],"assets/icons/ic_home_filled.svg":["assets/icons/ic_home_filled.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_order_history.svg":["assets/icons/ic_order_history.svg"],"assets/icons/ic_padlock.svg":["assets/icons/ic_padlock.svg"],"assets/icons/ic_passenger.svg":["assets/icons/ic_passenger.svg"],"assets/icons/ic_plane_filled.svg":["assets/icons/ic_plane_filled.svg"],"assets/icons/ic_plane_left.svg":["assets/icons/ic_plane_left.svg"],"assets/icons/ic_plane_right.svg":["assets/icons/ic_plane_right.svg"],"assets/icons/ic_profile.svg":["assets/icons/ic_profile.svg"],"assets/icons/ic_profile_filled.svg":["assets/icons/ic_profile_filled.svg"],"assets/icons/ic_protect.svg":["assets/icons/ic_protect.svg"],"assets/icons/ic_right.svg":["assets/icons/ic_right.svg"],"assets/icons/ic_search.svg":["assets/icons/ic_search.svg"],"assets/icons/ic_sent.svg":["assets/icons/ic_sent.svg"],"assets/icons/ic_transit.svg":["assets/icons/ic_transit.svg"],"assets/images/banner.png":["assets/images/banner.png"],"assets/images/citilink.svg":["assets/images/citilink.svg"],"assets/images/divider_custome.svg":["assets/images/divider_custome.svg"],"assets/images/garis.svg":["assets/images/garis.svg"],"assets/images/ilustrasi_flight.svg":["assets/images/ilustrasi_flight.svg"],"assets/images/ornamen.svg":["assets/images/ornamen.svg"],"assets/images/qris.svg":["assets/images/qris.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"]}
|
{".env":[".env"],"assets/icons/ic_account.svg":["assets/icons/ic_account.svg"],"assets/icons/ic_airplane_landing.svg":["assets/icons/ic_airplane_landing.svg"],"assets/icons/ic_airplane_take_off.svg":["assets/icons/ic_airplane_take_off.svg"],"assets/icons/ic_boarding_pass.svg":["assets/icons/ic_boarding_pass.svg"],"assets/icons/ic_boarding_pass_filled.svg":["assets/icons/ic_boarding_pass_filled.svg"],"assets/icons/ic_calendar.svg":["assets/icons/ic_calendar.svg"],"assets/icons/ic_data_transfer.svg":["assets/icons/ic_data_transfer.svg"],"assets/icons/ic_edit.svg":["assets/icons/ic_edit.svg"],"assets/icons/ic_email.svg":["assets/icons/ic_email.svg"],"assets/icons/ic_flight_seat.svg":["assets/icons/ic_flight_seat.svg"],"assets/icons/ic_flight_seat_filled.svg":["assets/icons/ic_flight_seat_filled.svg"],"assets/icons/ic_home.svg":["assets/icons/ic_home.svg"],"assets/icons/ic_home_filled.svg":["assets/icons/ic_home_filled.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_order_history.svg":["assets/icons/ic_order_history.svg"],"assets/icons/ic_padlock.svg":["assets/icons/ic_padlock.svg"],"assets/icons/ic_passenger.svg":["assets/icons/ic_passenger.svg"],"assets/icons/ic_plane_filled.svg":["assets/icons/ic_plane_filled.svg"],"assets/icons/ic_plane_left.svg":["assets/icons/ic_plane_left.svg"],"assets/icons/ic_plane_right.svg":["assets/icons/ic_plane_right.svg"],"assets/icons/ic_plus.svg":["assets/icons/ic_plus.svg"],"assets/icons/ic_profile.svg":["assets/icons/ic_profile.svg"],"assets/icons/ic_profile_filled.svg":["assets/icons/ic_profile_filled.svg"],"assets/icons/ic_protect.svg":["assets/icons/ic_protect.svg"],"assets/icons/ic_right.svg":["assets/icons/ic_right.svg"],"assets/icons/ic_search.svg":["assets/icons/ic_search.svg"],"assets/icons/ic_sent.svg":["assets/icons/ic_sent.svg"],"assets/icons/ic_transit.svg":["assets/icons/ic_transit.svg"],"assets/images/banner.png":["assets/images/banner.png"],"assets/images/citilink.svg":["assets/images/citilink.svg"],"assets/images/divider_custome.svg":["assets/images/divider_custome.svg"],"assets/images/garis.svg":["assets/images/garis.svg"],"assets/images/ilustrasi_flight.svg":["assets/images/ilustrasi_flight.svg"],"assets/images/ornamen.svg":["assets/images/ornamen.svg"],"assets/images/qris.svg":["assets/images/qris.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"]}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1 +1 @@
|
||||||
5f9d8a318b8209b93007791e32a44344
|
595eeed6d52f6a3c47c2989b2d95f9b5
|
|
@ -1 +1 @@
|
||||||
).env
asset.envassets/icons/ic_account.svg
assetassets/icons/ic_account.svg$assets/icons/ic_airplane_landing.svg
asset$assets/icons/ic_airplane_landing.svg%assets/icons/ic_airplane_take_off.svg
asset%assets/icons/ic_airplane_take_off.svg!assets/icons/ic_boarding_pass.svg
asset!assets/icons/ic_boarding_pass.svg(assets/icons/ic_boarding_pass_filled.svg
asset(assets/icons/ic_boarding_pass_filled.svgassets/icons/ic_calendar.svg
assetassets/icons/ic_calendar.svg!assets/icons/ic_data_transfer.svg
asset!assets/icons/ic_data_transfer.svgassets/icons/ic_edit.svg
assetassets/icons/ic_edit.svgassets/icons/ic_email.svg
assetassets/icons/ic_email.svgassets/icons/ic_flight_seat.svg
assetassets/icons/ic_flight_seat.svg&assets/icons/ic_flight_seat_filled.svg
asset&assets/icons/ic_flight_seat_filled.svgassets/icons/ic_home.svg
assetassets/icons/ic_home.svgassets/icons/ic_home_filled.svg
assetassets/icons/ic_home_filled.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
assetassets/icons/ic_more _than.svg assets/icons/ic_notification.svg
asset assets/icons/ic_notification.svg!assets/icons/ic_order_history.svg
asset!assets/icons/ic_order_history.svgassets/icons/ic_padlock.svg
assetassets/icons/ic_padlock.svgassets/icons/ic_passenger.svg
assetassets/icons/ic_passenger.svg assets/icons/ic_plane_filled.svg
asset assets/icons/ic_plane_filled.svgassets/icons/ic_plane_left.svg
assetassets/icons/ic_plane_left.svgassets/icons/ic_plane_right.svg
assetassets/icons/ic_plane_right.svgassets/icons/ic_profile.svg
assetassets/icons/ic_profile.svg"assets/icons/ic_profile_filled.svg
asset"assets/icons/ic_profile_filled.svgassets/icons/ic_protect.svg
assetassets/icons/ic_protect.svgassets/icons/ic_right.svg
assetassets/icons/ic_right.svgassets/icons/ic_search.svg
assetassets/icons/ic_search.svgassets/icons/ic_sent.svg
assetassets/icons/ic_sent.svgassets/icons/ic_transit.svg
assetassets/icons/ic_transit.svgassets/images/banner.png
assetassets/images/banner.pngassets/images/citilink.svg
assetassets/images/citilink.svg!assets/images/divider_custome.svg
asset!assets/images/divider_custome.svgassets/images/garis.svg
assetassets/images/garis.svg"assets/images/ilustrasi_flight.svg
asset"assets/images/ilustrasi_flight.svgassets/images/ornamen.svg
assetassets/images/ornamen.svgassets/images/qris.svg
assetassets/images/qris.svgassets/images/taxi_female.svg
assetassets/images/taxi_female.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.svg$assets/icons/ic_airplane_landing.svg
asset$assets/icons/ic_airplane_landing.svg%assets/icons/ic_airplane_take_off.svg
asset%assets/icons/ic_airplane_take_off.svg!assets/icons/ic_boarding_pass.svg
asset!assets/icons/ic_boarding_pass.svg(assets/icons/ic_boarding_pass_filled.svg
asset(assets/icons/ic_boarding_pass_filled.svgassets/icons/ic_calendar.svg
assetassets/icons/ic_calendar.svg!assets/icons/ic_data_transfer.svg
asset!assets/icons/ic_data_transfer.svgassets/icons/ic_edit.svg
assetassets/icons/ic_edit.svgassets/icons/ic_email.svg
assetassets/icons/ic_email.svgassets/icons/ic_flight_seat.svg
assetassets/icons/ic_flight_seat.svg&assets/icons/ic_flight_seat_filled.svg
asset&assets/icons/ic_flight_seat_filled.svgassets/icons/ic_home.svg
assetassets/icons/ic_home.svgassets/icons/ic_home_filled.svg
assetassets/icons/ic_home_filled.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
assetassets/icons/ic_more _than.svg assets/icons/ic_notification.svg
asset assets/icons/ic_notification.svg!assets/icons/ic_order_history.svg
asset!assets/icons/ic_order_history.svgassets/icons/ic_padlock.svg
assetassets/icons/ic_padlock.svgassets/icons/ic_passenger.svg
assetassets/icons/ic_passenger.svg assets/icons/ic_plane_filled.svg
asset assets/icons/ic_plane_filled.svgassets/icons/ic_plane_left.svg
assetassets/icons/ic_plane_left.svgassets/icons/ic_plane_right.svg
assetassets/icons/ic_plane_right.svgassets/icons/ic_plus.svg
assetassets/icons/ic_plus.svgassets/icons/ic_profile.svg
assetassets/icons/ic_profile.svg"assets/icons/ic_profile_filled.svg
asset"assets/icons/ic_profile_filled.svgassets/icons/ic_protect.svg
assetassets/icons/ic_protect.svgassets/icons/ic_right.svg
assetassets/icons/ic_right.svgassets/icons/ic_search.svg
assetassets/icons/ic_search.svgassets/icons/ic_sent.svg
assetassets/icons/ic_sent.svgassets/icons/ic_transit.svg
assetassets/icons/ic_transit.svgassets/images/banner.png
assetassets/images/banner.pngassets/images/citilink.svg
assetassets/images/citilink.svg!assets/images/divider_custome.svg
asset!assets/images/divider_custome.svgassets/images/garis.svg
assetassets/images/garis.svg"assets/images/ilustrasi_flight.svg
asset"assets/images/ilustrasi_flight.svgassets/images/ornamen.svg
assetassets/images/ornamen.svgassets/images/qris.svg
assetassets/images/qris.svgassets/images/taxi_female.svg
assetassets/images/taxi_female.svgassets/images/taxi_homework.svg
assetassets/images/taxi_homework.svg2packages/cupertino_icons/assets/CupertinoIcons.ttf
asset2packages/cupertino_icons/assets/CupertinoIcons.ttf
|
|
@ -1 +1 @@
|
||||||
{".env":[".env"],"assets/icons/ic_account.svg":["assets/icons/ic_account.svg"],"assets/icons/ic_airplane_landing.svg":["assets/icons/ic_airplane_landing.svg"],"assets/icons/ic_airplane_take_off.svg":["assets/icons/ic_airplane_take_off.svg"],"assets/icons/ic_boarding_pass.svg":["assets/icons/ic_boarding_pass.svg"],"assets/icons/ic_boarding_pass_filled.svg":["assets/icons/ic_boarding_pass_filled.svg"],"assets/icons/ic_calendar.svg":["assets/icons/ic_calendar.svg"],"assets/icons/ic_data_transfer.svg":["assets/icons/ic_data_transfer.svg"],"assets/icons/ic_edit.svg":["assets/icons/ic_edit.svg"],"assets/icons/ic_email.svg":["assets/icons/ic_email.svg"],"assets/icons/ic_flight_seat.svg":["assets/icons/ic_flight_seat.svg"],"assets/icons/ic_flight_seat_filled.svg":["assets/icons/ic_flight_seat_filled.svg"],"assets/icons/ic_home.svg":["assets/icons/ic_home.svg"],"assets/icons/ic_home_filled.svg":["assets/icons/ic_home_filled.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_order_history.svg":["assets/icons/ic_order_history.svg"],"assets/icons/ic_padlock.svg":["assets/icons/ic_padlock.svg"],"assets/icons/ic_passenger.svg":["assets/icons/ic_passenger.svg"],"assets/icons/ic_plane_filled.svg":["assets/icons/ic_plane_filled.svg"],"assets/icons/ic_plane_left.svg":["assets/icons/ic_plane_left.svg"],"assets/icons/ic_plane_right.svg":["assets/icons/ic_plane_right.svg"],"assets/icons/ic_profile.svg":["assets/icons/ic_profile.svg"],"assets/icons/ic_profile_filled.svg":["assets/icons/ic_profile_filled.svg"],"assets/icons/ic_protect.svg":["assets/icons/ic_protect.svg"],"assets/icons/ic_right.svg":["assets/icons/ic_right.svg"],"assets/icons/ic_search.svg":["assets/icons/ic_search.svg"],"assets/icons/ic_sent.svg":["assets/icons/ic_sent.svg"],"assets/icons/ic_transit.svg":["assets/icons/ic_transit.svg"],"assets/images/banner.png":["assets/images/banner.png"],"assets/images/citilink.svg":["assets/images/citilink.svg"],"assets/images/divider_custome.svg":["assets/images/divider_custome.svg"],"assets/images/garis.svg":["assets/images/garis.svg"],"assets/images/ilustrasi_flight.svg":["assets/images/ilustrasi_flight.svg"],"assets/images/ornamen.svg":["assets/images/ornamen.svg"],"assets/images/qris.svg":["assets/images/qris.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"]}
|
{".env":[".env"],"assets/icons/ic_account.svg":["assets/icons/ic_account.svg"],"assets/icons/ic_airplane_landing.svg":["assets/icons/ic_airplane_landing.svg"],"assets/icons/ic_airplane_take_off.svg":["assets/icons/ic_airplane_take_off.svg"],"assets/icons/ic_boarding_pass.svg":["assets/icons/ic_boarding_pass.svg"],"assets/icons/ic_boarding_pass_filled.svg":["assets/icons/ic_boarding_pass_filled.svg"],"assets/icons/ic_calendar.svg":["assets/icons/ic_calendar.svg"],"assets/icons/ic_data_transfer.svg":["assets/icons/ic_data_transfer.svg"],"assets/icons/ic_edit.svg":["assets/icons/ic_edit.svg"],"assets/icons/ic_email.svg":["assets/icons/ic_email.svg"],"assets/icons/ic_flight_seat.svg":["assets/icons/ic_flight_seat.svg"],"assets/icons/ic_flight_seat_filled.svg":["assets/icons/ic_flight_seat_filled.svg"],"assets/icons/ic_home.svg":["assets/icons/ic_home.svg"],"assets/icons/ic_home_filled.svg":["assets/icons/ic_home_filled.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_order_history.svg":["assets/icons/ic_order_history.svg"],"assets/icons/ic_padlock.svg":["assets/icons/ic_padlock.svg"],"assets/icons/ic_passenger.svg":["assets/icons/ic_passenger.svg"],"assets/icons/ic_plane_filled.svg":["assets/icons/ic_plane_filled.svg"],"assets/icons/ic_plane_left.svg":["assets/icons/ic_plane_left.svg"],"assets/icons/ic_plane_right.svg":["assets/icons/ic_plane_right.svg"],"assets/icons/ic_plus.svg":["assets/icons/ic_plus.svg"],"assets/icons/ic_profile.svg":["assets/icons/ic_profile.svg"],"assets/icons/ic_profile_filled.svg":["assets/icons/ic_profile_filled.svg"],"assets/icons/ic_protect.svg":["assets/icons/ic_protect.svg"],"assets/icons/ic_right.svg":["assets/icons/ic_right.svg"],"assets/icons/ic_search.svg":["assets/icons/ic_search.svg"],"assets/icons/ic_sent.svg":["assets/icons/ic_sent.svg"],"assets/icons/ic_transit.svg":["assets/icons/ic_transit.svg"],"assets/images/banner.png":["assets/images/banner.png"],"assets/images/citilink.svg":["assets/images/citilink.svg"],"assets/images/divider_custome.svg":["assets/images/divider_custome.svg"],"assets/images/garis.svg":["assets/images/garis.svg"],"assets/images/ilustrasi_flight.svg":["assets/images/ilustrasi_flight.svg"],"assets/images/ornamen.svg":["assets/images/ornamen.svg"],"assets/images/qris.svg":["assets/images/qris.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"]}
|
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
|
@ -1,4 +1,4 @@
|
||||||
#Fri Mar 07 15:39:47 WIB 2025
|
#Tue Mar 11 22:02:04 WIB 2025
|
||||||
com.example.e_porter.app-main-46\:/drawable-v21/launch_background.xml=D\:\\Flutter\\Flutter Project\\e_porter\\build\\app\\intermediates\\merged_res\\debug\\drawable-v21_launch_background.xml.flat
|
com.example.e_porter.app-main-46\:/drawable-v21/launch_background.xml=D\:\\Flutter\\Flutter Project\\e_porter\\build\\app\\intermediates\\merged_res\\debug\\drawable-v21_launch_background.xml.flat
|
||||||
com.example.e_porter.app-main-46\:/mipmap-hdpi/ic_launcher.png=D\:\\Flutter\\Flutter Project\\e_porter\\build\\app\\intermediates\\merged_res\\debug\\mipmap-hdpi_ic_launcher.png.flat
|
com.example.e_porter.app-main-46\:/mipmap-hdpi/ic_launcher.png=D\:\\Flutter\\Flutter Project\\e_porter\\build\\app\\intermediates\\merged_res\\debug\\mipmap-hdpi_ic_launcher.png.flat
|
||||||
com.example.e_porter.app-main-46\:/mipmap-mdpi/ic_launcher.png=D\:\\Flutter\\Flutter Project\\e_porter\\build\\app\\intermediates\\merged_res\\debug\\mipmap-mdpi_ic_launcher.png.flat
|
com.example.e_porter.app-main-46\:/mipmap-mdpi/ic_launcher.png=D\:\\Flutter\\Flutter Project\\e_porter\\build\\app\\intermediates\\merged_res\\debug\\mipmap-mdpi_ic_launcher.png.flat
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#Mon Mar 10 22:32:22 WIB 2025
|
#Tue Mar 11 22:03:16 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
|
||||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -44,6 +44,7 @@ class CustomeIcons {
|
||||||
static SvgPicture AirplaneTakeOffOutline({double? size, Color? color}) => getIcon('ic_airplane_take_off', color: color);
|
static SvgPicture AirplaneTakeOffOutline({double? size, Color? color}) => getIcon('ic_airplane_take_off', color: color);
|
||||||
static SvgPicture TransitOutline({double? size, Color? color}) => getIcon('ic_transit', color: color);
|
static SvgPicture TransitOutline({double? size, Color? color}) => getIcon('ic_transit', color: color);
|
||||||
static SvgPicture ProtectOutline({double? size, Color? color}) => getIcon('ic_protect', color: color);
|
static SvgPicture ProtectOutline({double? size, Color? color}) => getIcon('ic_protect', color: color);
|
||||||
|
static SvgPicture PlusOutline({double? size, Color? color}) => getIcon('ic_plus', color: color);
|
||||||
|
|
||||||
static SvgPicture FlightSeatFilled({double? size, Color? color}) => getIcon('ic_flight_seat_filled', color: color);
|
static SvgPicture FlightSeatFilled({double? size, Color? color}) => getIcon('ic_flight_seat_filled', color: color);
|
||||||
static SvgPicture PlaneRightFilled({double? size, Color? color}) => getIcon('ic_plane_filled', color: color);
|
static SvgPicture PlaneRightFilled({double? size, Color? color}) => getIcon('ic_plane_filled', color: color);
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
import 'package:logger/logger.dart';
|
||||||
|
|
||||||
|
var logger = Logger(
|
||||||
|
printer: PrettyPrinter(),
|
||||||
|
);
|
||||||
|
|
||||||
|
var loggerNoStack = Logger(
|
||||||
|
printer: PrettyPrinter(methodCount: 0),
|
||||||
|
);
|
|
@ -1,4 +1,5 @@
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
import 'package:e_porter/_core/service/logger_service.dart';
|
||||||
import 'package:e_porter/domain/models/user_entity.dart';
|
import 'package:e_porter/domain/models/user_entity.dart';
|
||||||
import 'package:shared_preferences/shared_preferences.dart';
|
import 'package:shared_preferences/shared_preferences.dart';
|
||||||
|
|
||||||
|
@ -26,7 +27,7 @@ class PreferencesService {
|
||||||
final now = DateTime.now().millisecondsSinceEpoch;
|
final now = DateTime.now().millisecondsSinceEpoch;
|
||||||
if (now > expiredAt) {
|
if (now > expiredAt) {
|
||||||
await clearUserData();
|
await clearUserData();
|
||||||
print("now: $now, expiredAt: $expiredAt");
|
logger.d("now: $now, expiredAt: $expiredAt");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,8 @@ import 'package:e_porter/domain/models/user_entity.dart';
|
||||||
import 'package:e_porter/domain/repositories/auth_repository.dart';
|
import 'package:e_porter/domain/repositories/auth_repository.dart';
|
||||||
import 'package:firebase_auth/firebase_auth.dart';
|
import 'package:firebase_auth/firebase_auth.dart';
|
||||||
|
|
||||||
|
import '../../_core/service/logger_service.dart';
|
||||||
|
|
||||||
class AuthException implements Exception {
|
class AuthException implements Exception {
|
||||||
final String message;
|
final String message;
|
||||||
AuthException(this.message);
|
AuthException(this.message);
|
||||||
|
@ -24,8 +26,8 @@ class AuthRepositoryImpl implements AuthRepository {
|
||||||
final user = userCredential.user!;
|
final user = userCredential.user!;
|
||||||
return UserEntity(uid: user.uid, email: user.email ?? "");
|
return UserEntity(uid: user.uid, email: user.email ?? "");
|
||||||
} on FirebaseAuthException catch (e) {
|
} on FirebaseAuthException catch (e) {
|
||||||
print("FirebaseAuthException code: ${e.code}");
|
logger.w("FirebaseAuthException code: ${e.code}");
|
||||||
print("FirebaseAuthException message: ${e.message}");
|
logger.w("FirebaseAuthException message: ${e.message}");
|
||||||
|
|
||||||
switch (e.code) {
|
switch (e.code) {
|
||||||
case 'invalid-email':
|
case 'invalid-email':
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import 'package:cloud_firestore/cloud_firestore.dart';
|
import 'package:cloud_firestore/cloud_firestore.dart';
|
||||||
|
import 'package:e_porter/_core/service/logger_service.dart';
|
||||||
|
|
||||||
import '../../domain/models/ticket_model.dart';
|
import '../../domain/models/ticket_model.dart';
|
||||||
import '../../domain/repositories/ticket_repository.dart';
|
import '../../domain/repositories/ticket_repository.dart';
|
||||||
|
@ -20,7 +21,7 @@ class TicketRepositoryImpl implements TicketRepository {
|
||||||
final startOfDay = DateTime(leavingDate.year, leavingDate.month, leavingDate.day);
|
final startOfDay = DateTime(leavingDate.year, leavingDate.month, leavingDate.day);
|
||||||
final endOfDay = startOfDay.add(Duration(days: 1));
|
final endOfDay = startOfDay.add(Duration(days: 1));
|
||||||
|
|
||||||
print(
|
logger.d(
|
||||||
"Fetching tickets with parameters: from = $from, to = $to, leavingDate between = ${Timestamp.fromDate(startOfDay)} and ${Timestamp.fromDate(endOfDay)}");
|
"Fetching tickets with parameters: from = $from, to = $to, leavingDate between = ${Timestamp.fromDate(startOfDay)} and ${Timestamp.fromDate(endOfDay)}");
|
||||||
|
|
||||||
final snapshot = await collection
|
final snapshot = await collection
|
||||||
|
@ -30,9 +31,9 @@ class TicketRepositoryImpl implements TicketRepository {
|
||||||
.where('leavingDate', isLessThan: Timestamp.fromDate(endOfDay))
|
.where('leavingDate', isLessThan: Timestamp.fromDate(endOfDay))
|
||||||
.get();
|
.get();
|
||||||
|
|
||||||
print("Number of tickets found: ${snapshot.docs.length}");
|
logger.d("Number of tickets found: ${snapshot.docs.length}");
|
||||||
snapshot.docs.forEach((doc) {
|
snapshot.docs.forEach((doc) {
|
||||||
print("Doc ID: ${doc.id} => ${doc.data()}");
|
logger.d("Doc ID: ${doc.id} => ${doc.data()}");
|
||||||
});
|
});
|
||||||
|
|
||||||
return snapshot.docs.map((doc) => TicketModel.fromDocument(doc)).toList();
|
return snapshot.docs.map((doc) => TicketModel.fromDocument(doc)).toList();
|
||||||
|
@ -42,7 +43,6 @@ class TicketRepositoryImpl implements TicketRepository {
|
||||||
Future<List<FlightModel>> getFlights({
|
Future<List<FlightModel>> getFlights({
|
||||||
required String ticketId,
|
required String ticketId,
|
||||||
required String flightClass,
|
required String flightClass,
|
||||||
//required String airlineName,
|
|
||||||
}) async {
|
}) async {
|
||||||
final subCollection = firestore.collection('tickets').doc(ticketId).collection('flights');
|
final subCollection = firestore.collection('tickets').doc(ticketId).collection('flights');
|
||||||
|
|
||||||
|
@ -52,11 +52,28 @@ class TicketRepositoryImpl implements TicketRepository {
|
||||||
}
|
}
|
||||||
|
|
||||||
final snapshot = await query.get();
|
final snapshot = await query.get();
|
||||||
print("Number of flights found for ticket $ticketId with seatClass '$flightClass': ${snapshot.docs.length}");
|
logger.d("Number of flights found for ticket $ticketId with seatClass '$flightClass': ${snapshot.docs.length}");
|
||||||
snapshot.docs.forEach((doc) {
|
snapshot.docs.forEach((doc) {
|
||||||
print("Flight Doc ID: ${doc.id} => ${doc.data()}");
|
logger.d("Flight Doc ID: ${doc.id} => ${doc.data()}");
|
||||||
});
|
});
|
||||||
|
|
||||||
return snapshot.docs.map((doc) => FlightModel.fromDocument(doc)).toList();
|
return snapshot.docs.map((doc) => FlightModel.fromDocument(doc)).toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<FlightModel> getFlightById({
|
||||||
|
required String ticketId,
|
||||||
|
required String flightId,
|
||||||
|
}) async {
|
||||||
|
final doc = await firestore
|
||||||
|
.collection('tickets')
|
||||||
|
.doc(ticketId)
|
||||||
|
.collection('flights')
|
||||||
|
.doc(flightId)
|
||||||
|
.get();
|
||||||
|
|
||||||
|
logger.d("getFlightById - TicketID: $ticketId, FlightID: $flightId, Data: ${doc.data()}");
|
||||||
|
|
||||||
|
return FlightModel.fromDocument(doc);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,10 +18,13 @@ class TicketBinding extends Bindings {
|
||||||
Get.lazyPut<SearchFlightUseCase>(
|
Get.lazyPut<SearchFlightUseCase>(
|
||||||
() => SearchFlightUseCase(Get.find()),
|
() => SearchFlightUseCase(Get.find()),
|
||||||
);
|
);
|
||||||
|
Get.lazyPut<GetFlightByIdUseCase>(
|
||||||
|
() => GetFlightByIdUseCase(Get.find()),
|
||||||
|
);
|
||||||
|
|
||||||
// 3. Daftarkan Controller
|
// 3. Daftarkan Controller
|
||||||
Get.lazyPut<TicketController>(
|
Get.lazyPut<TicketController>(
|
||||||
() => TicketController(Get.find()),
|
() => TicketController(Get.find(), Get.find()),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -16,7 +16,7 @@ class TicketModel {
|
||||||
factory TicketModel.fromDocument(DocumentSnapshot doc) {
|
factory TicketModel.fromDocument(DocumentSnapshot doc) {
|
||||||
final data = doc.data() as Map<String, dynamic>;
|
final data = doc.data() as Map<String, dynamic>;
|
||||||
|
|
||||||
print("TicketModel.fromDocument - Doc ID: ${doc.id}, data: $data");
|
// print("TicketModel.fromDocument - Doc ID: ${doc.id}, data: $data");
|
||||||
return TicketModel(
|
return TicketModel(
|
||||||
id: doc.id,
|
id: doc.id,
|
||||||
from: data['from'] ?? '',
|
from: data['from'] ?? '',
|
||||||
|
@ -36,6 +36,7 @@ class TicketModel {
|
||||||
|
|
||||||
class FlightModel {
|
class FlightModel {
|
||||||
final String id;
|
final String id;
|
||||||
|
final String airLines;
|
||||||
final String flightClass;
|
final String flightClass;
|
||||||
final String code;
|
final String code;
|
||||||
final String cityDeparture;
|
final String cityDeparture;
|
||||||
|
@ -44,11 +45,14 @@ class FlightModel {
|
||||||
final String codeArrival;
|
final String codeArrival;
|
||||||
final DateTime departureTime;
|
final DateTime departureTime;
|
||||||
final DateTime arrivalTime;
|
final DateTime arrivalTime;
|
||||||
|
final String transitAirplane;
|
||||||
|
final String stop;
|
||||||
final int price;
|
final int price;
|
||||||
final Map<String, SeatInfo> seat;
|
final Map<String, SeatInfo> seat;
|
||||||
|
|
||||||
FlightModel({
|
FlightModel({
|
||||||
required this.id,
|
required this.id,
|
||||||
|
required this.airLines,
|
||||||
required this.flightClass,
|
required this.flightClass,
|
||||||
required this.code,
|
required this.code,
|
||||||
required this.cityDeparture,
|
required this.cityDeparture,
|
||||||
|
@ -57,6 +61,8 @@ class FlightModel {
|
||||||
required this.codeArrival,
|
required this.codeArrival,
|
||||||
required this.departureTime,
|
required this.departureTime,
|
||||||
required this.arrivalTime,
|
required this.arrivalTime,
|
||||||
|
required this.transitAirplane,
|
||||||
|
required this.stop,
|
||||||
required this.price,
|
required this.price,
|
||||||
required this.seat,
|
required this.seat,
|
||||||
});
|
});
|
||||||
|
@ -75,10 +81,11 @@ class FlightModel {
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
print("FlightModel.fromDocument - Doc ID: ${doc.id}, data: $data");
|
// print("FlightModel.fromDocument - Doc ID: ${doc.id}, data: $data");
|
||||||
|
|
||||||
return FlightModel(
|
return FlightModel(
|
||||||
id: doc.id,
|
id: doc.id,
|
||||||
|
airLines: data['airlines'] ?? '',
|
||||||
flightClass: data['seatClass'] ?? '',
|
flightClass: data['seatClass'] ?? '',
|
||||||
code: data['code'] ?? '',
|
code: data['code'] ?? '',
|
||||||
cityDeparture: data['cityDeparture'] ?? '',
|
cityDeparture: data['cityDeparture'] ?? '',
|
||||||
|
@ -87,6 +94,8 @@ class FlightModel {
|
||||||
codeArrival: data['codeArrival'] ?? '',
|
codeArrival: data['codeArrival'] ?? '',
|
||||||
departureTime: (data['dateDeparture'] as Timestamp).toDate(),
|
departureTime: (data['dateDeparture'] as Timestamp).toDate(),
|
||||||
arrivalTime: (data['dateArrival'] as Timestamp).toDate(),
|
arrivalTime: (data['dateArrival'] as Timestamp).toDate(),
|
||||||
|
transitAirplane: data['transitAirplane'] ?? '',
|
||||||
|
stop: data['stop'] ?? '',
|
||||||
price: data['price'] ?? 0,
|
price: data['price'] ?? 0,
|
||||||
seat: seatMap, // masukkan Map<String, SeatInfo>
|
seat: seatMap, // masukkan Map<String, SeatInfo>
|
||||||
);
|
);
|
||||||
|
@ -94,6 +103,7 @@ class FlightModel {
|
||||||
|
|
||||||
Map<String, dynamic> toMap() {
|
Map<String, dynamic> toMap() {
|
||||||
return {
|
return {
|
||||||
|
'airlines': airLines,
|
||||||
'seatClass': flightClass,
|
'seatClass': flightClass,
|
||||||
'code': code,
|
'code': code,
|
||||||
'cityDeparture': cityDeparture,
|
'cityDeparture': cityDeparture,
|
||||||
|
@ -102,6 +112,8 @@ class FlightModel {
|
||||||
'codeArrival': codeArrival,
|
'codeArrival': codeArrival,
|
||||||
'dateDeparture': Timestamp.fromDate(departureTime),
|
'dateDeparture': Timestamp.fromDate(departureTime),
|
||||||
'dateArrival': Timestamp.fromDate(arrivalTime),
|
'dateArrival': Timestamp.fromDate(arrivalTime),
|
||||||
|
'transitAirplane': transitAirplane,
|
||||||
|
'stop': stop,
|
||||||
'price': price,
|
'price': price,
|
||||||
// Konversi Map<String, SeatInfo> jadi Map<String, Map<String,dynamic>>
|
// Konversi Map<String, SeatInfo> jadi Map<String, Map<String,dynamic>>
|
||||||
'seat': seat.map((key, value) => MapEntry(key, value.toMap())),
|
'seat': seat.map((key, value) => MapEntry(key, value.toMap())),
|
||||||
|
|
|
@ -11,4 +11,9 @@ abstract class TicketRepository {
|
||||||
required String ticketId,
|
required String ticketId,
|
||||||
required String flightClass,
|
required String flightClass,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Future<FlightModel> getFlightById({
|
||||||
|
required String ticketId,
|
||||||
|
required String flightId,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,3 +18,16 @@ class SearchFlightUseCase {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class GetFlightByIdUseCase {
|
||||||
|
final TicketRepository repository;
|
||||||
|
|
||||||
|
GetFlightByIdUseCase(this.repository);
|
||||||
|
|
||||||
|
Future<FlightModel> call({
|
||||||
|
required String ticketId,
|
||||||
|
required String flightId,
|
||||||
|
}) {
|
||||||
|
return repository.getFlightById(ticketId: ticketId, flightId: flightId);
|
||||||
|
}
|
||||||
|
}
|
|
@ -3,6 +3,7 @@ import 'package:e_porter/domain/usecases/auth_usecase.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
|
import '../../_core/service/logger_service.dart';
|
||||||
import '../../_core/service/preferences_service.dart';
|
import '../../_core/service/preferences_service.dart';
|
||||||
import '../screens/routes/app_rountes.dart';
|
import '../screens/routes/app_rountes.dart';
|
||||||
|
|
||||||
|
@ -40,7 +41,7 @@ class AuthController extends GetxController {
|
||||||
|
|
||||||
final uid = userEntity.uid;
|
final uid = userEntity.uid;
|
||||||
final roleFromDB = await getUserRoleUseCase(uid);
|
final roleFromDB = await getUserRoleUseCase(uid);
|
||||||
print("roleFromDB: $roleFromDB, roleFromOnboarding: $roleFromOnboarding");
|
logger.d("roleFromDB: $roleFromDB, roleFromOnboarding: $roleFromOnboarding");
|
||||||
|
|
||||||
if (roleFromDB != null && roleFromOnboarding != null && roleFromDB != roleFromOnboarding) {
|
if (roleFromDB != null && roleFromOnboarding != null && roleFromDB != roleFromOnboarding) {
|
||||||
_showErrorSnackbar(
|
_showErrorSnackbar(
|
||||||
|
|
|
@ -1,14 +1,19 @@
|
||||||
import 'package:e_porter/domain/repositories/ticket_repository.dart';
|
import 'package:e_porter/domain/repositories/ticket_repository.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
|
import '../../_core/service/logger_service.dart';
|
||||||
import '../../domain/models/ticket_model.dart';
|
import '../../domain/models/ticket_model.dart';
|
||||||
import '../../domain/usecases/ticket_usecase.dart';
|
import '../../domain/usecases/ticket_usecase.dart';
|
||||||
|
|
||||||
class TicketController extends GetxController {
|
class TicketController extends GetxController {
|
||||||
final SearchFlightUseCase searchFlightUseCase;
|
final SearchFlightUseCase searchFlightUseCase;
|
||||||
final TicketRepository ticketRepository;
|
final TicketRepository ticketRepository;
|
||||||
|
final GetFlightByIdUseCase getFlightByIdUseCase;
|
||||||
|
|
||||||
TicketController(this.searchFlightUseCase) : ticketRepository = searchFlightUseCase.repository;
|
TicketController(
|
||||||
|
this.searchFlightUseCase,
|
||||||
|
this.getFlightByIdUseCase,
|
||||||
|
) : ticketRepository = searchFlightUseCase.repository;
|
||||||
|
|
||||||
var tickets = <TicketModel>[].obs;
|
var tickets = <TicketModel>[].obs;
|
||||||
var ticketFlight = <TicketFlightModel>[].obs;
|
var ticketFlight = <TicketFlightModel>[].obs;
|
||||||
|
@ -34,19 +39,26 @@ class TicketController extends GetxController {
|
||||||
tickets.addAll(ticketList);
|
tickets.addAll(ticketList);
|
||||||
|
|
||||||
for (final t in ticketList) {
|
for (final t in ticketList) {
|
||||||
final flights = await ticketRepository.getFlights(
|
final flights = await ticketRepository.getFlights(
|
||||||
ticketId: t.id,
|
ticketId: t.id,
|
||||||
flightClass: flightClass,
|
flightClass: flightClass,
|
||||||
);
|
);
|
||||||
for (final f in flights) {
|
for (final f in flights) {
|
||||||
ticketFlight.add(TicketFlightModel(ticket: t, flight: f));
|
ticketFlight.add(TicketFlightModel(ticket: t, flight: f));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
errorMessage.value = e.toString();
|
errorMessage.value = e.toString();
|
||||||
print("searchTickets error: $e");
|
logger.e("searchTickets error: $e");
|
||||||
} finally {
|
} finally {
|
||||||
isLoading.value = false;
|
isLoading.value = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<FlightModel> getFlightById({
|
||||||
|
required String ticketId,
|
||||||
|
required String flightId,
|
||||||
|
}) {
|
||||||
|
return getFlightByIdUseCase.call(ticketId: ticketId, flightId: flightId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,61 @@
|
||||||
|
import 'package:e_porter/_core/component/icons/icons_library.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
|
import 'package:zoom_tap_animation/zoom_tap_animation.dart';
|
||||||
|
|
||||||
|
import '../../../../_core/constants/colors.dart';
|
||||||
|
import '../../../../_core/constants/typography.dart';
|
||||||
|
|
||||||
|
class TitleShowModal extends StatelessWidget {
|
||||||
|
final String text;
|
||||||
|
final VoidCallback? onTap;
|
||||||
|
|
||||||
|
const TitleShowModal({Key? key, required this.text, this.onTap});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 166.w, vertical: 16.h),
|
||||||
|
child: Divider(
|
||||||
|
thickness: 4,
|
||||||
|
color: Color(0xFFD9D9D9),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
TypographyStyles.h6(text, color: GrayColors.gray800),
|
||||||
|
_buildButtonAdd(),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buildButtonAdd() {
|
||||||
|
if (onTap == null) return SizedBox.shrink();
|
||||||
|
return ZoomTapAnimation(
|
||||||
|
child: GestureDetector(
|
||||||
|
onTap: onTap,
|
||||||
|
child: Container(
|
||||||
|
padding: EdgeInsets.symmetric(vertical: 6.h, horizontal: 10.w),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: PrimaryColors.primary100,
|
||||||
|
border: Border.all(width: 1.w, color: PrimaryColors.primary800),
|
||||||
|
borderRadius: BorderRadius.circular(35.r),
|
||||||
|
),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
CustomeIcons.PlusOutline(),
|
||||||
|
SizedBox(width: 6.w),
|
||||||
|
TypographyStyles.small("Tambah", color: PrimaryColors.primary800)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
|
@ -8,6 +8,7 @@ import 'package:e_porter/domain/models/airport.dart';
|
||||||
import 'package:e_porter/presentation/screens/home/component/flight_class_radio.dart';
|
import 'package:e_porter/presentation/screens/home/component/flight_class_radio.dart';
|
||||||
import 'package:e_porter/presentation/screens/home/component/flight_date_selector.dart';
|
import 'package:e_porter/presentation/screens/home/component/flight_date_selector.dart';
|
||||||
import 'package:e_porter/presentation/screens/home/component/flight_selector.dart';
|
import 'package:e_porter/presentation/screens/home/component/flight_selector.dart';
|
||||||
|
import 'package:e_porter/presentation/screens/home/component/title_show_modal.dart';
|
||||||
import 'package:e_porter/presentation/screens/routes/app_rountes.dart';
|
import 'package:e_porter/presentation/screens/routes/app_rountes.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
@ -150,7 +151,7 @@ class _BookingTicketsState extends State<BookingTickets> {
|
||||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||||
child: Wrap(
|
child: Wrap(
|
||||||
children: [
|
children: [
|
||||||
_buildTitleShowModal('Kelas Penerbangan'),
|
TitleShowModal(text: 'Kelas Penerbangan'),
|
||||||
_buildFlightClassRadio(),
|
_buildFlightClassRadio(),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -183,7 +184,7 @@ class _BookingTicketsState extends State<BookingTickets> {
|
||||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||||
child: Wrap(
|
child: Wrap(
|
||||||
children: [
|
children: [
|
||||||
_buildTitleShowModal('Tambah Penumpang'),
|
TitleShowModal(text: 'Tambah Penumpang'),
|
||||||
_buildFlightAddPassenger(),
|
_buildFlightAddPassenger(),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -254,22 +255,6 @@ class _BookingTicketsState extends State<BookingTickets> {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildTitleShowModal(String text) {
|
|
||||||
return Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Padding(
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 166.w, vertical: 16.h),
|
|
||||||
child: Divider(
|
|
||||||
thickness: 4,
|
|
||||||
color: Color(0xFFD9D9D9),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
TypographyStyles.h6(text, color: GrayColors.gray800),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Widget _buildFlightClassRadio() {
|
Widget _buildFlightClassRadio() {
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: EdgeInsets.symmetric(
|
padding: EdgeInsets.symmetric(
|
|
@ -4,6 +4,7 @@ import 'package:e_porter/_core/component/card/custome_shadow_cotainner.dart';
|
||||||
import 'package:e_porter/_core/component/icons/icons_library.dart';
|
import 'package:e_porter/_core/component/icons/icons_library.dart';
|
||||||
import 'package:e_porter/_core/constants/colors.dart';
|
import 'package:e_porter/_core/constants/colors.dart';
|
||||||
import 'package:e_porter/_core/constants/typography.dart';
|
import 'package:e_porter/_core/constants/typography.dart';
|
||||||
|
import 'package:e_porter/_core/service/preferences_service.dart';
|
||||||
import 'package:e_porter/presentation/screens/home/component/profile_avatar.dart';
|
import 'package:e_porter/presentation/screens/home/component/profile_avatar.dart';
|
||||||
import 'package:e_porter/presentation/screens/home/component/summary_card.dart';
|
import 'package:e_porter/presentation/screens/home/component/summary_card.dart';
|
||||||
import 'package:e_porter/presentation/screens/routes/app_rountes.dart';
|
import 'package:e_porter/presentation/screens/routes/app_rountes.dart';
|
||||||
|
@ -14,6 +15,8 @@ import 'package:flutter_svg/flutter_svg.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:zoom_tap_animation/zoom_tap_animation.dart';
|
import 'package:zoom_tap_animation/zoom_tap_animation.dart';
|
||||||
|
|
||||||
|
import '../../../../domain/models/user_entity.dart';
|
||||||
|
|
||||||
class HomeScreen extends StatefulWidget {
|
class HomeScreen extends StatefulWidget {
|
||||||
const HomeScreen({super.key});
|
const HomeScreen({super.key});
|
||||||
|
|
||||||
|
@ -24,6 +27,7 @@ class HomeScreen extends StatefulWidget {
|
||||||
class _HomeScreenState extends State<HomeScreen> {
|
class _HomeScreenState extends State<HomeScreen> {
|
||||||
int _current = 0;
|
int _current = 0;
|
||||||
late final String role;
|
late final String role;
|
||||||
|
late Future<UserData?> _userDataFuture;
|
||||||
final CarouselSliderController _carouselController = CarouselSliderController();
|
final CarouselSliderController _carouselController = CarouselSliderController();
|
||||||
|
|
||||||
final List<Widget> imageList = [
|
final List<Widget> imageList = [
|
||||||
|
@ -43,6 +47,7 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
role = Get.arguments ?? 'penumpang';
|
role = Get.arguments ?? 'penumpang';
|
||||||
|
_userDataFuture = PreferencesService.getUserData();
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -55,232 +60,252 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||||
|
|
||||||
Widget _buildPassengerUI() {
|
Widget _buildPassengerUI() {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: GrayColors.gray50,
|
backgroundColor: GrayColors.gray50,
|
||||||
appBar: HomeAppbarComponent(
|
appBar: HomeAppbarComponent(
|
||||||
title: 'E-Porter',
|
title: 'E-Porter',
|
||||||
subtitle: 'Your Porter, Your Priority',
|
subtitle: 'Your Porter, Your Priority',
|
||||||
backgroundColor: PrimaryColors.primary800,
|
backgroundColor: PrimaryColors.primary800,
|
||||||
trailing: Flexible(
|
trailing: Flexible(
|
||||||
child: SvgPicture.asset(
|
child: SvgPicture.asset(
|
||||||
'assets/images/ornamen.svg',
|
'assets/images/ornamen.svg',
|
||||||
height: 40,
|
height: 40,
|
||||||
fit: BoxFit.contain,
|
fit: BoxFit.contain,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
body: FutureBuilder<UserData?>(
|
||||||
body: Stack(
|
future: _userDataFuture,
|
||||||
children: [
|
builder: (context, snapshot) {
|
||||||
Container(
|
String userName = "Guest";
|
||||||
height: 60.h,
|
if (snapshot.connectionState == ConnectionState.waiting) {
|
||||||
width: double.infinity,
|
return Center(child: CircularProgressIndicator());
|
||||||
color: PrimaryColors.primary800,
|
} else if (snapshot.hasData && snapshot.data?.name != null) {
|
||||||
),
|
userName = snapshot.data!.name!;
|
||||||
Container(
|
}
|
||||||
margin: EdgeInsets.symmetric(horizontal: 16.w, vertical: 16.h),
|
return Stack(
|
||||||
child: ListView(
|
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 16.h),
|
height: 60.h,
|
||||||
decoration: BoxDecoration(
|
width: double.infinity,
|
||||||
color: Colors.white,
|
color: PrimaryColors.primary800,
|
||||||
borderRadius: BorderRadius.circular(10.r),
|
),
|
||||||
border: Border.all(
|
Container(
|
||||||
strokeAlign: 1.w,
|
margin: EdgeInsets.symmetric(horizontal: 16.w, vertical: 16.h),
|
||||||
color: GrayColors.gray100,
|
child: ListView(
|
||||||
),
|
|
||||||
boxShadow: [
|
|
||||||
BoxShadow(
|
|
||||||
color: Colors.black.withOpacity(0.06),
|
|
||||||
offset: const Offset(0, 4),
|
|
||||||
blurRadius: 14,
|
|
||||||
spreadRadius: 10,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
child: Column(
|
|
||||||
children: [
|
children: [
|
||||||
Row(
|
Container(
|
||||||
children: [
|
padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 16.h),
|
||||||
ProfileAvatar(
|
decoration: BoxDecoration(
|
||||||
fullName: 'Muhammad Al Kahfi',
|
color: Colors.white,
|
||||||
|
borderRadius: BorderRadius.circular(10.r),
|
||||||
|
border: Border.all(
|
||||||
|
strokeAlign: 1.w,
|
||||||
|
color: GrayColors.gray100,
|
||||||
),
|
),
|
||||||
SizedBox(width: 16.w),
|
boxShadow: [
|
||||||
Expanded(
|
BoxShadow(
|
||||||
child: Column(
|
color: Colors.black.withOpacity(0.06),
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
offset: const Offset(0, 4),
|
||||||
|
blurRadius: 14,
|
||||||
|
spreadRadius: 10,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
children: [
|
children: [
|
||||||
TypographyStyles.body('Muhammad Al Kahfi'),
|
ProfileAvatar(
|
||||||
SizedBox(height: 2.h),
|
fullName: userName,
|
||||||
TypographyStyles.caption(
|
|
||||||
'Jelajahi dunia dengan E-Porter',
|
|
||||||
color: GrayColors.gray500,
|
|
||||||
fontWeight: FontWeight.w400,
|
|
||||||
maxlines: 1,
|
|
||||||
),
|
),
|
||||||
|
SizedBox(width: 16.w),
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
TypographyStyles.body(userName, color: GrayColors.gray800),
|
||||||
|
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),
|
||||||
SvgPicture.asset('assets/icons/ic_notification.svg'),
|
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: 20.h),
|
SizedBox(height: 32.h),
|
||||||
ButtonListTile(
|
Container(
|
||||||
onTab: () {
|
child: CarouselSlider(
|
||||||
Get.toNamed(Routes.BOOKINGTICKETS);
|
items: imageList,
|
||||||
},
|
options: CarouselOptions(
|
||||||
titleText: 'Pesan Tiket',
|
autoPlay: true,
|
||||||
subTitle: 'Jadwalkan penerbangan sekarang!',
|
enlargeCenterPage: true,
|
||||||
imageAssets: 'assets/icons/ic_sent.svg',
|
aspectRatio: 2.3,
|
||||||
backroundColor: GrayColors.gray100,
|
viewportFraction: 0.8,
|
||||||
strokeColor: GrayColors.gray300,
|
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,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
)
|
||||||
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,
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
);
|
||||||
)
|
},
|
||||||
],
|
));
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildPorterUI() {
|
Widget _buildPorterUI() {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: GrayColors.gray50,
|
backgroundColor: GrayColors.gray50,
|
||||||
body: SafeArea(
|
body: FutureBuilder<UserData?>(
|
||||||
child: Column(
|
future: _userDataFuture,
|
||||||
children: [
|
builder: (context, snapshot) {
|
||||||
_buildAppbar(
|
String userPorter = "Guest";
|
||||||
context,
|
if (snapshot.connectionState == ConnectionState.waiting) {
|
||||||
nameAvatar: 'Muhammad Al Kahfi',
|
return Center(child: CircularProgressIndicator());
|
||||||
nameUser: 'Muhammad Al Kahfi',
|
} else if (snapshot.hasData && snapshot.data?.name != null) {
|
||||||
subTitle: 'Selamat datang kembali Rekanku',
|
userPorter = snapshot.data!.name!;
|
||||||
),
|
}
|
||||||
Expanded(
|
return SafeArea(
|
||||||
child: Padding(
|
child: Column(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 20.h),
|
children: [
|
||||||
child: SingleChildScrollView(
|
_buildAppbar(
|
||||||
child: Column(
|
context,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
nameAvatar: userPorter,
|
||||||
children: [
|
nameUser: userPorter,
|
||||||
TypographyStyles.h6('Ringkasan Hari ini', color: GrayColors.gray800),
|
subTitle: 'Selamat datang kembali Rekanku',
|
||||||
SizedBox(height: 16.h),
|
),
|
||||||
Row(
|
Expanded(
|
||||||
children: [
|
child: Padding(
|
||||||
SummaryCard(
|
padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 20.h),
|
||||||
label: 'Pesanan Masuk',
|
child: SingleChildScrollView(
|
||||||
value: '1000000000000000000000',
|
|
||||||
icon: CustomeIcons.PlaneLeftOutline(),
|
|
||||||
),
|
|
||||||
SizedBox(width: 16.w),
|
|
||||||
SummaryCard(
|
|
||||||
label: 'Pesanan Berjalan',
|
|
||||||
value: '1000000000000000000000',
|
|
||||||
icon: CustomeIcons.PlaneLeftOutline(),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(height: 16.w),
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
SummaryCard(
|
|
||||||
label: 'Pesanan Selesai',
|
|
||||||
value: '1000000000000000000000',
|
|
||||||
icon: CustomeIcons.PlaneLeftOutline(),
|
|
||||||
),
|
|
||||||
SizedBox(width: 16.w),
|
|
||||||
SummaryCard(
|
|
||||||
label: 'Pendapatan',
|
|
||||||
value: 'Rp 500.000',
|
|
||||||
icon: CustomeIcons.PlaneLeftOutline(),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(height: 32.w),
|
|
||||||
CustomeShadowCotainner(
|
|
||||||
child: Column(
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Container(
|
TypographyStyles.h6('Ringkasan Hari ini', color: GrayColors.gray800),
|
||||||
padding: EdgeInsets.symmetric(horizontal: 8.w, vertical: 6.h),
|
SizedBox(height: 16.h),
|
||||||
decoration: BoxDecoration(
|
Row(
|
||||||
color: PrimaryColors.primary200,
|
children: [
|
||||||
borderRadius: BorderRadius.circular(10.r),
|
SummaryCard(
|
||||||
),
|
label: 'Pesanan Masuk',
|
||||||
child: SvgPicture.asset(
|
value: '1000000000000000000000',
|
||||||
'assets/icons/ic_account.svg',
|
icon: CustomeIcons.PlaneLeftOutline(),
|
||||||
width: 32.w,
|
),
|
||||||
height: 32.h,
|
SizedBox(width: 16.w),
|
||||||
),
|
SummaryCard(
|
||||||
|
label: 'Pesanan Berjalan',
|
||||||
|
value: '1000000000000000000000',
|
||||||
|
icon: CustomeIcons.PlaneLeftOutline(),
|
||||||
|
)
|
||||||
|
],
|
||||||
),
|
),
|
||||||
SizedBox(height: 10.h),
|
SizedBox(height: 16.w),
|
||||||
TypographyStyles.body(
|
Row(
|
||||||
'Mulai Antrian',
|
children: [
|
||||||
|
SummaryCard(
|
||||||
|
label: 'Pesanan Selesai',
|
||||||
|
value: '1000000000000000000000',
|
||||||
|
icon: CustomeIcons.PlaneLeftOutline(),
|
||||||
|
),
|
||||||
|
SizedBox(width: 16.w),
|
||||||
|
SummaryCard(
|
||||||
|
label: 'Pendapatan',
|
||||||
|
value: 'Rp 500.000',
|
||||||
|
icon: CustomeIcons.PlaneLeftOutline(),
|
||||||
|
)
|
||||||
|
],
|
||||||
),
|
),
|
||||||
|
SizedBox(height: 32.w),
|
||||||
|
CustomeShadowCotainner(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 8.w, vertical: 6.h),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: PrimaryColors.primary200,
|
||||||
|
borderRadius: BorderRadius.circular(10.r),
|
||||||
|
),
|
||||||
|
child: SvgPicture.asset(
|
||||||
|
'assets/icons/ic_account.svg',
|
||||||
|
width: 32.w,
|
||||||
|
height: 32.h,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height: 10.h),
|
||||||
|
TypographyStyles.body(
|
||||||
|
'Mulai Antrian',
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
],
|
),
|
||||||
),
|
)
|
||||||
),
|
],
|
||||||
),
|
),
|
||||||
)
|
);
|
||||||
],
|
},
|
||||||
),
|
));
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
// ignore_for_file: unnecessary_null_comparison
|
||||||
|
|
||||||
import 'package:e_porter/_core/component/appbar/appbar_component.dart';
|
import 'package:e_porter/_core/component/appbar/appbar_component.dart';
|
||||||
import 'package:e_porter/_core/constants/colors.dart';
|
import 'package:e_porter/_core/constants/colors.dart';
|
||||||
import 'package:e_porter/_core/constants/typography.dart';
|
import 'package:e_porter/_core/constants/typography.dart';
|
||||||
|
@ -8,6 +10,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
|
|
||||||
|
import '../../../../_core/service/logger_service.dart';
|
||||||
import '../../../controllers/ticket_controller.dart';
|
import '../../../controllers/ticket_controller.dart';
|
||||||
|
|
||||||
class SearchTicketsScreen extends StatefulWidget {
|
class SearchTicketsScreen extends StatefulWidget {
|
||||||
|
@ -108,7 +111,15 @@ class _SearchTicketsScreenState extends State<SearchTicketsScreen> {
|
||||||
}
|
}
|
||||||
final hours = diff.inHours;
|
final hours = diff.inHours;
|
||||||
final minutes = diff.inMinutes % 60;
|
final minutes = diff.inMinutes % 60;
|
||||||
final durationFormatted = '${hours}j ${minutes}m';
|
final duration = '${hours}j ${minutes}m';
|
||||||
|
|
||||||
|
String stopText = '';
|
||||||
|
if (flight.stop != null && flight.stop.isNotEmpty) {
|
||||||
|
stopText = '${flight.stop} - ';
|
||||||
|
}
|
||||||
|
final finalDuration = '$stopText$duration';
|
||||||
|
final ticketId = '${ticket.id}';
|
||||||
|
final flightId = '${flight.id}';
|
||||||
|
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: EdgeInsets.only(bottom: 16.h),
|
padding: EdgeInsets.only(bottom: 16.h),
|
||||||
|
@ -120,11 +131,19 @@ class _SearchTicketsScreenState extends State<SearchTicketsScreen> {
|
||||||
arrivalCode: '${flight.codeArrival}',
|
arrivalCode: '${flight.codeArrival}',
|
||||||
departureTime: departureTime,
|
departureTime: departureTime,
|
||||||
arrivalTime: arrivalTime,
|
arrivalTime: arrivalTime,
|
||||||
duration: durationFormatted,
|
duration: finalDuration,
|
||||||
seatClass: flight.flightClass,
|
seatClass: flight.flightClass,
|
||||||
price: formattedPrice,
|
price: formattedPrice,
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Get.toNamed(Routes.TICKETBOOKINGSTEP1);
|
final argument = {
|
||||||
|
"ticketId": ticketId,
|
||||||
|
"flightId": flightId,
|
||||||
|
"ticketDate": ticketDate,
|
||||||
|
"passenger": passengerCount,
|
||||||
|
};
|
||||||
|
logger.d(
|
||||||
|
'ID Ticket: $ticketId \nID Flight: $flightId \nTicket Date: $ticketDate \nPassenger: $passengerCount');
|
||||||
|
Get.toNamed(Routes.TICKETBOOKINGSTEP1, arguments: argument);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
@ -5,11 +5,17 @@ import 'package:e_porter/_core/component/card/custome_shadow_cotainner.dart';
|
||||||
import 'package:e_porter/_core/component/icons/icons_library.dart';
|
import 'package:e_porter/_core/component/icons/icons_library.dart';
|
||||||
import 'package:e_porter/_core/constants/colors.dart';
|
import 'package:e_porter/_core/constants/colors.dart';
|
||||||
import 'package:e_porter/_core/constants/typography.dart';
|
import 'package:e_porter/_core/constants/typography.dart';
|
||||||
|
import 'package:e_porter/_core/service/logger_service.dart';
|
||||||
|
import 'package:e_porter/_core/service/preferences_service.dart';
|
||||||
|
import 'package:e_porter/domain/models/ticket_model.dart';
|
||||||
|
import 'package:e_porter/presentation/controllers/ticket_controller.dart';
|
||||||
import 'package:e_porter/presentation/screens/home/component/card_flight_information.dart';
|
import 'package:e_porter/presentation/screens/home/component/card_flight_information.dart';
|
||||||
|
import 'package:e_porter/presentation/screens/home/component/title_show_modal.dart';
|
||||||
import 'package:e_porter/presentation/screens/routes/app_rountes.dart';
|
import 'package:e_porter/presentation/screens/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:intl/intl.dart';
|
||||||
import 'package:zoom_tap_animation/zoom_tap_animation.dart';
|
import 'package:zoom_tap_animation/zoom_tap_animation.dart';
|
||||||
|
|
||||||
class TicketBookingStep1Screen extends StatefulWidget {
|
class TicketBookingStep1Screen extends StatefulWidget {
|
||||||
|
@ -21,6 +27,26 @@ class TicketBookingStep1Screen extends StatefulWidget {
|
||||||
|
|
||||||
class _TicketBookingStep1ScreenState extends State<TicketBookingStep1Screen> {
|
class _TicketBookingStep1ScreenState extends State<TicketBookingStep1Screen> {
|
||||||
bool isToggled = false;
|
bool isToggled = false;
|
||||||
|
late final String ticketId;
|
||||||
|
late final String flightId;
|
||||||
|
late final String ticketDate;
|
||||||
|
late final int passenger;
|
||||||
|
late Future<FlightModel> _flightFuture;
|
||||||
|
late final TicketController ticketController;
|
||||||
|
final currencyFormatter = NumberFormat.decimalPattern('id_ID');
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
final args = Get.arguments as Map<String, dynamic>;
|
||||||
|
ticketId = args['ticketId'];
|
||||||
|
flightId = args['flightId'];
|
||||||
|
ticketDate = args['ticketDate'];
|
||||||
|
passenger = args['passenger'];
|
||||||
|
|
||||||
|
ticketController = Get.find<TicketController>();
|
||||||
|
_flightFuture = ticketController.getFlightById(ticketId: ticketId, flightId: flightId);
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
@ -33,34 +59,51 @@ class _TicketBookingStep1ScreenState extends State<TicketBookingStep1Screen> {
|
||||||
Get.back();
|
Get.back();
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
body: SafeArea(
|
body: FutureBuilder<FlightModel>(
|
||||||
child: Padding(
|
future: _flightFuture,
|
||||||
padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 20.h),
|
builder: (context, snapshot) {
|
||||||
child: SingleChildScrollView(
|
if (snapshot.connectionState == ConnectionState.waiting) {
|
||||||
child: Column(
|
return Center(child: CircularProgressIndicator());
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
} else if (snapshot.hasError) {
|
||||||
children: [
|
return Center(child: Text("Error: ${snapshot.error}"));
|
||||||
CardFlightInformation(
|
} else if (!snapshot.hasData) {
|
||||||
date: 'Sen, 27 Jan 2025',
|
return Center(child: Text("Data tidak ditemukan"));
|
||||||
time: '12.20 - 06.00 AM',
|
}
|
||||||
departureCity: 'Yogyakarta',
|
final flight = snapshot.data!;
|
||||||
arrivalCity: 'Lombok',
|
|
||||||
plane: 'Citilink (103)',
|
final departureTime = DateFormat.jm().format(flight.departureTime);
|
||||||
seatClass: 'Economy',
|
final arrivalTime = DateFormat.jm().format(flight.arrivalTime);
|
||||||
passenger: '2',
|
|
||||||
|
return SafeArea(
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 20.h),
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
CardFlightInformation(
|
||||||
|
date: '${ticketDate}',
|
||||||
|
time: '$departureTime - $arrivalTime',
|
||||||
|
departureCity: '${flight.cityDeparture}',
|
||||||
|
arrivalCity: '${flight.cityArrival}',
|
||||||
|
plane: '${flight.airLines} (${flight.code})',
|
||||||
|
seatClass: '${flight.flightClass}',
|
||||||
|
passenger: '$passenger',
|
||||||
|
),
|
||||||
|
SizedBox(height: 32.h),
|
||||||
|
TypographyStyles.h6('Detail Pemesanan', color: GrayColors.gray800),
|
||||||
|
SizedBox(height: 20.h),
|
||||||
|
_buildCardUsers(),
|
||||||
|
SizedBox(height: 32.h),
|
||||||
|
TypographyStyles.h6('Detail Penumpang', color: GrayColors.gray800),
|
||||||
|
SizedBox(height: 20.h),
|
||||||
|
_buildCardDetailPessenger()
|
||||||
|
],
|
||||||
),
|
),
|
||||||
SizedBox(height: 32.h),
|
),
|
||||||
TypographyStyles.h6('Detail Pemesanan', color: GrayColors.gray800, letterSpacing: 0.2),
|
|
||||||
SizedBox(height: 20.h),
|
|
||||||
_buildCardUsers('AHMAD CHOIRUL UMAM ALI R', 'ahmadzaqi98mmm@gmail.com', '082142568403'),
|
|
||||||
SizedBox(height: 32.h),
|
|
||||||
TypographyStyles.h6('Detail Penumpang', color: GrayColors.gray800, letterSpacing: 0.2),
|
|
||||||
SizedBox(height: 20.h),
|
|
||||||
_buildCardDetailPessenger()
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
);
|
||||||
),
|
},
|
||||||
),
|
),
|
||||||
bottomNavigationBar: CustomeShadowCotainner(
|
bottomNavigationBar: CustomeShadowCotainner(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 20.h),
|
padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 20.h),
|
||||||
|
@ -77,70 +120,131 @@ class _TicketBookingStep1ScreenState extends State<TicketBookingStep1Screen> {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildCardUsers(final String name, String email, String noTelpon) {
|
Widget _buildCardUsers() {
|
||||||
return CustomeShadowCotainner(
|
return FutureBuilder(
|
||||||
child: Column(
|
future: PreferencesService.getUserData(),
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
builder: (context, snapshot) {
|
||||||
children: [
|
if (snapshot.connectionState == ConnectionState.waiting) {
|
||||||
TypographyStyles.small('Nama', fontWeight: FontWeight.w400, color: GrayColors.gray600, letterSpacing: 0.2),
|
return CustomeShadowCotainner(child: Center(child: CircularProgressIndicator()));
|
||||||
SizedBox(height: 10.h),
|
} else if (snapshot.hasData && snapshot.data != null) {
|
||||||
TypographyStyles.body(name, color: GrayColors.gray800, fontWeight: FontWeight.w500, letterSpacing: 0.2),
|
final user = snapshot.data!;
|
||||||
SizedBox(height: 16.h),
|
logger.d('Data user: ${user.email}');
|
||||||
TypographyStyles.small('Email', fontWeight: FontWeight.w400, color: GrayColors.gray600, letterSpacing: 0.2),
|
return CustomeShadowCotainner(
|
||||||
SizedBox(height: 10.h),
|
child: Column(
|
||||||
TypographyStyles.body(email, color: GrayColors.gray800, fontWeight: FontWeight.w500, letterSpacing: 0.2),
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
SizedBox(height: 16.h),
|
children: [
|
||||||
TypographyStyles.small('No Telepon',
|
TypographyStyles.small('Nama', fontWeight: FontWeight.w400, color: GrayColors.gray600),
|
||||||
fontWeight: FontWeight.w400, color: GrayColors.gray600, letterSpacing: 0.2),
|
SizedBox(height: 10.h),
|
||||||
SizedBox(height: 10.h),
|
TypographyStyles.body(user.name ?? 'User not found',
|
||||||
TypographyStyles.body(noTelpon, color: GrayColors.gray800, fontWeight: FontWeight.w500, letterSpacing: 0.2),
|
color: GrayColors.gray800, fontWeight: FontWeight.w500),
|
||||||
SizedBox(height: 20.h),
|
SizedBox(height: 16.h),
|
||||||
Row(
|
TypographyStyles.small('Email', fontWeight: FontWeight.w400, color: GrayColors.gray600),
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
SizedBox(height: 10.h),
|
||||||
children: [
|
TypographyStyles.body(user.email ?? 'Email not found',
|
||||||
TypographyStyles.caption(
|
color: GrayColors.gray800, fontWeight: FontWeight.w500),
|
||||||
'Tambahkan sebagai penumpang',
|
SizedBox(height: 16.h),
|
||||||
color: GrayColors.gray800,
|
TypographyStyles.small('No Telepon', fontWeight: FontWeight.w400, color: GrayColors.gray600),
|
||||||
fontWeight: FontWeight.w400,
|
SizedBox(height: 10.h),
|
||||||
letterSpacing: 0.2,
|
TypographyStyles.body(user.phone ?? 'Number phone not found',
|
||||||
|
color: GrayColors.gray800, fontWeight: FontWeight.w500),
|
||||||
|
SizedBox(height: 20.h),
|
||||||
|
Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
TypographyStyles.caption(
|
||||||
|
'Tambahkan sebagai penumpang',
|
||||||
|
color: GrayColors.gray800,
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
),
|
||||||
|
SizedBox(width: 20.w),
|
||||||
|
SwitchButton(
|
||||||
|
value: isToggled,
|
||||||
|
onChanged: (newValue) {
|
||||||
|
setState(
|
||||||
|
() {
|
||||||
|
isToggled = newValue;
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
|
)
|
||||||
|
],
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
return CustomeShadowCotainner(
|
||||||
|
child: Center(
|
||||||
|
child: TypographyStyles.body(
|
||||||
|
"Data user tidak tersedia",
|
||||||
|
color: GrayColors.gray600,
|
||||||
),
|
),
|
||||||
SizedBox(width: 20.w),
|
),
|
||||||
SwitchButton(
|
);
|
||||||
value: isToggled,
|
}
|
||||||
onChanged: (newValue) {
|
},
|
||||||
setState(
|
|
||||||
() {
|
|
||||||
isToggled = newValue;
|
|
||||||
},
|
|
||||||
);
|
|
||||||
},
|
|
||||||
)
|
|
||||||
],
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildCardDetailPessenger() {
|
Widget _buildCardDetailPessenger() {
|
||||||
return CustomeShadowCotainner(
|
return Column(
|
||||||
child: Row(
|
children: List.generate(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
passenger,
|
||||||
children: [
|
(index) {
|
||||||
TypographyStyles.body(
|
return Padding(
|
||||||
'Penumpang 1 (Dewasa)',
|
padding: EdgeInsets.only(bottom: 16.h),
|
||||||
color: GrayColors.gray800,
|
child: CustomeShadowCotainner(
|
||||||
fontWeight: FontWeight.w500,
|
child: Row(
|
||||||
letterSpacing: 0.2,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
),
|
children: [
|
||||||
ZoomTapAnimation(
|
TypographyStyles.body(
|
||||||
child: GestureDetector(
|
'Penumpang 1 (Dewasa)',
|
||||||
onTap: () {},
|
color: GrayColors.gray800,
|
||||||
child: CustomeIcons.EditOutline(),
|
fontWeight: FontWeight.w500,
|
||||||
|
),
|
||||||
|
ZoomTapAnimation(
|
||||||
|
child: GestureDetector(
|
||||||
|
child: CustomeIcons.EditOutline(),
|
||||||
|
onTap: () {
|
||||||
|
showModalBottomSheet(
|
||||||
|
context: context,
|
||||||
|
backgroundColor: Colors.white,
|
||||||
|
isScrollControlled: true,
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.only(
|
||||||
|
topLeft: Radius.circular(10.r),
|
||||||
|
topRight: Radius.circular(10.r),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
builder: (context) {
|
||||||
|
return Padding(
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||||
|
child: Wrap(
|
||||||
|
children: [
|
||||||
|
TitleShowModal(
|
||||||
|
text: 'Informasi Penumpang',
|
||||||
|
onTap: () {},
|
||||||
|
),
|
||||||
|
_buildAddPassenger(),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
],
|
);
|
||||||
),
|
},
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buildAddPassenger() {
|
||||||
|
return Padding(
|
||||||
|
padding: EdgeInsets.symmetric(vertical: 16.h),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ 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/boarding_pass/pages/boarding_pass_screen.dart';
|
import 'package:e_porter/presentation/screens/boarding_pass/pages/boarding_pass_screen.dart';
|
||||||
import 'package:e_porter/presentation/screens/boarding_pass/pages/transaction_history.dart';
|
import 'package:e_porter/presentation/screens/boarding_pass/pages/transaction_history.dart';
|
||||||
import 'package:e_porter/presentation/screens/home/pages/booking_tickets.dart';
|
import 'package:e_porter/presentation/screens/home/pages/booking_tickets_screen.dart';
|
||||||
import 'package:e_porter/presentation/screens/home/pages/choose_seat_screen.dart';
|
import 'package:e_porter/presentation/screens/home/pages/choose_seat_screen.dart';
|
||||||
import 'package:e_porter/presentation/screens/home/pages/payment_screen.dart';
|
import 'package:e_porter/presentation/screens/home/pages/payment_screen.dart';
|
||||||
import 'package:e_porter/presentation/screens/home/pages/search_flight_screen.dart';
|
import 'package:e_porter/presentation/screens/home/pages/search_flight_screen.dart';
|
||||||
|
|
|
@ -272,6 +272,14 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.1"
|
version: "3.0.1"
|
||||||
|
logger:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: logger
|
||||||
|
sha256: be4b23575aac7ebf01f225a241eb7f6b5641eeaf43c6a8613510fc2f8cf187d1
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.5.0"
|
||||||
matcher:
|
matcher:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
|
@ -48,6 +48,7 @@ dependencies:
|
||||||
cloud_firestore: ^5.6.4
|
cloud_firestore: ^5.6.4
|
||||||
firebase_auth: ^5.5.1
|
firebase_auth: ^5.5.1
|
||||||
shared_preferences: ^2.5.2
|
shared_preferences: ^2.5.2
|
||||||
|
logger: ^2.5.0
|
||||||
# pin_code_fields: ^8.0.1
|
# pin_code_fields: ^8.0.1
|
||||||
# dio: ^5.8.0+1
|
# dio: ^5.8.0+1
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue