Printer<T> class abstract

An abstract function that prints objects of type T.

Mixed in types
Implementers
Available Extensions
Annotations
  • @immutable

Constructors

Printer()
Generic const constructor.
const
Printer.literal([String value])
Constructs a printer that emits a literal value.
const
factory
Printer.pluggable(Map1<T, String> callback)
Constructs a printer that evaluates the callback.
const
factory
Printer.sequence(Iterable<Printer<T>> printers)
Constructs a printer that emits a list of printers.
const
factory
Printer.standard()
Constructs a printer that simply calls toString().
const
factory
Printer.switcher(Map<Predicate1<T>, Printer<T>> cases, {Printer<T> otherwise})
Constructs a printer that switches between other printers.
const
factory
Printer.wrap(Object? object)
Constructs a printer by wrapping object.
factory

Properties

defaultToStringPrinter ObjectPrinter
Override to configure the empty ObjectPrinter.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
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 setterinherited

Methods

call(T object) String
Prints the object.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
print(T object) String
Returns the printed object.
printOn(T object, StringBuffer buffer) → void
Prints the object into buffer.
toString() String
Standard toString implementation. Do not override, instead implement toStringPrinter to customize.
inherited

Operators

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