toString method
A string representation of this object.
Some classes have a default textual representation,
often paired with a static parse
function (like int.parse).
These classes will provide the textual representation as
their string representation.
Other classes have no meaningful textual representation
that a program will care about.
Such classes will typically override toString
to provide
useful information when inspecting the object,
mainly for debugging or logging.
Implementation
@override
String toString() {
final $buf = StringBuffer()..writeln('TerminalReader(');
if (action != null) {
$buf
..writeln()
..write(' action: ')
..write(action)
..write(',');
}
if (deviceSwVersion != null) {
$buf
..writeln()
..write(' device_sw_version: ')
..write(deviceSwVersion)
..write(',');
}
$buf
..writeln()
..write(' device_type: ')
..write(deviceType)
..write(',');
$buf
..writeln()
..write(' id: ')
..write(id)
..write(',');
if (ipAddress != null) {
$buf
..writeln()
..write(' ip_address: ')
..write(ipAddress)
..write(',');
}
$buf
..writeln()
..write(' label: ')
..write(label)
..write(',');
$buf
..writeln()
..write(' livemode: ')
..write(livemode)
..write(',');
if (location != null) {
$buf
..writeln()
..write(' location: ')
..write(location)
..write(',');
}
$buf
..writeln()
..write(' metadata: ')
..write(metadata)
..write(',');
$buf
..writeln()
..write(' object: ')
..write(object)
..write(',');
$buf
..writeln()
..write(' serial_number: ')
..write(serialNumber)
..write(',');
if (status != null) {
$buf
..writeln()
..write(' status: ')
..write(status)
..write(',');
}
$buf.write(')');
return $buf.toString();
}