takeLocalSnapshot method
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');
}
}