File tree Expand file tree Collapse file tree 1 file changed +18
-4
lines changed
Expand file tree Collapse file tree 1 file changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -177,14 +177,28 @@ class _BookmarkCardState extends State<BookmarkCard> {
177177 // 存档按钮
178178 IconButton (
179179 onPressed: widget.onToggleArchive != null
180- ? () => widget.onToggleArchive !(widget.bookmark)
180+ ? () {
181+ widget.onToggleArchive !(widget.bookmark);
182+ ScaffoldMessenger .of (context).showSnackBar (
183+ SnackBar (
184+ content: Text (widget.bookmark.isArchived
185+ ? '已取消存档'
186+ : '已标记存档' ),
187+ duration: const Duration (seconds: 2 ),
188+ ),
189+ );
190+ }
181191 : null ,
182192 icon: Icon (
183- Icons .archive_outlined,
193+ widget.bookmark.isArchived
194+ ? Icons .unarchive_outlined
195+ : Icons .archive_outlined,
184196 size: 20 ,
185- color: Colors .grey[600 ],
197+ color: widget.bookmark.isArchived
198+ ? Theme .of (context).colorScheme.primary
199+ : Theme .of (context).colorScheme.onSurfaceVariant,
186200 ),
187- tooltip: '存档' ,
201+ tooltip: widget.bookmark.isArchived ? '取消存档' : '存档' ,
188202 padding: EdgeInsets .zero,
189203 constraints: const BoxConstraints (
190204 minWidth: 32 ,
You can’t perform that action at this time.
0 commit comments