GlassCard class
A padded panel of glass: an optional header row of leading, title over subtitle, and trailing, above a child.
With an onTap the whole card is a button: it presses like glass, lights up under the pointer, and takes keyboard focus. It fills the width it's given, so give it a bounded one.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- GlassCard
Constructors
- GlassCard.new({Key? key, Widget? leading, Widget? title, Widget? subtitle, Widget? trailing, Widget? child, VoidCallback? onTap, double borderRadius = 24, EdgeInsetsGeometry padding = const EdgeInsets.all(16), Color? tint, String? semanticLabel, FocusNode? focusNode, bool autofocus = false, GlassMode mode = GlassMode.auto})
-
Creates a card of glass.
const
Properties
- autofocus → bool
-
Whether it takes focus when first built.
final
- borderRadius → double
-
The corner radius.
final
- child → Widget?
-
The body, under the header.
final
- focusNode → FocusNode?
-
The control's focus node, to drive or watch its focus.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- leading → Widget?
-
Shown before the title, such as an icon at 24px.
final
- mode → GlassMode
-
How the glass reads what is behind it.
final
- onTap → VoidCallback?
-
Makes the card a button.
final
- padding → EdgeInsetsGeometry
-
The space between the card's edge and its content.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- semanticLabel → String?
-
Names the card for assistive technology, in place of its text.
final
- subtitle → Widget?
-
Shown under the title, in smaller type.
final
- tint → Color?
-
The frost's colour. Defaults to the theme's glass.
final
- title → Widget?
-
The header's main line.
final
- trailing → Widget?
-
Shown at the end of the header, such as a value or a chevron.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< GlassCard> -
Creates the mutable state for this widget at a given location in the tree.
override
-
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