Skip to content

Commit da80f6b

Browse files
committed
Label downloaded-state quick action 'Downloaded'
State-style label that implies tapping toggles it off. Apple-Music 'Added/Add' pattern. Trash icon remains the destructive cue.
1 parent 0ba7e5a commit da80f6b

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

lib/ui/screens/playable_action_sheet.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ class _PlayableActionSheetState extends State<PlayableActionSheet> {
123123
},
124124
),
125125
_QuickAction(
126-
label: _downloaded ? 'Remove' : 'Download',
126+
label: _downloaded ? 'Downloaded' : 'Download',
127127
icon: _downloaded
128128
? CupertinoIcons.trash
129129
: CupertinoIcons.cloud_download,

test/ui/screens/playable_action_sheet_test.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ void main() {
6464
await _mountSheet(tester, downloaded: false);
6565

6666
expect(find.text('Download'), findsOneWidget);
67-
expect(find.text('Remove'), findsNothing);
67+
expect(find.text('Downloaded'), findsNothing);
6868
},
6969
);
7070

@@ -73,7 +73,7 @@ void main() {
7373
(tester) async {
7474
await _mountSheet(tester, downloaded: true);
7575

76-
expect(find.text('Remove'), findsOneWidget);
76+
expect(find.text('Downloaded'), findsOneWidget);
7777
expect(find.text('Download'), findsNothing);
7878
},
7979
);
@@ -101,7 +101,7 @@ void main() {
101101
.thenAnswer((_) async {});
102102

103103
await _mountSheet(tester, downloaded: true);
104-
await tester.tap(find.text('Remove'));
104+
await tester.tap(find.text('Downloaded'));
105105
await tester.pump();
106106
await tester.pump(const Duration(seconds: 3));
107107

0 commit comments

Comments
 (0)