getBackgroundConnections static method

Future<Iterable<SpikeConnection>> getBackgroundConnections()

Implementation

static Future<Iterable<SpikeConnection>> getBackgroundConnections() async {
  NativeSDKBridge.init();
  final connectionIds = await NativeSDKBridge.getBackgroundConnections();
  final connections = <SpikeConnection>[];
  for (final entry in _connections.entries) {
    if (connectionIds.contains(entry.key) &&
        entry.value.callbackUrl != null) {
      connections.add(entry.value);
    }
  }

  return connections;
}