Config constructor

Config({
  1. bool? enabled,
  2. double? uiElementSize,
  3. Set<String>? disabledRoutes,
  4. int? maxSessionIdleTime,
  5. int? minSessionEventCount,
  6. Set<OutputType>? outputTypes,
  7. HeatMapStyle? heatMapStyle,
  8. double? heatMapTransparency,
  9. double? heatMapPixelRatio,
})

Initializes the configuration.

Implementation

Config({
  bool? enabled,
  double? uiElementSize,
  Set<String>? disabledRoutes,
  this.maxSessionIdleTime,
  int? minSessionEventCount,
  Set<OutputType>? outputTypes,
  HeatMapStyle? heatMapStyle,
  double? heatMapTransparency,
  double? heatMapPixelRatio,
})  : assert(minSessionEventCount == null || minSessionEventCount >= 1),
      assert(maxSessionIdleTime == null || maxSessionIdleTime >= 1),
      assert(heatMapTransparency == null ||
          heatMapTransparency >= 0 && heatMapTransparency <= 255),
      enabled = enabled ?? true,
      uiElementSize = uiElementSize ?? 12,
      disabledRoutes = disabledRoutes ?? {},
      minSessionEventCount = minSessionEventCount ?? 1,
      outputTypes = outputTypes ?? {OutputType.graphicalRender},
      heatMapStyle = heatMapStyle ?? HeatMapStyle.smooth,
      heatMapTransparency =
          (heatMapTransparency ?? 0.75).clamp(0, 1).toDouble(),
      heatMapPixelRatio = heatMapPixelRatio ?? 1;