MetricsController constructor

MetricsController({
  1. required List<Metric> metrics,
  2. Metric? defaultMetric,
})

Implementation

MetricsController({
  required List<Metric> metrics,
  Metric? defaultMetric,
}) : assert(metrics.isNotEmpty) {
  /// MetricsController Init

  // Default Metric
  if (defaultMetric != null) {
    _metric = defaultMetric;
  } else {
    _metric = metrics[0];
  }

  // Set from Preference Metric Value
  if (_storeMetric != null) {
    _metric = _storeMetric!;
  }
}