DateTimeTickFormatter.withFormatters constructor
Creates a DateTimeTickFormatter that formats ticks with formatters
.
The formatters are expected to be provided with keys in increasing order.
Implementation
factory DateTimeTickFormatter.withFormatters(
Map<int, TimeTickFormatter> formatters,
) {
// Formatters must be non empty.
if (formatters.isEmpty) {
throw ArgumentError('At least one TimeTickFormatter is required.');
}
return DateTimeTickFormatter._internal(formatters);
}