attach method

void attach(
  1. void sink(
    1. String raw
    )
)

Hands the buffered skin messages to the opening game, in order.

Implementation

void attach(void Function(String raw) sink) {
  onSkinMessage = sink;
  final replay = _pending.toList();
  _pending.clear();
  for (final raw in replay) {
    try {
      sink(raw);
    } catch (_) {}
  }
}