save method

Future<bool> save(
  1. String key,
  2. String value
)

Save a new entry to CloudKit using a key and value. The key need to be unique. Returns a boolean bool with true if the save was successfully.

Implementation

Future<bool> save(String key, String value) async {
  if (!Platform.isIOS) {
    return false;
  }

  if (key.length == 0 || value.length == 0) {
    return false;
  }

  bool status = await _channel.invokeMethod('SAVE_VALUE',
          {"key": key, "value": value, "containerId": _containerId}) ??
      false;

  return status;
}