Order Card + Status Badge
views/widgets/order_card.dart + order_status_badge.dart
Overview
List-row widget rendering one order. Customer variant emphasises seller info + tracking; seller variant emphasises customer info + split-payment status badge.
User Flow
- OrderCard receives an Order and a tap callback (push detail).
- OrderStatusBadge color-maps Medusa statuses (pending → amber, captured → green, refunded → grey, canceled → red).
- Tapping the card calls context.pushNamed(AppRoute.orderDetail, orderId).
Cases & Edge Cases
- Status badge falls back to 'unknown' grey for any string not in the map — protects against new server statuses.
- Localization is per-status via S.current.statusXxx; missing keys render the raw string.
Code References
- lib/src/features/shared/orders/views/widgets/order_card.dart
- lib/src/features/shared/orders/views/widgets/order_status_badge.dart
- lib/src/features/shared/orders/views/widgets/tracking_timeline.dart
API Calls
Empty — fill this in later. Open the manifest and add content here.
Notes
Card width assumes ~390 logical px phone — tablets need a Wrap container at the screen level to avoid stretched rows.