ImChart.live constructor

const ImChart.live({
  1. Key? key,
  2. required List<Candle> candles,
  3. required Stream<Tick> liveTickStream,
  4. String symbol = 'NIFTY 50',
  5. String exchange = 'NSE',
  6. String brandName = 'Im Charts',
  7. Timeframe timeframe = Timeframe.fiveMinutes,
  8. CandleStyle candleStyle = CandleStyle.candles,
  9. ChartTheme? theme,
  10. List<Indicator>? indicators,
  11. List<ChartOrder>? orders,
  12. List<ChartPosition>? positions,
  13. bool showToolbar = false,
  14. bool showHeader = true,
  15. bool showDrawingToolbar = false,
  16. bool showVolume = true,
  17. bool showVolumeProfile = false,
  18. bool showSMC = false,
  19. bool showWatermark = true,
  20. bool showCountdownTimer = true,
  21. bool enableChartTrading = true,
  22. bool enableContextMenu = true,
  23. ChartLayoutMode layoutMode = ChartLayoutMode.auto,
  24. double mobileBreakpoint = 600.0,
  25. GlobalKey<State<StatefulWidget>>? repaintBoundaryKey,
  26. void onOrderPlaced(
    1. ChartOrder order
    )?,
  27. void onOrderModified(
    1. ChartOrder order
    )?,
  28. void onOrderCancelled(
    1. String orderId
    )?,
  29. void onPositionClosed(
    1. ChartPosition position
    )?,
})

Instant zero-boilerplate constructor for real-time live streaming charts.

Implementation

const ImChart.live({
  super.key,
  required List<Candle> this.candles,
  required Stream<Tick> this.liveTickStream,
  this.symbol = 'NIFTY 50',
  this.exchange = 'NSE',
  this.brandName = 'Im Charts',
  this.timeframe = Timeframe.fiveMinutes,
  this.candleStyle = CandleStyle.candles,
  this.theme,
  this.indicators,
  this.orders,
  this.positions,
  this.showToolbar = false,
  this.showHeader = true,
  this.showDrawingToolbar = false,
  this.showVolume = true,
  this.showVolumeProfile = false,
  this.showSMC = false,
  this.showWatermark = true,
  this.showCountdownTimer = true,
  this.enableChartTrading = true,
  this.enableContextMenu = true,
  this.layoutMode = ChartLayoutMode.auto,
  this.mobileBreakpoint = 600.0,
  this.repaintBoundaryKey,
  this.onOrderPlaced,
  this.onOrderModified,
  this.onOrderCancelled,
  this.onPositionClosed,
}) : controller = null;