imp_trading_chart library

imp_trading_chart

A high-performance trading chart engine for Flutter, inspired by TradingView Lightweight Charts.

───────────────────────────────────────────────────────── 📌 PACKAGE PHILOSOPHY ─────────────────────────────────────────────────────────

This package is designed as a chart rendering engine, not as a widget-heavy charting library.

Core principles:

  • Engine-first architecture (not widget-first)

  • CustomPainter + Canvas based rendering

  • Viewport-driven drawing (only visible data is rendered)

  • Integer-based timestamps (no DateTime math in render loop)

  • Clear separation of responsibilities:

    Data → Engine → Rendering → Widget

───────────────────────────────────────────────────────── 🔒 PUBLIC API BOUNDARY ─────────────────────────────────────────────────────────

This file defines the only supported public API surface of the package.

Consumers of this package must only import:

import 'package:imp_trading_chart/imp_trading_chart.dart';

Everything under lib/src/ is considered internal implementation detail and may change without notice.

If a class or utility is not exported here, it is:

  • ❌ Not supported for direct use
  • ❌ Not guaranteed to remain stable

This boundary allows the engine internals to evolve without breaking user code.

Classes

AxisStyle
Styling for chart grid lines and axis spacing.
Candle
Core immutable data model for OHLC candle data.
ChartStyle
CrosshairStyle
Comprehensive styling configuration for the crosshair (touch / hover / long-press tracking).
CrosshairTimeFormatter
CurrentPriceIndicatorStyle
Styling for the current / latest price indicator.
DefaultPriceFormatter
Default const-safe price formatter used by PriceLabelStyle.
DefaultTimeFormatter
Default const-safe time formatter used by TimeLabelStyle.
ImpChart
───────────────────────────────────────────────────────── 🧩 ImpChart ─────────────────────────────────────────────────────────
LineChartStyle
Styling for the main chart line (data visualization).
PriceFormatter
PriceLabelStyle
Styling configuration for price labels on the Y-axis.
RippleAnimationStyle
Styling for the ripple / pulse animation drawn on the latest data point.
TimeFormatContext
TimeFormatter
TimeLabelStyle
Styling configuration for time labels on the X-axis.
TradingColors
Centralized trading color palette for the charting engine.

Enums

LineStyle
Line style enum shared by: