Flutter Approuter
- Navigation made easy, now navigate to screens, without BuildContext from pure flutter & dart code.
Installation
- Add the latest version of package to your pubspec.yaml (and run
dart pub get
):
dependencies:
flutter_approuter:
- Import the package and use it in your Flutter App.
import 'package:flutter_approuter/flutter_approuter.dart';
- Add NavigatorKey in Material App for routing without BuiltContext
MaterialApp(
navigatorKey: navigatorKey,
...
)
Supported Devices
- Android
- IOS
- Linux
- Windows
- Macos
Features
-
x
Custom appRouter without BuiltContextx
pushx
pushOffAllx
pushNamedx
pop
-
x
Get Context on initMethod also outside of pagex
getContext
Example
AppRouter without BuildContext
- getContext()
appRouter.getContext();
- Push(Page)
appRouter.push(HomeScreen());
- Pop()
appRouter.pop();
- pushNamed(String route)
appRouter.pushNamed(route);
- pushOffAll(Widget page)
appRouter.pushOffAll(page);
Contributions
If you find a bug or want a feature, but don't know how to fix/implement it, please fill an issue.
If you fixed a bug or implemented a feature, please send a pull request.
Libraries
- flutter_approuter
- Flutter Navigation made easy, now navigate to screens, without BuildContext from pure flutter & dart code.