insertIntoToDeviceQueue method

  1. @override
Future<int> insertIntoToDeviceQueue(
  1. String type,
  2. String txnId,
  3. String content
)
override

Please do jsonEncode(content) in your code to stay compatible with auto generated methods here.

Implementation

@override
Future<int> insertIntoToDeviceQueue(
    String type, String txnId, String content) async {
  final id = DateTime.now().millisecondsSinceEpoch;
  await _toDeviceQueueBox.put(id.toString(), {
    'type': type,
    'txn_id': txnId,
    'content': content,
  });
  return id;
}