create static method
- ActivityStoreConfig config
Creates an ActivityStore, opening or creating its local store.
Parameters
config: The storage and backend settings.
Returns
- The store, or null when it could not be created, for example when the SDK is built without the activity feature.
Implementation
static ActivityStore? create(ActivityStoreConfig config) {
final String resultString = GemKitPlatform.instance.callCreateObject(
jsonEncode(<String, Object>{
'class': 'ActivityStore',
'args': config.toJson(),
}),
);
final dynamic decodedVal = jsonDecode(resultString);
if (decodedVal['gemApiError'] != 0) {
return null;
}
return ActivityStore.init(decodedVal['result']);
}