takeLocalSnapshot method

Future<int?> takeLocalSnapshot(
  1. String filePath,
  2. TakeSnapshotResultObserver observer
)

Implementation

Future<int?> takeLocalSnapshot(
  String filePath,
  TakeSnapshotResultObserver observer,
) async {
  await byteRTCHelper.addSnapshotEventHandler(observer);
  if (Platform.isAndroid) {
    return await ($instance as BasicHelper).invoke<int>(
      method: 'takeLocalSnapshot',
      args: [filePath],
    );
  } else if (Platform.isIOS) {
    return await ($instance as BasicHelper).invoke<int>(
      method: 'takeLocalSnapshot:filePath:',
      args: [filePath],
    );
  } else {
    throw UnsupportedError('Unsupported platform');
  }
}