FlutterSalesGraph class

A customizable sales bar chart widget for visualizing numeric sales data.

Inheritance

Constructors

FlutterSalesGraph({Key? key, required List<double> salesData, required List<String> labels, String? selectedRange, double maxBarHeight = 200.0, double barWidth = 24.0, List<Color> colors = const [Colors.blue, Colors.green, Colors.red, Colors.orange, Colors.purple, Colors.teal, Colors.cyan, Colors.amber, Colors.indigo, Colors.lime, Colors.deepOrange, Colors.pink], double dateLineHeight = 20.0})
Creates a FlutterSalesGraph with required sales values and labels.
const

Properties

barWidth → double
The fixed width of each individual bar.
final
colors → List<Color>
The palette used to color bars in order, cycling when needed.
final
dateLineHeight → double
The height allocated for the label line below each bar.
final
hashCode → int
The hash code for this object.
no setterinherited
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
labels → List<String>
The text labels shown below each corresponding bar.
final
maxBarHeight → double
The maximum height used to scale bars relative to the largest sales value.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
salesData → List<double>
The sales values represented by each bar in the chart.
final
selectedRange → String?
A selected range label (for example, "Last 7 Days") for external usage.
final

Methods

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