[flutter_tools] Implement NotifyingLogger.supportsColor (#113635)

This commit is contained in:
Christopher Fujino
2022-10-20 08:43:49 -07:00
committed by GitHub
parent 637e5bce66
commit e4b9796790
2 changed files with 6 additions and 1 deletions

View File

@@ -1259,7 +1259,7 @@ class NotifyingLogger extends DelegatingLogger {
void sendEvent(String name, [Map<String, Object?>? args]) { }
@override
bool get supportsColor => throw UnimplementedError();
bool get supportsColor => false;
@override
bool get hasTerminal => false;

View File

@@ -708,6 +708,11 @@ void main() {
expect(message.level, 'status');
expect(message.message, 'hello');
});
testWithoutContext('responds to .supportsColor', () async {
final NotifyingLogger logger = NotifyingLogger(verbose: false, parent: bufferLogger);
expect(logger.supportsColor, isFalse);
});
});
group('daemon queue', () {