findRootOverlay method
Implementation
Future<OverlayState?> findRootOverlay() async {
OverlayState? findOverlay(BuildContext ctx) {
OverlayState? ret = Overlay.of(ctx, rootOverlay: true);
if (ret == null) {
ctx.visitChildElements((element) {
if (ret == null) {
ret = findOverlay(element);
}
});
}
return ret;
}
return findOverlay(await Debugger.instance.appContext.future);
}