waitForMainIsolateState method
Implementation
Future<IsolateState?> waitForMainIsolateState() async {
final mainIsolateRef = await whenValueNonNull<IsolateRef?>(
mainIsolate,
timeout: _waitForMainIsolateStateTimeout,
);
if (mainIsolateRef == null) return null;
final state = mainIsolateState;
await state?.waitForIsolateLoad();
return state;
}