processPushMessage method

  1. @override
Future<List<Map<String, dynamic>>> processPushMessage(
  1. String topic,
  2. Uint8List encryptedBytes
)
override

Decrypt an FCM/APNs push payload for an existing conversation (looked up by topic). Returns a list of decoded messages — usually 1, occasionally more if the envelope contained multiple. Each entry mirrors getMessagesAfterDate shape.

Implementation

@override
Future<List<Map<String, dynamic>>> processPushMessage(String topic, Uint8List encryptedBytes) async {
  final List<dynamic> result = await methodChannel.invokeMethod('processPushMessage', {
    'topic': topic,
    'encryptedBytes': encryptedBytes,
  });
  return result.map((e) => Map<String, dynamic>.from(e as Map)).toList();
}