stopRecording method

Future<GemError> stopRecording()

Stops the recording session.

Stops the recorder and transitions the status to RecorderStatus.stopping. On success the status becomes RecorderStatus.stopped; if RecorderConfiguration.continuousRecording is enabled and a chunk boundary was reached the status becomes RecorderStatus.restarting.

Returns

Implementation

Future<GemError> stopRecording() async {
  final String? resultString = await GemKitPlatform.instance
      .getChannel(mapId: -1)
      .invokeMethod<String>(
        'callObjectMethod',
        jsonEncode(<String, Object>{
          'id': pointerId,
          'class': 'Recorder',
          'method': 'stopRecording',
          'args': <dynamic, dynamic>{},
        }),
      );
  return GemErrorExtension.fromCode(jsonDecode(resultString!)['result']);
}