static String normalizeFileName(String name) { name = name.trim().replaceAll(RegExp(r'[^\w-.]+'), '_'); return name; }