getCoverFileName method

String getCoverFileName()

Implementation

String getCoverFileName() {
  final dir = Directory('$currentPath/assets');
  if (!dir.existsSync()) return 'cover.png';
  for (var file in dir.listSync()) {
    final name = file.path.split('/').last;
    if (name.startsWith('cover')) {
      return name;
    }
  }
  return 'cover.png';
}