CsActionCard class

Cloudscape's ActionCard: a whole card that is one button (or link), for choosing between a few actions or destinations ("Create bucket", "Import from a template").

CsActionCard(
  header: const Text('Launch instance'),
  description: const Text('Start a virtual server from an image.'),
  icon: const CsIcon(CsIcons.angleRight),
  onPress: () {},
)

Visual refresh: color-background-action-card-* and color-border-action-card-* per state (default, hover, active, disabled), a 1px border drawn inside the edge and a 16px radius (8px embedded). The icon sits at the end of the card. Hover colors switch at once; pressing scales the card to 0.98 with a spring.

Inheritance

Constructors

CsActionCard({Key? key, Widget? header, Widget? description, Widget? child, VoidCallback? onPress, VoidCallback? onFollow, bool isLink = false, String? ariaLabel, bool disabled = false, bool disableHeaderPaddings = false, bool disableContentPaddings = false, bool fitHeight = false, Widget? icon, CsActionCardIconVerticalAlignment iconVerticalAlignment = CsActionCardIconVerticalAlignment.top, CsActionCardVariant variant = CsActionCardVariant.defaultVariant, FocusNode? focusNode, bool autofocus = false})
const

Properties

ariaLabel → String?
Accessible name; defaults to the header text.
final
autofocus → bool
final
child → Widget?
More content under the header and description.
final
description → Widget?
Text under the header in body-s.
final
disableContentPaddings → bool
final
disabled → bool
Disabled cards keep their content readable in the disabled text color and ignore presses.
final
disableHeaderPaddings → bool
final
fitHeight → bool
Stretches to the height it is given, so cards in a row line up. Needs a bounded height.
final
focusNode → FocusNode?
final
hashCode → int
The hash code for this object.
no setterinherited
Title, in heading-s (16px bold). It names the button.
final
icon → Widget?
Shown at the end of the card, such as an arrow.
final
iconVerticalAlignment → CsActionCardIconVerticalAlignment
final
Announce the card as a link (Cloudscape href).
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onFollow → VoidCallback?
Called when a link card (isLink) is followed (Cloudscape onFollow).
final
onPress → VoidCallback?
Called when the card is pressed (Cloudscape onClick).
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
variant → CsActionCardVariant
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