exportSettingsJson method
Serializes chart layout, settings, timeframe, candle style, and drawings to JSON.
Implementation
String exportSettingsJson() {
final map = <String, dynamic>{
'symbol': _symbol,
'exchange': _exchange,
'timeframe': _timeframe.name,
'candleStyle': _candleStyle.name,
'showVolume': _showVolume,
'showGrid': _showGrid,
'showCrosshair': _showCrosshair,
'showWatermark': _showWatermark,
'showCountdownTimer': _showCountdownTimer,
'showVolumeProfile': _showVolumeProfile,
'showSMC': _showSMC,
'isDarkTheme': isDarkTheme,
'drawings': _drawings.map((d) => d.toJson()).toList(),
'activeIndicators': _activeIndicators.map((i) => i.id).toList(),
'timestamp': DateTime.now().toIso8601String(),
};
return jsonEncode(map);
}