start method

GemError start({
  1. required GemMapController controller,
  2. required Path track,
  3. required String outputPath,
  4. ActivityVideoPreviewSettings settings = const ActivityVideoPreviewSettings(),
  5. required void onComplete(
    1. GemError error
    ),
  6. void onProgress(
    1. int progress
    )?,
})

Starts rendering the fly-over video of track on the map of controller.

The render runs asynchronously: onProgress reports its progress and onComplete its outcome. A failed or cancelled render leaves the partial file at outputPath in place.

Parameters

  • controller: The map used for rendering. It must stay mounted and visible until the render completes.
  • track: The recorded track to fly over.
  • outputPath: The path of the MP4 file to write.
  • settings: The render settings. Defaults to the native defaults.
  • onComplete: Callback invoked once when the render finishes, unless the renderer is disposed first. The function is called with:
  • onProgress: Optional callback invoked with the render progress, from 0 to 100.

Returns

See also:

Implementation

GemError start({
  required GemMapController controller,
  required Path track,
  required String outputPath,
  ActivityVideoPreviewSettings settings =
      const ActivityVideoPreviewSettings(),
  required void Function(GemError error) onComplete,
  void Function(int progress)? onProgress,
}) {
  return _start(
    'start',
    _renderArgs(controller, track, outputPath, settings),
    onComplete,
    onProgress,
  );
}