Skip to main content

Card

Card

API

Properties

PropertyTypeDefaultDescription
radiusdouble0Card's rounded corner attribute. The rounded corner controls the four corners. Currently, it is not possible to control a single corner individually.
marginEdgeInsetsGeometryControl of margins, type [EdgeInsetsGeometry], control its margins by calling the method of this class
boxShadowBoxShadowBox shadow. This property is set by the user himself. It and the default shadow control can only be chosen one or the other.
shadowColorColorColors.grey.withAlpha(160)Default box shadow color.
shadowboolnullWhether to enable box shadow.
bodyWidgetMust be setCard's main area part
footWidgetCard's tail component
hdBgColorColortransparentThe background color of Card's header component
hdPaddingEdgeInsetsGeometry8Internal clearance of Card’s head assembly
titleWidgetWidgetCard head assembly. If titleWidget is set, the default header component will be overridden. The head is controlled by the user himself.
titleStringCard's title
subtitleStringCard subtitle
titleSizedouble14title size
subtitleSizedouble12subtitle size
minHeightdouble80min height of the box
bgColorColorTheme.of(context).colorScheme.backgroundbox background color
titleColorColorTheme.of(context).cardTheme.colortitle color
subtitleColorColorTheme.of(context).hintColorsubtitle color
actionsList< Widget >The right element item of the default header component
footWidgetWidgetChoose one of footWidget and foot. footWidget takes priority.
hdSplitWidgetWidgetThe bottom split component of the head component. Choose one between this and the default split component.
hdSplitboolWhether to display split components. Not displayed by default.
hdSplitHeightdouble1Default height of split component
hdSplitMarginEdgeInsetsGeometryDefault margins for splitting components.
hdSplitColorColorColors.grey[100]Split component color

Methods

PropertyTypeDefaultDescription