TradingChart constructor

const TradingChart({
  1. Key? key,
  2. required TradingChartController controller,
  3. bool enableChartTrading = true,
  4. bool enableContextMenu = true,
  5. bool showWatermark = true,
  6. bool showCountdownTimer = true,
  7. ChartLayoutMode layoutMode = ChartLayoutMode.auto,
  8. double mobileBreakpoint = 600.0,
  9. String? brandName,
  10. GlobalKey<State<StatefulWidget>>? repaintBoundaryKey,
  11. Widget orderMenuBuilder(
    1. BuildContext context,
    2. double price,
    3. TradingChartController controller,
    4. VoidCallback closeMenu,
    )?,
  12. Widget contextMenuBuilder(
    1. BuildContext context,
    2. Offset position,
    3. double price,
    4. TradingChartController controller,
    5. VoidCallback closeMenu,
    )?,
  13. void onContextMenuAction(
    1. String action,
    2. Offset localPosition,
    3. double price
    )?,
  14. void onOrderPlaced(
    1. ChartOrder order
    )?,
  15. void onOrderModified(
    1. ChartOrder order
    )?,
  16. void onOrderCancelled(
    1. String orderId
    )?,
  17. void onPositionClosed(
    1. ChartPosition position
    )?,
})

Implementation

const TradingChart({
  super.key,
  required this.controller,
  this.enableChartTrading = true,
  this.enableContextMenu = true,
  this.showWatermark = true,
  this.showCountdownTimer = true,
  this.layoutMode = ChartLayoutMode.auto,
  this.mobileBreakpoint = 600.0,
  this.brandName,
  this.repaintBoundaryKey,
  this.orderMenuBuilder,
  this.contextMenuBuilder,
  this.onContextMenuAction,
  this.onOrderPlaced,
  this.onOrderModified,
  this.onOrderCancelled,
  this.onPositionClosed,
});