waitForInit method
Implementation
Future<void> waitForInit({final maxWait = const Duration(seconds: 5)}) async {
final start = DateTime.now();
while (true) {
if (isInitialized) break;
if (DateTime.now().difference(start) >= maxWait) {
Fimber.e('Failed to wait DSConstants', stacktrace: StackTrace.current);
break;
}
await Future.delayed(const Duration(milliseconds: 10));
}
}