Oscilloscope class
A widget that defines a customisable Oscilloscope type display that can be used to graph out data
The dataSet arguments MUST be a List
All other arguments are optional as they have preset values
showYAxis this will display a line along the yAxisat 0 if the value is set to true (default is false) yAxisColor determines the color of the displayed yAxis (default value is Colors.white)
yAxisMin and yAxisMax although optional should be set to reflect the data that is supplied in dataSet. These values should be set to the min and max values in the supplied dataSet.
For example if the max value in the data set is 2.5 and the min is -3.25 then you should set yAxisMin = -3.25 and yAxisMax = 2.5 This allows the oscilloscope display to scale the generated graph correctly.
You can modify the background color of the oscilloscope with the backgroundColor argument and the color of the trace with traceColor
The margin argument allows space to be set around the display (this defaults to EdgeInsets.all(10.0) if not specified)
The strokeWidth argument defines how wide to make lines drawn (this defaults to 2.0 if not specified).
NB: This is not a Time Domain trace, the update frequency of the supplied dataSet determines the trace speed.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- Oscilloscope
Constructors
-
Oscilloscope({Color traceColor = Colors.white, Color backgroundColor = Colors.black, Color yAxisColor = Colors.white, @Deprecated("Use 'margin' instead") double padding = 10.0, EdgeInsetsGeometry margin = const EdgeInsets.all(10.0), double yAxisMax = 1.0, double yAxisMin = 0.0, bool showYAxis = false, double strokeWidth = 2.0, void onNewViewport()?, required List<
num> dataSet})
Properties
- backgroundColor → Color
-
final
-
dataSet
→ List<
num> -
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- margin → EdgeInsetsGeometry
-
final
- onNewViewport → (void Function()?)
-
final
- padding → double
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showYAxis → bool
-
final
- strokeWidth → double
-
final
- traceColor → Color
-
final
- yAxisColor → Color
-
final
- yAxisMax → double
-
final
- yAxisMin → double
-
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → _OscilloscopeState -
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}) → 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