Travel topic

Travel

import 'package:sheen/travel.dart';

Hotel cards (and their loading skeleton), featured cards, tour and cruise cards with their itinerary, city tiles with the visa rule, price blocks, cancellation lines, score badges, deal badges with the price before the deal struck through, and map price pins, as widgets and as bitmaps for native map markers. Prices and words are always yours.

Travel

Deals

Deals

SheenHotelCard, SheenPremiumCard and SheenPriceBlock take a deal: deal is the badge on the photo ("−15%"), wasTotal the price before the deal, struck through, and dealNote a line such as "Ends Sun 18 Oct". On the hotel card the struck price sits under the total, so a long hotel name keeps its width. SheenDealBadge and SheenWasPrice are the same parts on their own, for a price bar or a map card.

Show a struck price only when it is the same stay without the deal: a struck "list price" the guest was never charged misleads.

const SheenPriceBlock(total: 'AED 1,186.01', caption: '1 night', wasTotal: 'AED 1,210.21');

Row(children: [SheenDealBadge('−15%', small: true), SizedBox(width: 6), SheenWasPrice('AED 1,210.21')]);

Tours and cruises

SheenTripCard is the size of SheenPremiumCard, for a carousel of tours or cruises: the photo (or a placeholder with a compass or a ship), a tag at its foot such as the cruise line, a small line above the title (the operator or the ship), the facts and the lowest price with what it is for. SheenTripCard.heightFor gives the row height at the user's text size. On a deal, deal puts a badge on the photo and wasPrice strikes the usual price under the price (dealNote follows it); pass heightFor(scaler, note: true) for a row with such a card. SheenItinerary lists a tour's days or a cruise's ports on a line of numbered dots; a quiet stop, such as a day at sea, has a hollow dot.

SheenTripCard(
  title: 'Greek Isles',
  eyebrow: 'Norwegian Viva',
  facts: '7 nights · from Piraeus',
  price: 'from AED 6,000',
  priceLabel: 'a person',
  tag: 'NCL',
  placeholderIcon: SheenIcons.ship,
  onTap: () {},
);

const SheenItinerary(stops: [
  SheenItineraryStop(marker: '1', title: 'Piraeus (Athens)', trailing: '— 17:00'),
  SheenItineraryStop(marker: '2', title: 'At sea', quiet: true),
]);

Classes

SheenCancellationLine Travel
The cancellation terms in one line: a check in the success colour with free-cancellation text, or a crossed circle with non-refundable text.
SheenCityTile Travel
A destination: a city photo with a darkened foot, the name and distance, and the visa rule with its coloured dot. Without a photo it is a plain card with the same text.
SheenDealBadge Travel
A deal's mark: a red capsule with its words, such as "−15%", for the corner of a photo or beside a price.
SheenHotelCard Travel
A hotel in a list of results: a photo pager with Save; the name and the total; a headline and the price per night; the score, a recommendation share and the board; the cancellation line.
SheenHotelCardSkeleton Travel
A SheenHotelCard while results load: a photo block, name and price bars and two text lines, shimmering (still with Reduce Motion).
SheenItinerary Travel
A tour's days or a cruise's ports, top to bottom, on a line that joins numbered dots.
SheenItineraryStop Travel
One stop of a SheenItinerary: a day of a tour or a port of a cruise.
SheenPremiumCard Travel
A card for a carousel of featured stays: a photo with Save, the name, score and headline, and the total with a nights label. 232 points wide by default; heightFor gives the row height for a text size.
SheenPriceBlock Travel
A price with the total first and the price per night second. All strings arrive formatted, in the user's currency.
SheenPricePin Travel
A price on a map drawn by Flutter: a 30-point glass capsule; selected, a 34-point prominent one. For native map markers, use renderSheenPricePin.
SheenScoreBadge Travel
A guest score on the accent colour in tabular figures, such as "9.1". Its text grows with the user's text size up to 1.3 times, so the badge stays a badge.
SheenTripCard Travel
A card for a carousel of tours or cruises: a photo with an optional tag at its foot (a cruise line, "Guaranteed"), a small line above the title (the operator or the ship), the title, the facts ("8 days · Turkey") and the price from, with what it is for ("a person"). 232 points wide by default, the size of SheenPremiumCard; heightFor gives the row height for a text size.
SheenTripIcon Travel
The glyph for a trip kind, for lists and buttons: a compass for tours, a ship for cruises.
SheenTripTag Travel
A small dark chip for a photo: a cruise line, "Guaranteed". Readable on any photo in both looks.
SheenWasPrice Travel
The price before a deal, struck through in the secondary colour. Show it only next to the price with the deal, and only when it is the same stay without the deal (a like-for-like saving).

Functions

renderSheenPickedPlacePin(String label, {required SheenThemeData theme, double pixelRatio = 3, double textScale = 1, double maxWidth = 220}) → Future<({Offset anchor, Uint8List png})> Travel
A place picked on a map as a marker bitmap: its name in a red capsule over a red dot with a white ring. The record's anchor is the dot's centre as a fraction of the image, for the marker's anchor.
renderSheenPlacePin({required SheenThemeData theme, String icon = SheenIcons.bedFill, double pixelRatio = 3}) → Future<Uint8List> Travel
A place marker for a native map, as PNG bytes (Google Maps and Apple Maps draw markers from bitmaps, not widgets): a 34-point circle in the accent colour with a white icon glyph, a thin rim and a soft shadow, drawn pixelRatio times the logical size. Give the marker the same ratio and anchor it at the centre.
renderSheenPricePin(String label, {required bool selected, required SheenThemeData theme, double pixelRatio = 3, double textScale = 1}) → Future<Uint8List> Travel
A SheenPricePin drawn as a PNG for a native map's marker (Google Maps draws markers from bitmaps, not widgets): the same capsule, label and sizes, with the glass approximated by its tint and rim, and a soft shadow around it. The image is pixelRatio times the logical size; give the marker the same ratio. Text grows with textScale up to 1.5, as the widget's does.

Enums

SheenScoreSize Travel
The sizes of a SheenScoreBadge.
SheenVisaKind Travel
How a destination's visa rule reads for a passport; it picks the colour of the rule's dot on a SheenCityTile.