835592f073
Mechanical sweep across 30 files: every Material Icons.* replaced with the signed-off Lucide equivalent + a flutter_lucide import per file. Zero Material Icons.* remain in lib/; no unused imports. Judgment-call mappings: album->disc_3, library_music->library_big, playlist_play->list_video, graphic_eq->audio_lines, system_update->download, restore->archive_restore, download_done->circle_check_big. track_actions_sheet like menu row: collapsed `liked ? favorite : favorite_border` to a single LucideIcons.heart (the row's Like/Unlike text label conveys state). Icon-only LikeButton + the notification keep the filled-vs-outline shape per the design decision. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
31 lines
1.1 KiB
Dart
31 lines
1.1 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_lucide/flutter_lucide.dart';
|
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|
|
|
import '../../cache/audio_cache_manager.dart';
|
|
import '../../theme/theme_extension.dart';
|
|
|
|
/// Small download glyph shown next to a track row when the track is
|
|
/// cached locally. FutureBuilder one-shot — track rows are short-lived
|
|
/// and cache state rarely changes mid-render.
|
|
class CachedIndicator extends ConsumerWidget {
|
|
const CachedIndicator({required this.trackId, super.key});
|
|
final String trackId;
|
|
|
|
@override
|
|
Widget build(BuildContext context, WidgetRef ref) {
|
|
final mgr = ref.read(audioCacheManagerProvider);
|
|
final fs = Theme.of(context).extension<FabledSwordTheme>()!;
|
|
return FutureBuilder<bool>(
|
|
future: mgr.isCached(trackId),
|
|
builder: (ctx, snap) {
|
|
if (snap.data != true) return const SizedBox.shrink();
|
|
return Padding(
|
|
padding: const EdgeInsets.only(left: 4),
|
|
child: Icon(LucideIcons.circle_check_big, size: 14, color: fs.accent),
|
|
);
|
|
},
|
|
);
|
|
}
|
|
}
|