CustomCard class

Card 卡片组件

Inheritance

Constructors

CustomCard({required Widget child, Key? key, Color? color, Color? shadowColor, Color? surfaceTintColor, double? elevation, ShapeBorder? shape, bool borderOnForeground = true, Clip? clipBehavior, EdgeInsetsGeometry? margin = const EdgeInsets.all(0), bool semanticContainer = true, bool? expanded, EdgeInsetsGeometry? padding, Widget? title, String? titleText, Widget? action, String? actionText})
Card 卡片组件
const

Properties

action Widget?
操作按钮组件,与 actionText 互斥
final
actionText String?
操作按钮文本,与 action 互斥
final
borderOnForeground bool
边框是否绘制在内容之上
final
child Widget
卡片主体内容
final
clipBehavior Clip?
内容裁剪方式
final
color Color?
卡片背景色
final
elevation double?
卡片阴影高度
final
expanded bool?
内容是否撑满剩余空间
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
margin EdgeInsetsGeometry?
外边距
final
padding EdgeInsetsGeometry?
内容内边距
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
semanticContainer bool
是否将卡片作为单个语义容器
final
shadowColor Color?
卡片阴影颜色
final
shape ShapeBorder?
卡片形状
final
surfaceTintColor Color?
卡片表面色调
final
title Widget?
标题组件,与 titleText 互斥
final
titleText String?
标题文本,与 title 互斥
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