SequencePrinter<T> class

Prints a sequence of printers.

Inheritance
Implementers
Available extensions

Constructors

SequencePrinter.new(Iterable<Printer<T>> printers)
const

Properties

defaultToStringPrinter ObjectPrinter
Override to configure the empty ObjectPrinter.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
printers Iterable<Printer<T>>
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
toStringPrinter ObjectPrinter
Override and call super to add values to the ObjectPrinter.
no setteroverride

Methods

after(Object other) Printer<T>

Available on Printer<T>, provided by the SequencePrinterPrinterExtension extension

Prints something after another printer.
around(Object first, [Object? second]) Printer<T>

Available on Printer<T>, provided by the SequencePrinterPrinterExtension extension

Prints something before and after another printer.
before(Object other) Printer<T>

Available on Printer<T>, provided by the SequencePrinterPrinterExtension extension

Prints before another printer.
call(T object) String
Prints the object.
inherited
cast<T>() Printer<T>

Available on Printer<R>, provided by the ResultOfPrinterExtension extension

Returns a printer that accepts values of type T and casts them to R for printing.
ifEmpty([String label = '\u2205']) Printer<Iterable<T>>

Available on Printer<Iterable<T>>, provided by the EmptyPrinterExtension extension

Prints label, if the iterable to be printed is empty. Uses the unicode symbol for empty set by default: https://unicode-table.com/en/2205/.
ifNull([String label = '\u2400']) Printer<T?>

Available on Printer<T>, provided by the NullPrinterExtension extension

Prints label, if the object to be printed is null. Uses the unicode symbol for null by default: https://unicode-table.com/en/2400/.
iterable({Printer<Iterable<T>>? emptyPrinter, Printer<Iterable<T>>? beforePrinter, Printer<Iterable<T>>? afterPrinter, String separator = ', ', String? lastSeparator, int? leadingItems, int? trailingItems, String? ellipses = '\u2026'}) Printer<Iterable<T>>

Available on Printer<T>, provided by the IterablePrinterExtension extension

Joins the items in an Iterable with a separator, and possibly limits the total amount of items to be printed.
mapIf(bool condition, Printer<T> callback(Printer<T> printer)) Printer<T>

Available on Printer<T>, provided by the BuilderPrinterExtension extension

Helper to modify a printer with a callback, if a condition is met.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onResultOf<T>(Map1<T, R> function) Printer<T>

Available on Printer<R>, provided by the ResultOfPrinterExtension extension

Returns a printer that accepts values of type T and invokes the provided function to transform it to type R for printing.
padBoth(int width, [String padding = ' ']) Printer<T>

Available on Printer<T>, provided by the PadPrinterExtension extension

Pads the string on the left and right if it is shorter than width.
padLeft(int width, [String padding = ' ']) Printer<T>

Available on Printer<T>, provided by the PadPrinterExtension extension

Pads the string on the left if it is shorter than width.
padRight(int width, [String padding = ' ']) Printer<T>

Available on Printer<T>, provided by the PadPrinterExtension extension

Pads the string on the right if it is shorter than width.
print(T object) String
Returns the printed object.
inherited
printOn(T object, StringBuffer buffer) → void
Prints the object into buffer.
override
separateLeft(int width, int offset, String separator) Printer<T>

Available on Printer<T>, provided by the SeparatePrinterExtension extension

Separates a string from the left side with a separator every width characters.
separateRight(int width, int offset, String separator) Printer<T>

Available on Printer<T>, provided by the SeparatePrinterExtension extension

Separates a string from the right side with a separator every width characters.
skip(int count) Printer<T>

Available on Printer<T>, provided by the TakeSkipPrinterExtension extension

Skips all but the first count characters.
skipLast(int count) Printer<T>

Available on Printer<T>, provided by the TakeSkipPrinterExtension extension

Skips all but the last count characters.
take(int count) Printer<T>

Available on Printer<T>, provided by the TakeSkipPrinterExtension extension

Takes the first count characters.
takeLast(int count) Printer<T>

Available on Printer<T>, provided by the TakeSkipPrinterExtension extension

Takes the last count characters.
toString() String
Standard Object.toString implementation. Do not override, instead implement toStringPrinter to customize.
inherited
trim() Printer<T>

Available on Printer<T>, provided by the TrimPrinterExtension extension

Removes any leading and trailing whitespace.
trimLeft() Printer<T>

Available on Printer<T>, provided by the TrimPrinterExtension extension

Removes any leading whitespace.
trimRight() Printer<T>

Available on Printer<T>, provided by the TrimPrinterExtension extension

Removes any trailing whitespace.
truncateCenter(int width, {String ellipsis = defaultEllipsis, TruncateMethod method = TruncateMethod.characters}) Printer<T>

Available on Printer<T>, provided by the TruncatePrinterExtension extension

Truncates the string from the center if it is longer than width.
truncateLeft(int width, {String ellipsis = defaultEllipsis, TruncateMethod method = TruncateMethod.characters}) Printer<T>

Available on Printer<T>, provided by the TruncatePrinterExtension extension

Truncates the string from the left side if it is longer than width.
truncateRight(int width, {String ellipsis = defaultEllipsis, TruncateMethod method = TruncateMethod.characters}) Printer<T>

Available on Printer<T>, provided by the TruncatePrinterExtension extension

Truncates the string from the right side if it is longer than width.
where(Predicate1<T> callback) Printer<T>

Available on Printer<T>, provided by the WherePrinterExtension extension

Returns a printer that only prints the receiver if the callback evaluates to true.

Operators

operator ==(Object other) bool
The equality operator.
inherited