Skip to content

Commit db50f68

Browse files
committed
feat(dialogs): improve dialogs visual and make them more consistent
1 parent 844bd9e commit db50f68

File tree

2 files changed

+32
-14
lines changed

2 files changed

+32
-14
lines changed

lib/screens/library_page.dart

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -426,10 +426,18 @@ class _LibraryPageState extends State<LibraryPage> {
426426
backgroundColor: colorScheme.surface,
427427
surfaceTintColor: Colors.transparent,
428428
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(28)),
429-
icon: Icon(
430-
FluentIcons.folder_add_24_filled,
431-
color: colorScheme.primary,
432-
size: 32,
429+
icon: Container(
430+
width: 56,
431+
height: 56,
432+
decoration: BoxDecoration(
433+
color: colorScheme.primaryContainer,
434+
shape: BoxShape.circle,
435+
),
436+
child: Icon(
437+
FluentIcons.folder_add_24_filled,
438+
color: colorScheme.primary,
439+
size: 32,
440+
),
433441
),
434442
title: Text(
435443
context.l10n!.createFolder,

lib/utilities/playlist_dialogs.dart

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,18 @@ void showCreatePlaylistDialog(
6767
shape: RoundedRectangleBorder(
6868
borderRadius: BorderRadius.circular(28),
6969
),
70-
icon: Icon(
71-
FluentIcons.add_24_filled,
72-
color: colorScheme.primary,
73-
size: 32,
70+
icon: Container(
71+
width: 56,
72+
height: 56,
73+
decoration: BoxDecoration(
74+
color: colorScheme.primaryContainer,
75+
shape: BoxShape.circle,
76+
),
77+
child: Icon(
78+
FluentIcons.add_24_filled,
79+
color: colorScheme.primary,
80+
size: 32,
81+
),
7482
),
7583
title: Text(
7684
context.l10n!.addPlaylist,
@@ -273,20 +281,23 @@ void showCreatePlaylistDialog(
273281
],
274282
),
275283
),
284+
actionsAlignment: MainAxisAlignment.center,
276285
actions: <Widget>[
277-
TextButton(
286+
OutlinedButton(
278287
onPressed: () => Navigator.pop(context),
279-
child: Text(
280-
context.l10n!.cancel,
281-
style: TextStyle(color: colorScheme.onSurfaceVariant),
288+
style: OutlinedButton.styleFrom(
289+
side: BorderSide(color: colorScheme.outline),
290+
shape: RoundedRectangleBorder(
291+
borderRadius: BorderRadius.circular(12),
292+
),
282293
),
294+
child: Text(context.l10n!.cancel),
283295
),
284296
FilledButton.icon(
285297
onPressed: () async {
286298
if (isYouTubeMode && id.isNotEmpty) {
287299
final result = await addUserPlaylist(id, context);
288300
if (context.mounted) showToast(context, result);
289-
290301
if (!context.mounted) return;
291302
Navigator.pop(context);
292303
} else if (!isYouTubeMode && customPlaylistName.isNotEmpty) {
@@ -295,7 +306,6 @@ void showCreatePlaylistDialog(
295306
imageBase64 ?? imageUrl,
296307
context,
297308
);
298-
299309
if (songToAdd != null) {
300310
if (context.mounted) {
301311
final addResult = addSongInCustomPlaylist(

0 commit comments

Comments
 (0)