OudsActionCard class
OUDS Action Container Card design guidelines
Reference design version: 1.0.0.
An action container card is a surface-like UI element that groups related information within an interactive surface and allows a user to perform a single primary action or navigate to a destination.
A null onPressed or false enabled disables the card. A loader replaces
content without changing layout and temporarily prevents activation.
Corner rounding is shared with content cards through
OudsThemeConfigModel(card: OudsCardConfig(rounded: true), child: ...).
The following parameters are available:
- child: Presentation-only content with caller-defined layout and padding.
- onPressed: The primary action; null disables the card.
- style: Style of the card among OudsCardStyle values, filled by default.
- enabled: Whether the primary action is available.
- backgroundColor: The Background controls the visibility of the predefined layer within the Card component.
- divider: Whether filled cards have a bottom divider. Ignored for other styles.
- loader: Replaces the content while an operation is in progress.
- skeleton: A placeholder displayed instead of the card while content is loading.
- semanticsLabel: A concise, localized accessible name describing the card's action.
OudsActionCard(
semanticsLabel: 'View your mobile plan',
onPressed: () {},
style: OudsCardStyle.elevated,
child: Text('200 GB plan'),
)
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- OudsActionCard
Constructors
- OudsActionCard({Key? key, required String semanticsLabel, required VoidCallback? onPressed, required Widget child, OudsCardStyle style = OudsCardStyle.filled, bool enabled = true, bool backgroundColor = true, bool divider = false, OudsCardLoader? loader, OudsSkeleton? skeleton})
-
Creates a single-action card with a localized accessible name.
const
Properties
- backgroundColor → bool
-
The Background controls the visibility of the predefined layer within the Card component.
This property is available for the Filled and Elevated styles when State = Enabled
final
- child → Widget
-
Presentation-only content with caller-defined layout and padding.
final
- divider → bool
-
Whether filled cards have a bottom divider. Ignored for other styles.
final
- enabled → bool
-
Whether the primary action is available.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- loader → OudsCardLoader?
-
Replaces the content while an operation is in progress.
final
- onPressed → VoidCallback?
-
The primary action; null disables the card.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- semanticsLabel → String
-
A concise, localized accessible name describing the card's action.
final
- skeleton → OudsSkeleton?
-
A placeholder displayed instead of the card while content is loading.
final
- style → OudsCardStyle
-
The surface treatment, filled by default.
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