collectNativeContext method
Implementation
@override
Future<AttriaxNativeContext> collectNativeContext({
bool collectAdvertisingId = true,
}) async {
try {
final result = await _channel.invokeMethod<Object?>(
'collectNativeContext',
<String, Object?>{'collectAdvertisingId': collectAdvertisingId},
);
return AttriaxNativeContext.fromPayload(result);
} on MissingPluginException catch (error, stackTrace) {
_logException('collectNativeContext', error, stackTrace);
return const AttriaxNativeContext();
} on PlatformException catch (error, stackTrace) {
_logException('collectNativeContext', error, stackTrace);
return const AttriaxNativeContext();
}
}