flutter_global_navigator 0.2.1

Flutter Android iOS web

A new Flutter package project.

flutter_global_navigator #

Flutter中实现无Context跳转

Get Start #

初始化配置 #

main.dart 中配置 navigatorKey 参数

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      navigatorKey: MopNavigator.navigatorKey,
    );
  }
}

使用方式 #

Navigator 调用方式一致

MopNavigator.pushName('/jumpRoute');