setCustomData static method
setCustomData
Attach one key value pair to existing custom data.
Params
key
The value you want to add
value
The key of the attribute
Available Platforms
Android, iOS, Web
Implementation
static Future<void> setCustomData({
required String key,
required String value,
}) async {
if (!kIsWeb && !io.Platform.isAndroid && !io.Platform.isIOS) {
debugPrint('setCustomData is not available for current operating system');
return;
}
await _channel.invokeMethod(
'setCustomData',
{
'key': key,
'value': value,
},
);
}