ChartCanvas class

A thin, reusable widget that hosts any ChartRenderer in a CustomPaint, reads the theme from the environment, and traces the chart in with the shared reveal animation. Every concrete chart widget wraps this — so the animation/theming plumbing lives in exactly one place.

Inheritance

Constructors

ChartCanvas({Key? key, required ChartRenderer renderer, bool animate = true, Duration duration = const Duration(milliseconds: 1000), int replay = 0})
Creates a canvas hosting renderer, optionally tracing it in with the reveal animation (animate) over duration.
const

Properties

animate bool
Whether to play the entrance reveal animation on first build.
final
duration Duration
How long the entrance reveal animation runs.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
renderer ChartRenderer
The renderer drawn into the canvas.
final
replay int
Change this value to replay the entrance animation.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<ChartCanvas>
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