OptimizedCard class
Optimized Card Widget which provides better shadow effect for the card. To look more like native card.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- OptimizedCard
- Available extensions
Constructors
- OptimizedCard({Key? key, double? width, double? height, EdgeInsetsGeometry? padding, Color? color, Color? shadowColor, Color? surfaceTintColor, double? elevation = 3, ShapeBorder? shape, bool borderOnForeground = true, Clip? clipBehavior = Clip.hardEdge, EdgeInsetsGeometry? margin, EdgeInsetsGeometry? innerCardShadowMargin, bool semanticContainer = true, Color? customShadowColor, Offset shadowOffset = const Offset(0.0, 1.0), double shadowRadius = 5.0, double spreadRadius = 1.0, BorderRadius? shadowBorderRadius, BlurStyle shadowBlurStyle = BlurStyle.normal, bool shouldShowCustomShadow = true, Widget? child, BorderRadius? borderRadius, VoidCallback? onPressed})
-
const
Properties
- borderOnForeground → bool
-
Whether to paint the shape border in front of the child.
final
- borderRadius → BorderRadius?
-
The Border Radius of the default card's rounded rectangular shape.
final
- child → Widget?
-
The widget below this widget in the tree.
final
- clipBehavior → Clip?
-
The content will be clipped (or not) according to this option.
final
- color → Color?
-
The card's background color.
final
- customShadowColor → Color?
-
The color of custom shadow that is around the card.
If null then the Colors.grey.withOpacity(.25) shadowColor is used.
final
- elevation → double?
-
The z-coordinate at which to place this card. This controls the size of
the shadow below the card.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double?
-
final
- innerCardShadowMargin → EdgeInsetsGeometry?
-
The empty space that surrounds the card shadow.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- margin → EdgeInsetsGeometry?
-
The empty space that surrounds the card.
final
- marginZero → Widget
-
Available on Widget, provided by the WidgetMarginX extension
no setter - onPressed → VoidCallback?
-
final
- padding → EdgeInsetsGeometry?
-
final
- paddingZero → Widget
-
Available on Widget, provided by the WidgetPaddingX extension
no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- semanticContainer → bool
-
Whether this widget represents a single semantic container, or if false
a collection of individual semantic nodes.
final
- shadowBlurStyle → BlurStyle
-
Determines the blur style of the shadow.
final
- shadowBorderRadius → BorderRadius?
-
Determines the border radius of the shadow.
final
- shadowColor → Color?
-
The color to paint the shadow below the card.
final
- shadowOffset → Offset
-
offset of the custom shadow.
final
- shadowRadius → double
-
Blur radius of the custom shadow.
final
- shape → ShapeBorder?
-
The shape of the card's Material.
final
- shouldShowCustomShadow → bool
-
Determines whether the custom shadow should be applied to the card or not.
final
- sliverBox → Widget
-
Available on Widget, provided by the WidgetSliverBoxX extension
no setter - spreadRadius → double
-
spread radius of the custom shadow.
final
- surfaceTintColor → Color?
-
The color used as an overlay on color to indicate elevation.
final
- width → double?
-
final
Methods
-
animate(
{Key? key, List< Effect> ? effects, AnimateCallback? onInit, AnimateCallback? onPlay, AnimateCallback? onComplete, bool? autoPlay, Duration? delay, AnimationController? controller, Adapter? adapter, double? target, double? value}) → Animate -
Available on Widget, provided by the AnimateWidgetExtensions extension
Wraps the target Widget in an Animate instance, and returns the instance for chaining calls. Ex.myWidget.animate()is equivalent toAnimate(child: myWidget). -
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< OptimizedCard> -
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
-
marginAll(
double margin) → Widget -
Available on Widget, provided by the WidgetMarginX extension
-
marginOnly(
{double left = 0.0, double top = 0.0, double right = 0.0, double bottom = 0.0}) → Widget -
Available on Widget, provided by the WidgetMarginX extension
-
marginSymmetric(
{double horizontal = 0.0, double vertical = 0.0}) → Widget -
Available on Widget, provided by the WidgetMarginX extension
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
paddingAll(
double padding) → Widget -
Available on Widget, provided by the WidgetPaddingX extension
-
paddingOnly(
{double left = 0.0, double top = 0.0, double right = 0.0, double bottom = 0.0}) → Widget -
Available on Widget, provided by the WidgetPaddingX extension
-
paddingSymmetric(
{double horizontal = 0.0, double vertical = 0.0}) → Widget -
Available on Widget, provided by the WidgetPaddingX extension
-
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