summaryrefslogtreecommitdiff
path: root/lib/level_selection.dart
diff options
context:
space:
mode:
Diffstat (limited to 'lib/level_selection.dart')
-rw-r--r--lib/level_selection.dart16
1 files changed, 10 insertions, 6 deletions
diff --git a/lib/level_selection.dart b/lib/level_selection.dart
index cc79911..e2cdcbe 100644
--- a/lib/level_selection.dart
+++ b/lib/level_selection.dart
@@ -81,12 +81,13 @@ class _LevelSelectionState extends State<LevelSelection> {
separatorBuilder: (BuildContext context, int index) =>
const Divider(),
itemBuilder: (context, index) {
- String thumbnailPath =
- Directory(stepmaniaCoursesFolders[index].path)
- .listSync()
- .firstWhere((file) => file.path.toLowerCase().endsWith('banner.png'),
+ String thumbnailPath = Directory(
+ stepmaniaCoursesFolders[index].path)
+ .listSync()
+ .firstWhere(
+ (file) => file.path.toLowerCase().endsWith('banner.png'),
orElse: () => File(''))
- .path;
+ .path;
return ListTile(
leading: Image.file(File(thumbnailPath)),
trailing: Icon(Icons.play_arrow),
@@ -96,7 +97,10 @@ class _LevelSelectionState extends State<LevelSelection> {
onTap: () => Navigator.push(
context,
MaterialPageRoute(
- builder: (BuildContext context) => Level())),
+ builder: (BuildContext context) => Level(
+ stepmaniaFolderPath:
+ stepmaniaCoursesFolders[index].path,
+ ))),
);
},
);