ImChart constructor

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

Default constructor accommodating both controller-driven and props-driven usage.

Implementation

const ImChart({
  super.key,
  this.controller,
  this.candles,
  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,
});