travel library
Booking widgets for travel apps, built on sheen: hotel cards, prices, map pins and scores.
Import it next to package:sheen/sheen.dart.
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).
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.
Functions
-
renderSheenPickedPlacePin(
String label, {required SheenThemeData theme, double pixelRatio = 3, double textScale = 1, double maxWidth = 220}) → Future< Travel({Offset anchor, Uint8List png})> -
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
anchoris 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< TravelUint8List> -
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
iconglyph, a thin rim and a soft shadow, drawnpixelRatiotimes 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< TravelUint8List> -
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
pixelRatiotimes the logical size; give the marker the same ratio. Text grows withtextScaleup to 1.5, as the widget's does.