Skip to content

Commit bda43af

Browse files
committed
✨ Introduce explore, Heavy UI changes
1 parent 6ca8f2a commit bda43af

30 files changed

+1774
-739
lines changed

README.md

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -54,26 +54,36 @@ Here's a sneak peek at what’s done and what’s cooking:
5454
- Player bar at the bottom
5555
- Notifications
5656
- Logout and login functionality
57+
- Smooth position slider in full size player page
58+
- UI: Fix overlapping player bar with items at the end of the list
59+
- Refactor song list tile item
60+
- UI: Add small play button on album widgets
61+
- UI: Fix wave bug in player bar and handle reaching to end of music
62+
- UI: Fix touch area for play pause button
63+
- Fix lag when changing the song: It was saw only on mac
64+
- UI: Explore
5765

5866
#### 🛠️ **In Progress**
5967

60-
- Add more details to pages
61-
- Smooth image replacement after playing next or previous song
62-
- Smooth position slider in full size player page
68+
- UI: Implement search by keyword
69+
- UI: Song details
70+
- Scrobble
71+
72+
- UI: [Pend by the fastest icons search engine] Show instrument icons for different genres
6373
- UI: Playlists page
6474
- UI: Playlist songs page
65-
- UI: Fix wave bug in player bar
66-
- UI: Showing all songs in artist page
67-
- UI: Add small play button on album widgets
6875
- UI: Add play and shuffle button in album page
69-
- UI: Implement search by keyword
70-
- UI: Add favorite songs button in full size player
71-
- UI: Fix overlapping player bar with items at the end of the list
72-
- UI: Show instrument icons for different genres
76+
- UI: Add favorite song button in full size player
77+
- UI: Add duration and position to full size player
78+
- Launcher icon
79+
- Do something for connection errors
80+
- R&D for offline mode
81+
- Add more details to pages
82+
- Smooth image replacement after playing next or previous song
7383
- Enhance login page
7484
- UI/UX optimizations
85+
- Song lists lag on mac
7586
- Code refactor
76-
- Refactor song list tile item
7787

7888

7989
---
@@ -83,6 +93,7 @@ Here's a sneak peek at what’s done and what’s cooking:
8393
- Cross-platform support (iOS, Windows, macOS)
8494
- More UI/UX refinements
8595
- Advanced features like offline playback and custom themes
96+
- UI: Showing all songs in artist page
8697

8798
---
8899

android/app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
33
xmlns:tools="http://schemas.android.com/tools"
44
package="com.example.dururu" tools:ignore="Instantiatable">
5+
<uses-permission android:name="android.permission.INTERNET" />
56
<uses-permission android:name="android.permission.WAKE_LOCK" />
67
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
78
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" />
89
<application android:label="dururu"
910
android:name="${applicationName}"
11+
android:usesCleartextTraffic="true"
1012
android:icon="@mipmap/ic_launcher">
1113
<activity android:name="com.ryanheise.audioservice.AudioServiceActivity"
1214
android:exported="true" android:launchMode="singleTop"

lib/main.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import 'package:dururu/presentation/genre_list.dart';
77
import 'package:dururu/presentation/login.dart';
88
import 'package:dururu/presentation/main.dart';
99
import 'package:dururu/presentation/queue.dart';
10-
import 'package:dururu/presentation/starrted.dart';
10+
import 'package:dururu/presentation/starred.dart';
1111
import 'package:dururu/presentation/widgets/player_bar.dart';
1212
import 'package:dururu/providers/auth.dart';
1313
import 'package:flutter/material.dart';

lib/presentation/album.dart

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import 'package:dururu/presentation/widgets/artist_circle.dart';
22
import 'package:dururu/presentation/widgets/loading_indicator.dart';
3+
import 'package:dururu/presentation/widgets/song_trailing.dart';
34
import 'package:dururu/providers/audio.dart';
45
import 'package:dururu/providers/subsonic_apis.dart';
6+
import 'package:dururu/utils.dart';
57
import 'package:flutter/cupertino.dart';
68
import 'package:flutter/material.dart';
79
import 'package:flutter_riverpod/flutter_riverpod.dart';
@@ -32,7 +34,6 @@ class AlbumPage extends ConsumerWidget {
3234
data: (data) {
3335
return CustomScrollView(
3436
slivers: [
35-
// Album Cover and Info
3637
SliverAppBar(
3738
expandedHeight: 300,
3839
pinned: true,
@@ -166,12 +167,9 @@ class AlbumPage extends ConsumerWidget {
166167
),
167168
title: Text(song.title),
168169
subtitle: Text(
169-
'${song.artist ?? ''} • ${Duration(seconds: song.duration ?? 0).toString().split('.').first}',
170-
),
171-
trailing: IconButton(
172-
icon: const Icon(CupertinoIcons.ellipsis),
173-
onPressed: () {},
170+
'${song.artist ?? ''} • ${formatSongDuration(song.duration ?? 0)}',
174171
),
172+
trailing: SongTrailing(id: song.id),
175173
onTap: () {
176174
ref
177175
.read(audioProvider.notifier)
@@ -182,6 +180,11 @@ class AlbumPage extends ConsumerWidget {
182180
childCount: data.album?.song?.length ?? 0,
183181
),
184182
),
183+
const SliverToBoxAdapter(
184+
child: SizedBox(
185+
height: 120,
186+
),
187+
),
185188
],
186189
);
187190
},

lib/presentation/album_list.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,9 @@ class _AlbumListPageState extends ConsumerState<AlbumListPage> {
137137
albums: albumState.items,
138138
showLoading: albumState.isLoading,
139139
),
140+
const SliverToBoxAdapter(
141+
child: SizedBox(height: 120),
142+
),
140143
],
141144
),
142145
);

lib/presentation/artist.dart

Lines changed: 19 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import 'package:dururu/models/pagination.dart';
22
import 'package:dururu/models/subsonic.dart';
33
import 'package:dururu/presentation/widgets/album_grid.dart';
4-
import 'package:dururu/presentation/widgets/loading_indicator.dart';
4+
import 'package:dururu/presentation/widgets/song_trailing.dart';
55
import 'package:dururu/providers/audio.dart';
66
import 'package:dururu/providers/subsonic_apis.dart';
7-
import 'package:flutter/cupertino.dart';
7+
import 'package:dururu/utils.dart';
88
import 'package:flutter/material.dart';
99
import 'package:flutter_riverpod/flutter_riverpod.dart';
1010
import 'package:cached_network_image/cached_network_image.dart';
@@ -207,11 +207,13 @@ class _ArtistPageState extends ConsumerState<ArtistPage> {
207207
child: CachedNetworkImage(
208208
imageUrl: ref.watch(
209209
getCoverArtProvider(
210-
GetCoverArtRequest(id: song.coverArt)),
210+
GetCoverArtRequest(id: song.coverArt, size: 48),
211+
),
211212
),
212-
cacheKey: GetCoverArtRequest(id: song.coverArt)
213-
.hashCode
214-
.toString(),
213+
cacheKey:
214+
GetCoverArtRequest(id: song.coverArt, size: 48)
215+
.hashCode
216+
.toString(),
215217
width: 48,
216218
height: 48,
217219
fit: BoxFit.cover,
@@ -221,15 +223,9 @@ class _ArtistPageState extends ConsumerState<ArtistPage> {
221223
),
222224
title: Text(song.title),
223225
subtitle: Text(
224-
Duration(seconds: song.duration ?? 0)
225-
.toString()
226-
.split('.')
227-
.first,
228-
),
229-
trailing: IconButton(
230-
icon: const Icon(CupertinoIcons.ellipsis),
231-
onPressed: () {},
226+
formatSongDuration(song.duration ?? 0),
232227
),
228+
trailing: SongTrailing(id: song.id),
233229
onTap: () {
234230
ref
235231
.read(audioProvider.notifier)
@@ -247,64 +243,17 @@ class _ArtistPageState extends ConsumerState<ArtistPage> {
247243
showLoading: albumState.hasMore && albumState.isLoading,
248244
)
249245
else
250-
SliverList(
251-
delegate: SliverChildBuilderDelegate(
252-
(context, index) {
253-
if (index >= songState.items.length) {
254-
return songState.isLoading
255-
? const Center(
256-
child: Padding(
257-
padding: EdgeInsets.all(16),
258-
child: LoadingIndicator(),
259-
),
260-
)
261-
: null;
262-
}
263-
264-
final song = songState.items[index];
265-
return ListTile(
266-
leading: ClipRRect(
267-
borderRadius: BorderRadius.circular(4),
268-
child: CachedNetworkImage(
269-
imageUrl: ref.watch(
270-
getCoverArtProvider(
271-
GetCoverArtRequest(id: song.coverArt)),
272-
),
273-
cacheKey: GetCoverArtRequest(id: song.coverArt)
274-
.hashCode
275-
.toString(),
276-
width: 48,
277-
height: 48,
278-
fit: BoxFit.cover,
279-
placeholder: (context, url) => const Center(
280-
child: LoadingIndicator(),
281-
),
282-
errorWidget: (context, url, error) =>
283-
const Icon(Icons.album),
284-
),
285-
),
286-
title: Text(song.title),
287-
subtitle: Text(
288-
Duration(seconds: song.duration ?? 0)
289-
.toString()
290-
.split('.')
291-
.first,
292-
),
293-
trailing: IconButton(
294-
icon: const Icon(CupertinoIcons.ellipsis),
295-
onPressed: () {},
296-
),
297-
onTap: () {
298-
ref
299-
.read(audioProvider.notifier)
300-
.playQueue(songState.items, initialIndex: index);
301-
},
302-
);
303-
},
304-
childCount:
305-
songState.items.length + (songState.hasMore ? 1 : 0),
246+
const SliverToBoxAdapter(
247+
child: SizedBox(
248+
height: 200,
249+
child: Center(
250+
child: Text("Coming Soon!"),
251+
),
306252
),
307253
),
254+
const SliverToBoxAdapter(
255+
child: SizedBox(height: 120),
256+
),
308257
],
309258
),
310259
);

lib/presentation/artist_list.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,9 @@ class _ArtistListPageState extends ConsumerState<ArtistListPage> {
134134
artists: artistState.items,
135135
showLoading: artistState.isLoading,
136136
),
137+
const SliverToBoxAdapter(
138+
child: SizedBox(height: 120),
139+
),
137140
],
138141
),
139142
);

lib/presentation/drawer.dart

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import 'package:flutter/cupertino.dart';
44
import 'package:flutter/material.dart';
55
import 'package:flutter_riverpod/flutter_riverpod.dart';
66
import 'package:go_router/go_router.dart';
7+
import 'package:url_launcher/url_launcher.dart';
78

89
class AppDrawer extends ConsumerWidget {
910
const AppDrawer({super.key});
@@ -15,8 +16,8 @@ class AppDrawer extends ConsumerWidget {
1516
return Drawer(
1617
child: SafeArea(
1718
child: Column(
19+
crossAxisAlignment: CrossAxisAlignment.stretch,
1820
children: [
19-
// Drawer header with app logo/name
2021
DrawerHeader(
2122
decoration: BoxDecoration(
2223
gradient: LinearGradient(
@@ -38,12 +39,10 @@ class AppDrawer extends ConsumerWidget {
3839
),
3940
),
4041
),
41-
42-
// Server URL section
4342
Padding(
4443
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
4544
child: Column(
46-
crossAxisAlignment: CrossAxisAlignment.start,
45+
crossAxisAlignment: CrossAxisAlignment.stretch,
4746
children: [
4847
Text(
4948
'Server',
@@ -86,14 +85,21 @@ class AppDrawer extends ConsumerWidget {
8685
],
8786
),
8887
),
88+
const Divider(),
89+
MenuItemButton(
90+
onPressed: () async {
91+
await launchUrl(
92+
Uri.parse('https://github.com/julywitch/dururu'),
93+
);
94+
},
95+
child: const Text("GitHub"),
96+
),
8997
],
9098
),
9199
),
92-
93100
const Spacer(),
94-
95101
Padding(
96-
padding: const EdgeInsets.fromLTRB(16, 16, 16, 58),
102+
padding: const EdgeInsets.fromLTRB(16, 16, 16, 140),
97103
child: SizedBox(
98104
width: double.infinity,
99105
child: ElevatedButton.icon(
@@ -104,7 +110,7 @@ class AppDrawer extends ConsumerWidget {
104110
// Show confirmation dialog
105111
showDialog(
106112
context: context,
107-
builder: (context) => LogoutDialog(),
113+
builder: (context) => const LogoutDialog(),
108114
);
109115
},
110116
icon: const Icon(CupertinoIcons.square_arrow_left),
@@ -150,8 +156,7 @@ class LogoutDialog extends ConsumerWidget {
150156
GoRouter.of(context).go('/login'); // Navigate to login
151157
},
152158
style: TextButton.styleFrom(
153-
foregroundColor:
154-
Theme.of(context).colorScheme.error,
159+
foregroundColor: Theme.of(context).colorScheme.error,
155160
),
156161
child: const Text('Logout'),
157162
),

0 commit comments

Comments
 (0)