create method
Creates a new document in the persistent data storage.
Implementation
Future<Map<String, dynamic>> create(
String index,
String collection,
Map<String, dynamic> document, {
String? id,
bool waitForRefresh = false,
}) async {
final response = await kuzzle.query(KuzzleRequest(
controller: name,
action: 'create',
index: index,
collection: collection,
uid: id,
body: document,
waitForRefresh: waitForRefresh,
));
return response.result as Map<String, dynamic>;
}