getCurrentContext static method

BuildContext? getCurrentContext()

获取当前的context

用于在全局范围内访问当前的构建上下文

Implementation

static BuildContext? getCurrentContext() => navigatorKey.currentContext;