import 'package:flutter/material.dart'; class NavigationService { static BuildContext? globalContext; static GlobalKey navigatorKey = GlobalKey(); static void registerContext(BuildContext context, {bool update = false}) { if (globalContext == null || update) { globalContext = context; } } }