copyWith method

CockpitPerformanceSummary copyWith({
  1. int? frameCount,
  2. int? jankCount,
  3. double? fps,
  4. bool clearFps = false,
  5. CockpitPerformancePhaseSummary? build,
  6. CockpitPerformancePhaseSummary? raster,
  7. CockpitPerformancePhaseSummary? vsync,
  8. CockpitPerformancePhaseSummary? total,
  9. Map<String, int>? layerCacheMax,
  10. Map<String, int>? pictureCacheMax,
  11. int? newGenGcCount,
  12. int? oldGenGcCount,
})

Implementation

CockpitPerformanceSummary copyWith({
  int? frameCount,
  int? jankCount,
  double? fps,
  bool clearFps = false,
  CockpitPerformancePhaseSummary? build,
  CockpitPerformancePhaseSummary? raster,
  CockpitPerformancePhaseSummary? vsync,
  CockpitPerformancePhaseSummary? total,
  Map<String, int>? layerCacheMax,
  Map<String, int>? pictureCacheMax,
  int? newGenGcCount,
  int? oldGenGcCount,
}) {
  return CockpitPerformanceSummary(
    frameCount: frameCount ?? this.frameCount,
    jankCount: jankCount ?? this.jankCount,
    fps: clearFps ? null : (fps ?? this.fps),
    build: build ?? this.build,
    raster: raster ?? this.raster,
    vsync: vsync ?? this.vsync,
    total: total ?? this.total,
    layerCacheMax: layerCacheMax ?? this.layerCacheMax,
    pictureCacheMax: pictureCacheMax ?? this.pictureCacheMax,
    newGenGcCount: newGenGcCount ?? this.newGenGcCount,
    oldGenGcCount: oldGenGcCount ?? this.oldGenGcCount,
  );
}