getLastDeliveredMessageId static method

Future<int?> getLastDeliveredMessageId({
  1. dynamic onSuccess(
    1. int lastMessageId
    )?,
})

Implementation

static Future<int?> getLastDeliveredMessageId({Function(int lastMessageId)? onSuccess}) async {
  try {
    var result = await channel.invokeMethod('getLastDeliveredMessageId', {});
    if(onSuccess != null) onSuccess(result);
    return result;
  } on PlatformException catch (e) {
    debugPrint("Error: $e");
    return null;
  } catch (e) {
    debugPrint("Error: $e");
    return null;
  }
}