AutoAdjustingDateTimeTickProvider.createWith constructor

AutoAdjustingDateTimeTickProvider.createWith(
  1. List<TimeRangeTickProvider> potentialTickProviders
)

Creates AutoAdjustingDateTimeTickProvider with custom tick providers.

potentialTickProviders must have at least one TimeRangeTickProvider and this list of tick providers are used in the order they are provided.

Implementation

factory AutoAdjustingDateTimeTickProvider.createWith(
    List<TimeRangeTickProvider> potentialTickProviders) {
  if (potentialTickProviders.isEmpty) {
    throw ArgumentError('At least one TimeRangeTickProvider is required');
  }

  return AutoAdjustingDateTimeTickProvider._internal(potentialTickProviders);
}