From 0af905d779d52fc81ffc239c211e8c5956154f34 Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Sat, 17 Feb 2024 08:41:26 -0800 Subject: [PATCH] [flutter_migrate] Implement lineTerminator in the MemoryStdout fake (#6152) https://dart-review.googlesource.com/c/sdk/+/326761/24/sdk/lib/io/stdio.dart#380 added a `lineTerminator` field to `Stdout`. See https://github.com/flutter/flutter/issues/143614 --- packages/flutter_migrate/test/src/fakes.dart | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/flutter_migrate/test/src/fakes.dart b/packages/flutter_migrate/test/src/fakes.dart index 498213a6f7b0a..fda5a28879bb1 100644 --- a/packages/flutter_migrate/test/src/fakes.dart +++ b/packages/flutter_migrate/test/src/fakes.dart @@ -132,6 +132,15 @@ class MemoryStdout extends MemoryIOSink implements io.Stdout { bool _hasTerminal = true; + @override + // ignore: override_on_non_overriding_member + String get lineTerminator => '\n'; + @override + // ignore: override_on_non_overriding_member + set lineTerminator(String value) { + throw UnimplementedError('Setting the line terminator is not supported'); + } + @override io.IOSink get nonBlocking => this;