SheenPremiumCard class 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.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- SheenPremiumCard
Constructors
- SheenPremiumCard({Key? key, required String name, required String total, required String nightsLabel, required String saveLabel, required VoidCallback onTap, Widget? photo, String? noPhotoLabel, String? score, String? scoreLabel, String? headline, bool saved = false, VoidCallback? onSave, double width = 232, String? wasTotal, String? wasLabel, String? deal, String? dealNote})
-
A featured card for the hotel
name.const
Properties
- deal → String?
-
The deal's badge on the photo, such as "−15%".
final
- dealNote → String?
-
The deal's words after wasTotal on the line under the price, such as "Ends Sun 18 Oct"; heightFor needs
note: truewhen it is set.final - hashCode → int
-
The hash code for this object.
no setterinherited
- headline → String?
-
A line about the place.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- name → String
-
The hotel name.
final
- nightsLabel → String
-
The words after the total, such as "for 2 nights".
final
- noPhotoLabel → String?
-
The placeholder's label.
final
- onSave → VoidCallback?
-
Called by Save; null hides Save.
final
- onTap → VoidCallback
-
Called when the card is tapped.
final
- photo → Widget?
-
The photo; the placeholder when null.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- saved → bool
-
Whether the hotel is saved.
final
- saveLabel → String
-
The Save button's label for screen readers.
final
- score → String?
-
The guest score.
final
- scoreLabel → String?
-
How a screen reader says score, such as "Guest score 4.4 out of 5"; score itself when null.
final
- total → String
-
The total price, formatted.
final
- wasLabel → String?
-
How a screen reader says wasTotal, such as "was AED 1,422"; wasTotal itself when null.
final
- wasTotal → String?
-
The total before a deal, struck through at the start of the deal's line under the price; null when there is no
deal. heightFor needs
note: truewhen it is set.final - width → double
-
The card width.
final
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
heightFor(
TextScaler scaler, {bool note = false}) → double -
The height a carousel row needs for these cards at the user's text size: the 154 pt photo, the 10 pt gap and
the three text lines at their scaled line heights (the score badge keeps its 20 pt minimum); with
note, the deal's line too.