Checkout Step Widgets
views/widgets/* (address / shipping / payment / questions / policy)
Overview
Five composable sections rendered by CheckoutScreen: address form, shipping option picker, payment method picker, booking question form, and the read-only booking policy block.
User Flow
- checkout_address_section.dart: form + submit → updateShippingAddress(Address).
- checkout_shipping_options.dart: lists state.availableShippingOptions → setShippingOption.
- checkout_payment_methods.dart: lists state.availablePaymentProviders → setPaymentProvider.
- checkout_booking_questions.dart: renders per-question UI by q['type'] → setQuestionAnswer.
- checkout_booking_policy.dart: read-only display of bookingPolicy from ProvisionService.
Cases & Edge Cases
- Booking-question types: 'single_select' / 'multi_select' / 'yes_no' (use selected_option_ids), 'free_text' (comment), 'number' (number), 'image_upload' (image_file_id).
- Required-question validation is deferred to confirmStripePayment — the widgets themselves do not block submission.
- Shipping options can come back empty when address is missing or unsupported — UI must guide the user back to address.
Code References
- lib/src/features/shared/checkout/views/widgets/checkout_address_section.dart
- lib/src/features/shared/checkout/views/widgets/checkout_shipping_options.dart
- lib/src/features/shared/checkout/views/widgets/checkout_payment_methods.dart
- lib/src/features/shared/checkout/views/widgets/checkout_booking_questions.dart
- lib/src/features/shared/checkout/views/widgets/checkout_booking_policy.dart
API Calls
Empty — fill this in later. Open the manifest and add content here.
Notes
Each widget is dumb (props in, callback out) — state lives in CheckoutController only, no per-widget Riverpod providers.