chore(logging): sanitize diagnostics and reduce noise

This commit is contained in:
zarzet
2026-08-31 01:49:49 +07:00
parent 8f17cd1682
commit a1ee346f2f
46 changed files with 173 additions and 301 deletions
+1 -4
View File
@@ -3,10 +3,7 @@ import 'package:spotiflac_android/theme/app_tokens.dart';
/// The drag handle shown at the top of every modal sheet.
///
/// Seventeen copies of this container existed across the app in two sizes
/// (40x4 tinted `onSurfaceVariant`, 32x4 tinted `outlineVariant`) with four
/// different margins. Sheets that opt into Material's own `showDragHandle`
/// get an equivalent affordance from the framework and should not add this.
/// Sheets using Material's `showDragHandle` should not add this handle.
class AppSheetHandle extends StatelessWidget {
const AppSheetHandle({super.key, this.margin});
+1 -5
View File
@@ -5,11 +5,7 @@ import 'package:spotiflac_android/utils/app_bar_layout.dart';
/// The collapsing header used by every top-level tab and every settings-style
/// sub-page.
///
/// This replaces five hand-rolled copies of the same `SliverAppBar` +
/// `LayoutBuilder` + `FlexibleSpaceBar` block. Those copies had drifted into two
/// type ramps (tab roots expanded the title to 34pt, sub-pages to 28pt); both
/// now expand to [AppTokens.headerExpandedTitleSize], which matches the
/// Material 3 large top app bar headline.
/// Expanded titles use [AppTokens.headerExpandedTitleSize].
class AppSliverHeader extends StatelessWidget {
/// Root of a navigation tab: no back button, and the title stays aligned with
/// the content margin at every collapse ratio.
-6
View File
@@ -4,12 +4,6 @@ import 'package:spotiflac_android/widgets/selection_bottom_bar.dart';
/// Shared shell for every track-collection screen: album, playlist, local
/// album, downloaded album and library folders.
///
/// Before this existed each of those screens built its own `Scaffold` +
/// `PopScope` + selection plumbing, which is why the same four screens had three
/// different selection-bar mechanisms and why the playlist screen ended up with
/// none at all. Screens now supply their header, their content slivers and the
/// bar contents; everything else is shared:
///
/// * back gesture exits selection mode instead of popping the route,
/// * the selection bar is mounted in the root overlay so it floats above the
/// shell navigation bar,
+1 -4
View File
@@ -94,10 +94,7 @@ class ErrorCard extends StatelessWidget {
}
/// Empty-state block with an optional call to action.
///
/// Screens used to render a bare icon plus a sentence, leaving the user with
/// nothing to tap. [action] is the way forward (search, pick a folder, install
/// an extension, ...).
/// [action] provides an optional recovery path.
class EmptyState extends StatelessWidget {
const EmptyState({
super.key,
-4
View File
@@ -4,10 +4,6 @@ import 'package:flutter/material.dart';
import 'package:spotiflac_android/theme/app_tokens.dart';
/// Square extension icon with a tinted fallback.
///
/// Both the store and the installed-extensions page drew this by hand with the
/// same 44dp box, radius and fallback-icon logic, differing only in whether the
/// image came from a file or the network.
class ExtensionAvatar extends StatelessWidget {
const ExtensionAvatar({
super.key,
-8
View File
@@ -472,11 +472,6 @@ enum SettingsChipLayout {
}
/// Single-select chip used across the settings pages.
///
/// Five private copies of this existed (theme mode, view mode, update channel,
/// download service, generic choice), each re-deriving the same unselected
/// fill and re-declaring radius 12. They now share one implementation, so the
/// selected/unselected treatment is identical everywhere.
class SettingsChoiceChip extends StatelessWidget {
const SettingsChoiceChip({
super.key,
@@ -604,9 +599,6 @@ class SettingsChoiceGrid extends StatelessWidget {
enum SettingsInfoTone { neutral, warning, error }
/// Inline explanatory or warning callout inside a settings page.
///
/// The `Container` + icon + text combination was inlined at a dozen call sites
/// with three different radii and four different container colours.
class SettingsInfoCard extends StatelessWidget {
const SettingsInfoCard({
super.key,
+2 -13
View File
@@ -17,12 +17,8 @@ enum TrackCardStyle {
/// The one track row in the app.
///
/// Six near-identical implementations existed before this
/// (`TrackListTile`, `AlbumTrackTile`, the queue item, the bridge item, the
/// unified library item and the folder tile), each with its own radius,
/// padding, title style and selection treatment. Screens now supply only the
/// parts that genuinely differ: [leading], [subtitle], [trailing] and an
/// optional [background] layer for download progress.
/// Screens provide [leading], [subtitle], [trailing], and an optional
/// [background] layer for download progress.
class TrackCard extends StatelessWidget {
const TrackCard({
super.key,
@@ -172,10 +168,6 @@ class TrackCard extends StatelessWidget {
/// Grid counterpart of [TrackCard]: square artwork with overlays, then the
/// title and subtitle underneath.
///
/// Replaces three copies that each re-declared the radius, the overlay stack
/// and the label typography, and used a bare `GestureDetector` (no ripple, no
/// semantics).
class TrackGridCard extends StatelessWidget {
const TrackGridCard({
super.key,
@@ -316,9 +308,6 @@ class TrackGridPlayButton extends StatelessWidget {
}
/// Square artwork placeholder shared by every track row and grid cell.
///
/// The `Container` + `surfaceContainerHighest` + `music_note` combination was
/// repeated at roughly a dozen call sites with four different radii.
class TrackCoverPlaceholder extends StatelessWidget {
const TrackCoverPlaceholder({super.key, this.size, this.borderRadius});