EasyNav
只是一个简单的封装,围绕着flutter的navigator、dialogs和snackbar,无需context即可完成这些操作。
别忘了添加navigator key
@override
Widget build(BuildContext context, WidgetRef ref) {
return MaterialApp(
...
navigatorKey: EasyNav.navigatorKey,
...
);
}
安装
目前只做
dependencies:
flutter:
sdk: flutter
easy_nav:
git:
url: https://github.com/abdushakoor12/easy_nav.git
ref: [commit hash like 744e73e5a0e38962eeec96760b1413170618abee] # optional