KLineController class

Inheritance

Constructors

KLineController()

Properties

bollBandwidth int
BOLL Bandwidth (P)
getter/setter pair
bollPeriod int
BOLL Calculating Period (N)
getter/setter pair
candleStyle KLineCandleStyle
getter/setter pair
chartStyle KLineChartStyle
getter/setter pair
crosshairStyle KLineCrosshairStyle
getter/setter pair
data List<KLineData>
getter/setter pair
dataVersion int
no setter
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
indicatorColors List<Color>
getter/setter pair
indicatorFormatter KLineIndicatorFormatter?
Formats indicator values such as MA, MACD, RSI, KDJ, WR, and OBV.
getter/setter pair
indicatorInfoHeight double
indicator information height
getter/setter pair
indicatorSpacing double
spacing between indicator
getter/setter pair
infoStyle KLineInfoStyle
getter/setter pair
infoWidgetBorder Border
getter/setter pair
infoWidgetBorderRadius double
getter/setter pair
infoWidgetMargin EdgeInsets
getter/setter pair
infoWidgetMaxWidth double?
set null to fix text's width
getter/setter pair
infoWidgetPadding EdgeInsets
getter/setter pair
isDebug bool
getter/setter pair
itemCount double
current display item count (candle count)
getter/setter pair
itemWidth double
current item width (candle width)
getter/setter pair
kdjPeriods List<int>
KDJ periods
getter/setter pair
klineMargin EdgeInsets
kline view margin
getter/setter pair
lastDataChange KLineDataChange?
no setter
longPressOffset LongPressOffset
getter/setter pair
macdPeriods List<int>
MACD periods
getter/setter pair
mainIndicatorInfoMargin double
getter/setter pair
maxCount double
max candle count
getter/setter pair
maxTrailingBlankItemCount double
Maximum empty candle slots that can be revealed after the latest data item.
getter/setter pair
minCount double
min candle count
getter/setter pair
minTrailingVisibleItemCount double
Minimum real data items kept visible when scrolled to the trailing blank edge.
getter/setter pair
overlays List<KLineOverlay>
getter/setter pair
overlayStyle KLineOverlayStyle
getter/setter pair
overlayVersion int
no setter
priceAxisMaxTickCount int
Maximum price ticks drawn on the main price axis.
getter/setter pair
priceAxisMinTickSpacing double
Minimum vertical spacing between adjacent price axis labels.
getter/setter pair
priceFormatter KLineNumberFormatter?
Formats price values such as open, high, low, close, rulers, and markers.
getter/setter pair
randomColor Color
getter/setter pair
rsiPeriods List<int>
RSI periods
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sarColor Color
SAR point color
getter/setter pair
sarIncrement double
SAR acceleration factor step value
getter/setter pair
sarMax double
SAR maximum acceleration factor
getter/setter pair
sarStart double
SAR acceleration factor start value
getter/setter pair
showMainIndicators List<IndicatorType>
show main indicator
getter/setter pair
showSubIndicators List<IndicatorType>
show sub indicator
getter/setter pair
showTimeAxis bool
Whether to draw the bottom time axis.
getter/setter pair
showTimeChart bool
getter/setter pair
spacing double
spacing between candle
getter/setter pair
subIndicatorHeight double
sub indicator height
getter/setter pair
subIndicatorInfoMargin double
getter/setter pair
timeAxisHeight double
Height reserved for the bottom time axis when enabled.
getter/setter pair
timeAxisMinLabelSpacing double
Minimum horizontal spacing between adjacent time axis labels.
getter/setter pair
timeFormatter KLineTimeFormatter?
Formats bottom time axis labels.
getter/setter pair
trailingBlankItemCount double
Empty candle slots shown after the latest data item when aligned to the end.
getter/setter pair
volMaPeriods List<int>
VOL MA periods
getter/setter pair
volumeFormatter KLineNumberFormatter?
Formats volume values such as candle volume and volume rulers.
getter/setter pair
volumeStyle KLineVolumeStyle
getter/setter pair
wrPeriods List<int>
WR periods
getter/setter pair

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
append(KLineData value) → void
clearData() → void
clearOverlays() → void
currentPeriods(IndicatorType type) List<int>
dispose() → void
Discards any resources used by the object.
inherited
drawDebugRect(Canvas canvas, Rect rect, Color color) → void
formatCurrentPrice(double value) String
formatIndicator(double value, IndicatorType type, {int? period}) String
formatPrice(double value) String
formatTime(DateTime time, KLineTimeLabelGranularity granularity) String
formatVolume(double value) String
itemWidthFor(double totalWidth) double
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
prependHistory(List<KLineData> values) → void
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
setData(List<KLineData> value, {bool resetView = true}) → void
setOverlays(List<KLineOverlay> value) → void
toString() String
A string representation of this object.
inherited
updateLast(KLineData value) → void

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

shared KLineController
final

Static Methods

beginIndexForScrollOffset({required double offset, required double itemExtent, required double itemCount, required int dataLength, double trailingBlankItemCount = 0, double minTrailingVisibleItemCount = 3}) double
dataIndexForLocalX({required double localX, required double beginIndex, required double itemWidth, required double spacing, required int dataLength}) int
effectiveTrailingBlankItemCountFor({required double itemCount, required double trailingBlankItemCount, required double minTrailingVisibleItemCount}) double
getItemWidth(double totalWidth, {KLineController? controller}) double
itemCenterXForDataIndex({required int dataIndex, required double beginIndex, required double itemWidth, required double spacing}) double
maxBeginIndexFor({required int dataLength, required double itemCount, double trailingBlankItemCount = 0, double minTrailingVisibleItemCount = 3}) double
zoomForScale({required double startBeginIndex, required double startItemCount, required double scale, required double startFocalDx, required double currentFocalDx, required double viewportWidth, required int dataLength, required double minItemCount, required double maxItemCount, double trailingBlankItemCount = 0, double minTrailingVisibleItemCount = 3}) KLineZoomResult