startIntroImage method

GemError startIntroImage({
  1. required GemMapController controller,
  2. required Path track,
  3. required String outputPath,
  4. ImageFileFormat format = ImageFileFormat.png,
  5. ActivityVideoPreviewSettings settings = const ActivityVideoPreviewSettings(),
  6. required void onComplete(
    1. GemError error
    ),
})

Renders only the opening overview of the video and writes it to outputPath as a picture.

The picture matches the first frame of the video start renders with the same settings: the whole-track overview with the track, the dots and the watermark. Only the overview related settings are used. The render needs no video encoder and reports no progress.

Parameters

  • controller: The map used for rendering. It must stay mounted and visible until the render completes.
  • track: The recorded track to render.
  • outputPath: The path of the image file to write.
  • format: The image file format, ImageFileFormat.png or ImageFileFormat.jpeg. Defaults to ImageFileFormat.png.
  • settings: The render settings; only the overview related ones are used. Defaults to the native defaults.
  • onComplete: Callback invoked once when the render finishes, unless the renderer is disposed first. The function is called with:
    • error - GemError.success when the picture was written, otherwise the failure reason.

Returns

  • GemError.success when the render started. Any other value means nothing started and onComplete is not called:

See also:

  • start - Render the fly-over video.

Implementation

GemError startIntroImage({
  required GemMapController controller,
  required Path track,
  required String outputPath,
  ImageFileFormat format = ImageFileFormat.png,
  ActivityVideoPreviewSettings settings =
      const ActivityVideoPreviewSettings(),
  required void Function(GemError error) onComplete,
}) {
  return _start(
    'startIntroImage',
    <String, dynamic>{
      ..._renderArgs(controller, track, outputPath, settings),
      'imageFormat': format.id,
    },
    onComplete,
    null,
  );
}