setHeartbeatInterval method

Future<void> setHeartbeatInterval (
  1. {@required int heartbeatIntervalInSeconds}
)

The number of seconds(heartbeatIntervalInSeconds) between which a heartbeat request is sent to the MobileFirst server to keep the connection alive. The default interval is 7 minutes or 420 seconds. Heartbeats are sent only when the app is in the foreground.

This is a non blocking call and can be awaited

Implementation

Future<void> setHeartbeatInterval(
    {@required int heartbeatIntervalInSeconds}) async {
  return _channel.invokeMethod(WLCLIENT_SETHEARTBEAT_INTERVAL,
      <String, dynamic>{HEARTBEAT_INTERVAL: heartbeatIntervalInSeconds});
}