CNGlassCard class
EXPERIMENTAL: A card widget with Liquid Glass effects, breathing animation, and spotlight effect that follows touch or responds to device tilt.
This widget is currently experimental and API may change.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- CNGlassCard
- Available extensions
Constructors
- CNGlassCard({Key? key, required Widget child, EdgeInsetsGeometry padding = const EdgeInsets.all(16), double cornerRadius = 16.0, Color? tint, bool interactive = true, bool breathing = false, CNSpotlightMode spotlight = CNSpotlightMode.none, Color? spotlightColor, double spotlightIntensity = 0.3, double spotlightRadius = 0.5})
-
Creates a glass card.
const
Properties
- breathing → bool
-
Whether to enable a subtle breathing animation (glow).
final
- child → Widget
-
Child widget to display inside the card.
final
- cornerRadius → double
-
Corner radius of the card.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- interactive → bool
-
Whether the card responds to touches.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- padding → EdgeInsetsGeometry
-
Padding around the child.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- spotlight → CNSpotlightMode
-
Spotlight mode for dynamic lighting effect.
final
- spotlightColor → Color?
-
Color for the spotlight effect. Defaults to tint or white.
final
- spotlightIntensity → double
-
Intensity of the spotlight effect (0.0 - 1.0). Defaults to 0.3.
final
- spotlightRadius → double
-
Radius of the spotlight gradient (0.0 - 1.0). Defaults to 0.5.
final
- tint → Color?
-
Tint color for the glass effect.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< CNGlassCard> -
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
-
liquidGlass(
{CNGlassEffect effect = CNGlassEffect.regular, CNGlassEffectShape shape = CNGlassEffectShape.capsule, double? cornerRadius, Color? tint, bool interactive = false}) → Widget -
Available on Widget, provided by the LiquidGlassExtension extension
Applies a Liquid Glass effect to this widget. -
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