Centralize chart data directory name

This commit is contained in:
Brenno de Winter 2026-06-07 11:45:48 +02:00
parent 32ef54e037
commit 4849003338
2 changed files with 5 additions and 1 deletions

View file

@ -1,5 +1,9 @@
import 'dart:convert';
/// Directory (relative to the deck) where linked chart CSVs are kept, so the
/// data files stay tidily in one place separate from images/media.
const String chartDataDirName = 'data';
/// Supported chart kinds for a chart slide.
enum ChartType { bar, line, pie }

View file

@ -222,7 +222,7 @@ class FileService {
final spec = ChartSpec.parse(s.customMarkdown);
final src = spec.source;
if (src == null) return s;
final rel = addAsset(src, 'data');
final rel = addAsset(src, chartDataDirName);
if (rel == null) {
return s.copyWith(
customMarkdown: spec.copyWith(clearSource: true).toBlock(),