diff options
author | Orangerot <purple@orangerot.dev> | 2024-12-20 22:46:19 +0100 |
---|---|---|
committer | Orangerot <purple@orangerot.dev> | 2024-12-20 22:46:19 +0100 |
commit | c979904f95c2451fed5bba5d83fe9a7244c39ae3 (patch) | |
tree | ad8417af03d030e6c6f7e34d7ad5aeb7fde36338 /lib/level_selection.dart | |
parent | 08f2adb6397557ac27cf3780aa8f8222cbc51982 (diff) |
feat: level selection layout
Diffstat (limited to 'lib/level_selection.dart')
-rw-r--r-- | lib/level_selection.dart | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/lib/level_selection.dart b/lib/level_selection.dart new file mode 100644 index 0000000..c63c8c3 --- /dev/null +++ b/lib/level_selection.dart @@ -0,0 +1,38 @@ +import 'package:flutter/material.dart'; + +class LevelSelection extends StatelessWidget { + final List<String> _musicList = [ + "https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3", + "https://www.soundhelix.com/examples/mp3/SoundHelix-Song-2.mp3", + "https://www.soundhelix.com/examples/mp3/SoundHelix-Song-3.mp3", + ]; + + final List<String> _coverArtList = [ + "https://cdn.pixabay.com/photo/2020/05/19/13/48/cartoon-5190942_960_720.jpg", + "https://cdn.pixabay.com/photo/2020/05/19/13/35/cartoon-5190860_960_720.jpg", + "https://cdn.pixabay.com/photo/2020/10/23/17/52/fox-5679446_960_720.png", + ]; + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar(title: const Text('Sense the Rhythm')), + body: ListView.separated( + itemCount: _musicList.length, + separatorBuilder: (BuildContext context, int index) => const Divider(), + itemBuilder: (context, index) { + return ListTile( + leading: Image.network(_coverArtList[index]), + trailing: Icon(Icons.play_arrow), + title: Text('Track ${index + 1}'), + subtitle: Text('3:45'), + ); + }, + ), + floatingActionButton: FloatingActionButton( + onPressed: () => {}, + child: Icon(Icons.add) + ), + ); + } +} |