mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-05-20 23:24:52 +02:00
fix: resolve analyzer warnings
- Fix empty catch block in track_provider.dart with comment - Replace deprecated withOpacity() with withValues(alpha:) in library_settings_page.dart
This commit is contained in:
@@ -556,7 +556,8 @@ class TrackNotifier extends Notifier<TrackState> {
|
||||
final tracks = List<Track>.from(state.tracks);
|
||||
tracks[index] = updatedTrack;
|
||||
state = state.copyWith(tracks: tracks);
|
||||
} catch (e) {
|
||||
} catch (_) {
|
||||
// Silently ignore update failures - track may have been removed
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -443,7 +443,7 @@ class _LibraryHeroCard extends StatelessWidget {
|
||||
boxShadow: [
|
||||
if (!isDark)
|
||||
BoxShadow(
|
||||
color: colorScheme.shadow.withOpacity(0.05),
|
||||
color: colorScheme.shadow.withValues(alpha: 0.05),
|
||||
blurRadius: 20,
|
||||
offset: const Offset(0, 4),
|
||||
),
|
||||
@@ -459,7 +459,7 @@ class _LibraryHeroCard extends StatelessWidget {
|
||||
child: Icon(
|
||||
Icons.library_music,
|
||||
size: 200,
|
||||
color: colorScheme.primary.withOpacity(0.05),
|
||||
color: colorScheme.primary.withValues(alpha: 0.05),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
@@ -470,7 +470,7 @@ class _LibraryHeroCard extends StatelessWidget {
|
||||
height: 150,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: colorScheme.secondaryContainer.withOpacity(0.3),
|
||||
color: colorScheme.secondaryContainer.withValues(alpha: 0.3),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -574,7 +574,7 @@ class _LibraryHeroCard extends StatelessWidget {
|
||||
Icon(
|
||||
Icons.history,
|
||||
size: 14,
|
||||
color: colorScheme.onSurfaceVariant.withOpacity(0.7),
|
||||
color: colorScheme.onSurfaceVariant.withValues(alpha: 0.7),
|
||||
),
|
||||
const SizedBox(width: 6),
|
||||
Text(
|
||||
@@ -583,7 +583,7 @@ class _LibraryHeroCard extends StatelessWidget {
|
||||
),
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
color: colorScheme.onSurfaceVariant.withOpacity(0.7),
|
||||
color: colorScheme.onSurfaceVariant.withValues(alpha: 0.7),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user