refactor: reduce model and focus boilerplate
This commit is contained in:
@@ -30,7 +30,7 @@ class LogEntry {
|
||||
final Object? error;
|
||||
final StackTrace? stackTrace;
|
||||
|
||||
LogEntry({required this.timestamp, required this.level, required this.message, this.error, this.stackTrace});
|
||||
const LogEntry({required this.timestamp, required this.level, required this.message, this.error, this.stackTrace});
|
||||
|
||||
/// Estimate the memory size of this log entry in bytes
|
||||
int get estimatedSize {
|
||||
|
||||
@@ -173,6 +173,9 @@ String toBulletedString(List<String> parts) {
|
||||
return parts.join(' · ');
|
||||
}
|
||||
|
||||
String formatRating(double value) =>
|
||||
value == value.truncateToDouble() ? value.toInt().toString() : value.toStringAsFixed(1);
|
||||
|
||||
final RegExp _trailingZeroPattern = RegExp(r'\.?0+$');
|
||||
|
||||
/// Format a playback rate for display (e.g. 1.25 → "1.25x", 2.0 → "2x").
|
||||
|
||||
Reference in New Issue
Block a user