FrameTiming constructor Null safety

FrameTiming(
  1. {required int vsyncStart,
  2. required int buildStart,
  3. required int buildFinish,
  4. required int rasterStart,
  5. required int rasterFinish,
  6. required int rasterFinishWallTime,
  7. int layerCacheCount = 0,
  8. int layerCacheBytes = 0,
  9. int pictureCacheCount = 0,
  10. int pictureCacheBytes = 0,
  11. int frameNumber = -1}
)

Construct FrameTiming with raw timestamps in microseconds.

This constructor is used for unit test only. Real FrameTimings should be retrieved from PlatformDispatcher.onReportTimings.

If the frameNumber is not provided, it defaults to -1.

Implementation

factory FrameTiming({
  required int vsyncStart,
  required int buildStart,
  required int buildFinish,
  required int rasterStart,
  required int rasterFinish,
  required int rasterFinishWallTime,
  int layerCacheCount = 0,
  int layerCacheBytes = 0,
  int pictureCacheCount = 0,
  int pictureCacheBytes = 0,
  int frameNumber = -1,
}) {
  return FrameTiming._(<int>[
    vsyncStart,
    buildStart,
    buildFinish,
    rasterStart,
    rasterFinish,
    rasterFinishWallTime,
    layerCacheCount,
    layerCacheBytes,
    pictureCacheCount,
    pictureCacheBytes,
    frameNumber,
  ]);
}