mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-08-13 22:50:20 +02:00
v1.5.6: UI improvements, logger migration, and bug fixes
- Fix update checker for versions with suffix (hotfix/beta/rc) - Add collapsing header to Search tab for consistent UI - Redesign Settings with Android-style grouped cards - Increase app bar title size (28px) and height (130px) - Replace all print() with structured logging (logger package) - Fix lint warnings (curly braces, unnecessary underscores)
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
import 'package:logger/logger.dart';
|
||||
|
||||
/// Global logger instance for the app
|
||||
/// Uses pretty printer in debug mode for readable output
|
||||
final log = Logger(
|
||||
printer: PrettyPrinter(
|
||||
methodCount: 0,
|
||||
errorMethodCount: 5,
|
||||
lineLength: 80,
|
||||
colors: true,
|
||||
printEmojis: true,
|
||||
dateTimeFormat: DateTimeFormat.none,
|
||||
),
|
||||
level: Level.debug,
|
||||
);
|
||||
|
||||
/// Logger with class/tag prefix for better traceability
|
||||
class AppLogger {
|
||||
final String _tag;
|
||||
|
||||
AppLogger(this._tag);
|
||||
|
||||
void d(String message) => log.d('[$_tag] $message');
|
||||
void i(String message) => log.i('[$_tag] $message');
|
||||
void w(String message) => log.w('[$_tag] $message');
|
||||
void e(String message, [Object? error, StackTrace? stackTrace]) =>
|
||||
log.e('[$_tag] $message', error: error, stackTrace: stackTrace);
|
||||
}
|
||||
Reference in New Issue
Block a user