ImChart.simple constructor

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

Instant zero-boilerplate constructor for an existing list of candles.

Implementation

const ImChart.simple({
  super.key,
  required List<Candle> this.candles,
  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,
      liveTickStream = null;