isReady method

Future<void> isReady()

Promise that resolves the first time we are connected and loaded

Implementation

Future<void> isReady() async {
  await socket?.connection.firstWhere((state) => state is Connected || state is Reconnected);
}