write method
Writes the string representation of object
.
Converts object
to a string using object.toString()
.
Notice that calling sink.write(null)
will will write the "null"
string.
Implementation
@override
Future<void> write(Object? obj) {
assert(_isOpen);
final bytes = encoding.encode('$obj');
return writeBytes(bytes);
}