ActivityVideoPreview class Maps & 3D Scenes
Renders a fly-over preview video of a recorded track, or its opening overview as a picture.
The renderer drives the camera of the given map along the track and captures every rendered frame: a whole-track overview, the fly-over and, optionally, an orbit around the track end and a closing overview. Keep the map mounted, visible and untouched (camera, markers) until the render completes, and set the map style and perspective before starting.
A map that is removed completes the render with GemError.invalidated; a map that stops rendering for 10 seconds completes it with GemError.operationTimeout. MP4 encoding is available on Android, iOS and Windows; the intro picture needs no video encoder.
See also:
- ActivityVideoPreviewSettings - Timing, styling and camera settings of a render.
- Path.fromCoordinates - Build the track from recorded coordinates.
- Annotations
-
- @experimental
Constructors
- ActivityVideoPreview()
-
Creates a new ActivityVideoPreview instance.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasRegisteredAutoReleaseObject ↔ bool
-
getter/setter pairinherited
- isRunning → bool
-
Whether a render is in progress.
no setter
- lastErrorDetails → String
-
Platform detail about the last failed render.
no setter
- pointerId → int
-
The pointer ID of the native object
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
cancel(
) → void - Cancels the render in progress.
-
clearListeners(
) → void - Nulls all registered callback fields so the captured closures (and the objects they reference, such as widgets or controllers) become eligible for garbage collection.
-
dispose(
) → FutureOr< void> - Releases the native renderer.
-
handleEvent(
Map arguments) → void - Method called when an event is dispatched from the native side.
-
nativeClear(
) → void - Releases bridge/native-side resources tied to this listener — for example, an unregister call against a global service or a Dart-side event-handler detach.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerAutoReleaseObject(
int pointerId) → void -
Registers an object for auto release.
inherited
-
start(
{required GemMapController controller, required Path track, required String outputPath, ActivityVideoPreviewSettings settings = const ActivityVideoPreviewSettings(), required void onComplete(GemError error), void onProgress(int progress)?}) → GemError -
Starts rendering the fly-over video of
trackon the map ofcontroller. -
startIntroImage(
{required GemMapController controller, required Path track, required String outputPath, ImageFileFormat format = ImageFileFormat.png, ActivityVideoPreviewSettings settings = const ActivityVideoPreviewSettings(), required void onComplete(GemError error)}) → GemError -
Renders only the opening overview of the video and writes it to
outputPathas a picture. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited