diff --git a/lib/src/power_logger.dart b/lib/src/power_logger.dart index e6cfb8f..8b72ad3 100644 --- a/lib/src/power_logger.dart +++ b/lib/src/power_logger.dart @@ -35,9 +35,9 @@ class PowerLogger { bool debug = true, Alignment initAlignment = Alignment.center, }) { + globalContext = context; WidgetsBinding.instance!.addPostFrameCallback((_) { PowerLogger.debug = debug; - globalContext = context; if (debug) _insertToOverlay(initAlignment: initAlignment); }); }