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 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 frameNumber = -1,
}) {
  return FrameTiming._(<int>[
    vsyncStart,
    buildStart,
    buildFinish,
    rasterStart,
    rasterFinish,
    rasterFinishWallTime,
    frameNumber,
  ]);
}