CKAPIManager class

The manager for making calls to the CloudKit API.

Constructors

CKAPIManager()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

authenticateUser(BuildContext? context) Future<CKAuthState>
Open the "Sign-In to iCloud" webpage, if the stored ckAuthURL exists.
callAPI(CKDatabase database, String operationPath, CKOperationProtocol operationProtocol, {Map<String, dynamic>? operationBody, BuildContext? context}) Future<CKOperationCallback>
Call the CloudKit API directly, given the database, api operation path, protocol (GET or POST), and optionally, the JSON body and BuildContext.
fetchWebAuthToken() Future<String?>
Fetch the ckWebAuthToken from SharedPreferences into local storage.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
saveWebAuthToken([String? ckWebAuthToken]) Future<void>
Save the locally-stored ckWebAuthToken to SharedPreferences.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

initManager(String ckContainer, String ckAPIToken, CKEnvironment environment, {CKAPIManager? manager}) Future<void>
Initialize the shared API manager for the application. Optionally, a custom CKAPIManager can be passed in.
shared() CKAPIManager
Get the shared instance of the CKAPIManager.