The full article is available at ishanga.hashnode.dev
flutter-go-router-example's Introduction
flutter-go-router-example's People
Forkers
hedravbands suryaiiit supermonkey1 bus42 wanfikrimy baluditor afsunday moosubb4 cupidchan muammerakilli andrewsearcyflutter-go-router-example's Issues
How to use it without context
Hi, Thank you for this great article, I really loved the way you handled routing and I implemented it in my app, The problem is I'm not sure how to use it without context in a notification service, I have tried this way below, there's no errors but the routing is not working.
class AppRouter {
late final AppService appService;
GoRouter get router => _goRouter;
AppRouter(this.appService);
late final GoRouter _goRouter = GoRouter(
refreshListenable: appService,
initialLocation: APPPAGE.home.toPath,
routes: <RouteBase>[
GoRoute(
and from the notification service I call it:
static void _navigateToeRoute(RemoteMessage event) async {
SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
AppService appService = AppService(sharedPreferences);
AppRouter appRouter = AppRouter(appService);
appRouter.router.goNamed(
APPPAGE.notification.toName,
pathParameters: <String, String>{'link': event.data['link']},
);
As I said there's no errors, but not routing!!
any help would be appreciated.
NavigatorObserver can't be used as a mixin because it isn't a mixin class nor a mixin
I get this error
Error: The class 'NavigatorObserver' can't be used as a mixin because it isn't a mixin class nor a mixin.
go_router.dart:17
class GoRouter extends ChangeNotifier with NavigatorObserver {
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.