ensureInitialized method

Future<void> ensureInitialized()

Implementation

Future<void> ensureInitialized() async {
  if (_isInitialized) return;
  await Future.doWhile(() async {
    await Future.delayed(const Duration(milliseconds: 50));
    return !_isInitialized;
  });
}