flutter_approuter 3.0.5 flutter_approuter: ^3.0.5 copied to clipboard
Navigation made easy, now navigate to screens, without BuildContext from pure flutter & dart code.
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 #
- ✅
Custom appRouter without BuiltContext
- ✅ push
- ✅ pushOffAll
- ✅ pushNamed
- ✅ pop
- ✅
Get Context on initMethod also outside of page
- ✅ 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.