appKey top-level property

GlobalKey to detenrminate if a MaterialApp or CupertinoApp is using the onGenerateRoute paremeter or for custom transitions using named routes we need to now the value of routes parameter

import 'package:flutter_meedu/router.dart' as router;
class MyApp extends StatelessWidget {
 @override
 Widget build(BuildContext context) {
   return MaterialApp(
     key: router.appKey,
     navigatorKey: router.navigatorKey, // add the navigator key
     home: HomePage(),
     routes: {YOUR_ROUTES},
   );
 }
}

Implementation

GlobalKey get appKey => ContextlessNavigator.i.appKey;