AuiCard class
A versatile card widget that supports elevation, borders, images, headers, footers, and tap interactions.
AuiCard renders its child inside a Material surface with optional header, footer, and full-width top image. Wrap in an InkWell when onTap is provided.
Named constructors:
- AuiCard.outlined — zero elevation with a visible border.
- AuiCard.flat — zero elevation, no border, transparent background.
Example:
AuiCard(
header: Text('Title'),
child: Text('Body content'),
onTap: () {},
)
- Inheritance
Constructors
- AuiCard({Key? key, required Widget child, Widget? header, Widget? image, VoidCallback? onTap, EdgeInsetsGeometry padding = const EdgeInsets.all(16), double elevation = 2, Color? color, Color? borderColor, BorderRadiusGeometry? borderRadius})
-
Default card with a subtle drop shadow.
const
- AuiCard.flat({Key? key, required Widget child, Widget? header, Widget? image, VoidCallback? onTap, EdgeInsetsGeometry padding = const EdgeInsets.all(16), BorderRadiusGeometry? borderRadius})
-
A flat card with zero elevation, no border, and a transparent background.
const
- AuiCard.outlined({Key? key, required Widget child, Widget? header, Widget? image, VoidCallback? onTap, EdgeInsetsGeometry padding = const EdgeInsets.all(16), Color? color, Color? borderColor, BorderRadiusGeometry? borderRadius})
-
A card with zero elevation and a visible border.
const
Properties
- borderColor → Color?
-
Border color used when a border is desired (e.g. AuiCard.outlined).
Falls back to
Colors.grey.shade300.final - borderRadius → BorderRadiusGeometry?
-
Corner radius of the card. Falls back to AuraUITheme.cardRadius,
then
MyConstant.constant.cardRadius(default8.0).final - child → Widget
-
The main content of the card.
final
- color → Color?
-
Background color of the card. Defaults to the theme surface color.
final
- elevation → double
-
Material elevation of the card surface. Defaults to
2.final -
Optional widget rendered below child, separated by a Divider.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- header → Widget?
-
Optional widget rendered above child, separated by a Divider.
final
- image → Widget?
-
Optional full-width widget displayed at the very top of the card,
above header. Its top corners are clipped to match borderRadius.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- onTap → VoidCallback?
-
Called when the card is tapped. When non-null an InkWell is added.
final
- padding → EdgeInsetsGeometry
-
Padding applied around the header, child, and footer area.
Defaults to
EdgeInsets.all(16).final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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