AnimatedStatCard class
Material Card with an animated value, optional icon, and label.
Combines AnimatedCounter with a styled Card layout for dashboard and statistics displays.
AnimatedStatCard(
value: 1337,
label: 'Active Users',
icon: Icons.people,
decimals: 0,
)
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- AnimatedStatCard
Constructors
- AnimatedStatCard({Key? key, required num value, required String label, IconData? icon, int decimals = 0, Duration duration = const Duration(milliseconds: 1000), Curve curve = Curves.easeOut, TextStyle? valueStyle, TextStyle? labelStyle, Color? activeColor, bool scalePulse = false, Color? cardColor, double elevation = 2, EdgeInsetsGeometry padding = const EdgeInsets.all(20), bool autoplay = true, String format(num)?})
-
Creates an animated statistics card.
const
Properties
- activeColor → Color?
-
Optional color interpolation target for the value.
final
- autoplay → bool
-
Whether the animation starts automatically.
final
- cardColor → Color?
-
Background color of the card.
final
- curve → Curve
-
Curve applied to the value interpolation.
final
- decimals → int
-
Number of decimal places to display.
final
- duration → Duration
-
Duration of the animation.
final
- elevation → double
-
Card elevation for shadow depth.
final
- format → String Function(num)?
-
Optional custom formatter for the displayed number.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- icon → IconData?
-
Optional icon displayed above the value.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- label → String
-
Label text displayed below the value.
final
- labelStyle → TextStyle?
-
Text style for the label.
final
- padding → EdgeInsetsGeometry
-
Padding around the card content.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scalePulse → bool
-
When true, triggers a scale pulse near completion.
final
- value → num
-
The target numeric value to animate toward.
final
- valueStyle → TextStyle?
-
Text style for the animated value.
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