Skip to content

Commit 5b864ff

Browse files
authored
Move some fields to constant (#2469)
1 parent b3dd7d3 commit 5b864ff

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/src/logging.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ final _logger = Logger('dartdoc');
1616
/// A custom [Level] for tracking file writes and verification.
1717
///
1818
/// Has a value of `501` – one more than [Level.FINE].
19-
final Level progressLevel = Level('PROGRESS', 501);
19+
const Level progressLevel = Level('PROGRESS', 501);
2020

2121
/// A custom [Level] for errant print statements.
2222
///
2323
/// Has a value of `1201` – one more than [Level.SHOUT].
24-
final Level printLevel = Level('PRINT', 1201);
24+
const Level printLevel = Level('PRINT', 1201);
2525

2626
void logWarning(Object message) {
2727
_logger.log(Level.WARNING, message);
@@ -82,7 +82,7 @@ void startLogging(LoggingContext config) {
8282
var writingProgress = false;
8383
var ansi = Ansi(Ansi.terminalSupportsAnsi);
8484
var spinnerIndex = 0;
85-
final spinner = ['-', r'\', '|', '/'];
85+
const spinner = ['-', r'\', '|', '/'];
8686

8787
Logger.root.onRecord.listen((record) {
8888
if (record.level == progressLevel) {

0 commit comments

Comments
 (0)