enqueue static method

Future<String> enqueue(
  1. JsonMap payload, {
  2. String? type,
  3. String? idempotencyKey,
})

Enqueues a custom payload for offline-first delivery.

Implementation

static Future<String> enqueue(
  JsonMap payload, {
  String? type,
  String? idempotencyKey,
}) async {
  final result = await _methodChannel.invokeMethod('enqueue', {
    'payload': payload,
    if (type != null) 'type': type,
    if (idempotencyKey != null) 'idempotencyKey': idempotencyKey,
  });
  return result is String ? result : '';
}