addRecord method
Implementation
Future<dynamic> addRecord({
required String id,
required String type,
required dynamic data,
}) async {
try {
final addedData = await _methodChannel.invokeMethod(
'addRecord',
{
'id': id,
'type': type,
'data': jsonEncode(data),
},
);
return jsonDecode(addedData);
} catch (err) {
throw _mapException(err as PlatformException);
}
}