[Flutter] My Journey with Navigator 2.0

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
thanks everybody for uh coming to hear about my journey with navigator2 on a saturday i appreciate the extra effort there my name's rona kilmer and i helped found a company called radio and our main product was built it's a mobile application that was built with flutter and we are now at the stage where we want to take a bunch of the functionality of that app and move it to the web and with the web comes some challenges around navigation with the url address bar and back buttons and forward buttons and so forth and when i was asking around with to the flutter community about what i should use if i should stick with the classic navigator or the new navigator it was pretty much unanimous that i should move over to the new navigator so this talk is about that journey i'm not gonna lie it it was a rough start um this is a pretty complex feature uh but i as long as you give yourself enough time to like dive in watch some good talks and really look at code um you can get a decent grasp of what's going on and so i'm gonna touch on a few things today that i learned on my journey and then i'm gonna show you where i landed uh where i feel really good about um this the structure of the navigation for my application and you can do with that information what you want um so the agenda we'll talk about why we need another navigator briefly we will touch on the new bits um like i said this is really complex and we don't have enough time to to really dive into every single piece but i think i'll give you enough information to feel comfortable looking at code and diving into some examples and playing with it yourself i'll show you some demos that i put together and then i'll leave you with some tools and resources that you can use as you decide if you decide to jump into the navigator2 world and then if there's questions i will do my best to answer them i'm not an expert though so no promises if i don't know the answer i do know people who do know the answer though so i can find it okay so why do we need another navigator and well the shorter answer is maybe you don't um there's there's absolutely no reason to shift to navigator two if you are comfortable with the current current navigator um but one thing to clear up is that we've been calling this navigator to which implies that this is an upgrade um it's not an upgrade it is another way of of using the navigator it's a um but you can still stick with classic navigator if you want it's totally up to you so the the flutter team has actually started shifting their language towards calling this router-based navigation to avoid the confusion of the 2.0 making it sound like this is an upgrade that you're gonna have to make at some point um it's totally backwards compatible you can stick with classic if you want so the classic navigator is um it's imperative which um is very different from how we do pretty much everything else with flutter it's very opinionated so things are pretty locked down we don't have the option to do many things at all you can push routes you can you can pop routes from the top of the stack but that's about it you can't take routes out from the middle of the stack you can't push routes into the middle of the stack you can't even see the stack you don't even know what's in it um and we can't easily handle operating system events so the the example of that would be um the android back button or the browser back button you can't handle those easily um now you've probably seen uh the willpop scope widget which is kind of the work around for that situation if you want to use classic and handle those back buttons um but it's not uh it's not built into the navigator so the advantages of of going to this router-based navigation is you get full visibility into the stack you manage this stack uh like states like any other state that you have in your application um and it's declarative so you are it just feels more familiar um with how you're used to doing things you can add and remove stack uh pages from the stack at will um you can inject pages wherever you want into the stack you can remove them from wherever you want in the stack no problem it's a list of pages that you're managing so if you can do it to a list you can do it to the stack you can save the navigation stack and use it to restore um the flow when somebody closes the app and then comes back um so they don't have to necessarily start over at the beginning of the application if you don't want them to um it makes managing nested navigation easier so if you've got a tabbed view for instance and you need kind of a parent navigator and then you also need a navigator to handle the tabs it makes that easier you can have totally different stacks so if you have the the most common um use case here is if you have different uh stacks for authenticated users versus unauthenticated users so maybe you've got somebody authenticated and they're moving down down this application flow and then for whatever reason their session expires you can just swap them to a new stack they're they're not authorized anymore let's drop them into this new stack easy just swap them out you can also do deep linking from notifications is a lot easier to handle again you could do that with classic navigator but there was a bunch of it was not easy it was there's some gymnastics involved so overall it's a much more powerful feature um it does this by exposing many of the building blocks um to developers so that we can build what we need let me admit benson here okay um but that also means it's complex so the more more they expose to us the more complex it is to work with all right so briefly let's touch on the new bits that we're getting we now have this um declarative navigator you can see here i've got this very simple example where we have our material app and then the home param we are setting this navigator you will notice this pages param this is literally the stack of pages that you're going to be managing the navigator converts the pages into routes and manages transitions between them this is required when you specify the navigator on pop page is a callback that is required this is where you're going to put your logic for removing pages off of the sac um it it ensures the back buttons are handled properly and i'll show you an example of that in a little bit and then we also have this transition delegate this is totally optional if you don't want to create your own transition delegate you don't have to you will get a default but this is basically used to determine whether an animation should occur when a stack change uh happens um and in which order so you might want trans you might want like the new route to appear below the old route and then the old route leaves um or vice versa so you can kind of take some control over how those transitions happen so like i mentioned this pages list is literally a list of objects of page objects and page is a new abstract class you can create your own types of pages you can extend this abstract class and create your own or you can just use material page or cupertino page um i haven't had a reason to do anything special so i've just used material page everywhere you can mix and match in the list if you want you don't have to commit so you could have a material page for your first page can we mute somebody's yeah um so the second the second page in this list could be a custom page that you've created doesn't matter as long as everything in this list is of the abstract class page each page needs a key see here um this is so that the platform knows that one page object is different from another and it can handle the transitions properly and then this is not shown here but this is one key piece when you start to make changes to your navigation stack and you're passing navigator a list of pages you cannot update the current list and send it that you actually have to send a completely new list every time and this is because the navigator is going to compare the old list to the new list that you send to determine what the changes are so you can't send an updated list you have to send a brand new list every time you make changes okay so we could stop here um if you aren't building for the web and you have a simple app then you could throw this in a stateful widget you could manage adding and removing pages with set state you could um and then what you would do is kind of pass call backs down the tree for for other widgets that you want to have the ability to update the stack but that quickly becomes um it's not scalable so what you're going to want to do if you want any other functionality is you're going to want to use the new router and the new router has comes it's a router widget that wraps comes with the router delegate a route information parser a provider and a back button dispatcher and i'm going to show you how all of these work together in this chart if you've done any if you've read up any on the new router-based navigation then you've probably seen this chart can you mute please whoever is not muted uh okay so we've got this chart which is a little mind-blowing there's a lot going on um but this this kind of shows how all of the communication happens we'll touch on each one of these things briefly and then we're going to look at code so if we start on the left we've got the operating system here and the operating system is going to need to communicate to our application that something has happened we've got an initial route app has been loaded or the user has push to back button or the user has entered a new url in the um address bar if you're on the web so this is all communication that needs to make it back into our app and the the first thing that happens with a new route or a new intent is that route information is sent to this route information provider this is an abstract class its only job is to take this route information and provide it to our parser 99 times out of 100 you don't need to do anything with this you can use the default the route information parser does exactly what it says it takes this route information and it parses it into a new data type that we get to define and sends it off to the router delegate it also does the reverse so not shown here in in this chart but if we need to tell the operating system that a route has changed so it can update and keep in sync with the um particularly with the web the address bar the url might need to change um and the history in the browser needs to change it will take the data type that we've defined and parse it into route information and send it back to the provider which will provide it back to the operating system so that's not shown here but um i'll show you in the code how literally this guy has two two jobs translate route information into our data type or take our data type and translate it into route information the delegate is kind of the main hub is kind of how i feel about it it builds the actual navigator um based on the current config from the router and it directs um route configuration chains changes to the other bit so it'll notify the app state that things need to change and it will take requests from the app state that things need to change the router configures the list of pages to be displayed by the navigator and manages the opening and closing of those uh pages flow for the back button dispatcher so this is going the operating system is going to call the back button dispatcher when a user hits the back button in the browser or the user hits the back button on the android operating system on the android phone and basically all it's doing is saying hey delegate do work your magic user wants to pop a route and then it'll go through the whole flow of rebuilding the widget rebuilding the navigator taking the page off the stack okay so none of this really made much sense to me until i started actually looking at code so i wanna show you all some examples um most of the examples i found were had the app state actually being managed inside the router delegate but that is kind of the same situation i ran into with the very basic implementation of okay you can you can manage the app state in the router delegate but then you're dealing with callbacks and set state and it's not really the paradigm i'm used to of lifting state up and using provider the provider package to expose that to any consumer um and most of the examples i found were using uh were managing the app state the state of the pages list specifically inside the router delegate and i was pretty a little bit frustrated by that um but i did find a great example by dominic roskowski he his example actually used provider so it pulled the app state out of the delegate and is providing it down and i'm going to show you a modified version of that okay here is this application this demo application that i built it's really pretty simple and actually let me go back to okay so here's my home page and um i like looking at pretty pictures of lovely vacation destinations so all of my demos have pictures of lovely vacation destinations in them uh from here we can go to italy or we can go to spain this is just an image with a gesture detector wrapped around it you tap on it and it goes to this page of italy where i just show a couple more pages of italy i have a link down here that says nope really spain is the best i want to go to spain and now we can see spain we can hit the back button up here in the browser and you can see the url is changing we went back to italy and i'm going back one more time to the home page i can also just manually type in country italy and it will take me to italy so this is the back and forth that you saw in the flow of when i'm when i'm making changes in the address bar this is the platform telling the application something's changed when i tap on a link the application's telling the operating system yo you need to update the url that the user took in action okay so this is super this is like pretty simple right we're talking about a landing page with two links on it let's show you some code okay so y'all will have access to this um github repo if you want to play with some examples of stuff that i put together um this is the what i'm calling the provider example so this is our we have our main app uh right here we're extending a stateless widget and to use the router um we are going to uh use the router constructor on the material app and basically this is going to require the two things um i mentioned earlier the router delegate and the route information parser if you want to um create your own custom back button dispatcher you could do that if you needed to some for some reason provide your own route information provider you could do that as well but these are the only two that we have to have to provide we um here's where i am defining my custom delegate so i named it demo app router delegate i'm extending the router delegate and i am going to be using this is my user-defined data type this is what the parser is going to be um parsing route information into this configuration the demo app route config and then vice versa and this demo app route config is essentially um it's just a class that's describing the different kinds of pages and it's specifically meant for determining what type of page are we looking at right now we have a home page we have the country page so the italy and the spain pages are country pages and then we have an unknown configuration we don't know what kind of page it is and then we just have some um some getters here to to quickly determine is this page a home page or is this page a country page so that's the data type that we're using you could you can make it as complicated as you want i tried to keep it simple but that's what is specified here the the router delegates extends change notifier um or mixes and change notifier as well as this top navigator router delegate nixon which is a mouthful for sure this is recommended if you're doing anything on the web um because it manages the um it makes sure that the the browser history is in sync and make sure the back button works and everything so state like i mentioned i wanted to pull it out of the router delegate it is being managed now inside this route manager this bit here where we're defining the add listener for the route manager is needed again to make sure that the listeners to the delegate are notified of a change so that the address bar and the back buttons and forward buttons work so there's kind of a little bit of magic going on here i don't entirely understand it but without this the browser will not update when a change is made the the browser url bar and back buttons won't work uh okay so now we have route manager which is where we're going to be managing all the state we are storing our navigator key here we have a getter for our list of pages remember how i said that every time you want to make a change to the list you actually have to provide a brand new list that's what's happening here our actual list is private our actual list is private and um through the getter we are providing a brand new list an unmodifiable list i am starting the list with my home page so i'm already just populating it with my first route here and then we have to have this getter for the current route data this is basically um taking a um taking a url a uri and determining which config this which of these guys we're talking about here did pop is where we're handling the removal of pages so here's my list and i'm going to remove anywhere that has the the settings the settings name matches my page and then i'm gonna notify listeners set new route path is how we're going to be adding pages to our stack and we basically are taking a configuration this is what the um remember this is what the parser is parsing for us from route information if we don't know what the configuration is configuration dot is unknown again that's here we just ran a check to see if it's unknown um we are going to provide uh we're gonna add this unknown not found page right here um if it's a country page we're gonna add a country page country landing right here if it's the home page instead of adding a page we're actually going to remove all the pages that are not the home page we already know that the home page is in our stack because it's the very first one that we put there so you can put all kinds of logic in here this is just super simple let me add add stuff to the stack um and then of course we have to notify listeners so that this new state is um is reflected in the router in the navigator okay so this is where all of that state logic lives we're going to go back to our delegate so that's what we've defined here our route manager is our state um this is going to be provided down with our change notifier provider our route manager here we have our consumer here and here remember i said the delegate is what builds the navigator we've we're returning our navigator we are there are a couple of things that are required for the delegate when you create a new delegate you have to override some things obviously you have to override the build method you also have to override you have to override a getter for the navigator key you have to do the current configuration and you have to set the new route path so this you'll see these are all the things that i defined inside the route manager so all i'm doing here is just saying okay when uh the navigator key getter is called i want to go on over to route manager and grab it when current configuration is called i'm going to go over to route manager and grab it when set new route path is called i'm going to have the route manager handle it so these are all of the requirements um for the navigator here's where we're getting the navigator key remember we have to provide that on pop page callback and here's where we're we're defining it right here we're basically checking to make sure the pop is successful and then we're going to go ahead and manage the states we're going to update the state by sending this page off to the did pop method that i defined in my route manager and then we're going to say all's good and we're returning true and then here is where we are using the getter that creates that unmodifiable list in route manager to uh we're providing that to the navigator so anytime there's a state change to the pages the router gets rebuilt the navigator gets rebuilt with the new list of pages all right that's a lot we're not done yet though we also have to define the route information parser and so i've created my own route information parser and again this got passed in all the way up here when we created our material app router we passed in our delegate and we passed in our route information parser so that's being defined down here and again this guy has two jobs has to take route information and has to return demo app route config this is our user-defined data data type that we created and this is so that the application knows what to do with new route information coming from the platform so the location is basically uh the path or the url that we're getting from the platform and i just created this util right here that's going to parse the route for us we're basically taking the url and we are checking segments you know i'm handling just the dot slash here and we know if this is the case we don't have any segments path segments it's empty we're going to go ahead and say this is the configuration for the home page if the path looks like this we're going to see okay we've got two segments if the first segment is country then we know we're talking about a country page i'm going to do a quick check to make sure this is a valid country these are the four countries that i apparently handle and then if it's valid i'm gonna go ahead and return a country configuration here and if we don't know if none of these things apply i'm gonna return a an unknown configuration now obviously i've hard coded this list of countries you would probably look at a database or something but this is just for demo purposes okay so that's what's happening here we're taking route information and we are turning it into a configuration from our to our data type the other thing the route information has to do is the reverse of that so we are taking the route data from our data type and we are turning it back into route information and that is happening here and this is so that the platform can basically tell the browser hey you need to update the url in the history here with this new path that we're sending in okay um that is it that was an awful lot of boilerplate for where's my demo for this right for a couple of clicks and some address bar updates that's a ton of code and it's kind of um it's head spinning to try to wrap around to try to get your brain to wrap around how all of these things fit together the let me get back to my slides here the flutter team is totally aware of this and how complex and overwhelming it is and one of the things they're doing is performing this um they've got this big user research project that they're doing usability research project that they're doing and one of the things included in that is this comparative analysis of these packages that are getting built and actually i'll show you the actual page here and they're looking at so tons of people are have already kind of jumped on this new uh router-based navigation system to create packages to make a bunch of this easier and what the flutter team is doing is they're analyzing all not every not every package but the packages that they deem worthy i guess they're looking at these features to see which of these features the packages support and then they're just trying to see what can they do to make things easier for the user like these packages are suggesting or to make things easier for the package for the people who are writing the packages to to make all of this functionality easier for end users who don't really want to deal with this complexity so what i did was i looked at several of these packages i looked at packages that had green check marks for all of the all of the features here and tried a few of them out and there was one that just really worked uh quite well for me and that one is um route master it supports all of the features that were listed um in the in the chart there so we've got you can deep link easily with path or query parameters in the url address bar um dynamic linking is supported uh validation so like remember what i mentioned that use case of swapping stacks out for people who are logged in or logged out um there's nested routing is supported skipping stacks is supported i'm not entire i actually don't really know what the use case is for this but um it's supported and then um you can also write your own custom pages or your own um transition animations as well so i want to show you an example of what i built with route master so let me actually stop this demo here and i'm going to build a new one so this one's in the same repo i just have a um another main file here let's see how quickly i can get this to run and while that's building i will um i'll walk you through the code it's gonna take a lot less time so we have our uh our main demo app here i am um i did have some app state i want to provide down because there's an example i want to show you of how how easy it is to handle a user who's logged in and logged out so i've got this super simple app state that i'm providing it's literally doing nothing but saying that somebody's not authorized and there's a setter i'm not even using it yet if you want to change that but for now i just wanted something that the um the router could check to see if somebody's authorized so i'm providing that app state down i've got a um i've got my material app router here and then instead of building my own delegate i do still need to provide a router delegate but i'm going to provide i'm going to use route masters delegate here and then the only thing cool this is building i'll come back to that the only thing that i need to worry about as far as route master is providing this route map it requires a route map and the route map is basically you're providing an un on unknown route where you're saying what page has to be a page again i'm using material page what page am i going to show if i don't know the route and then here's my list of routes and this just looks so familiar to me from my days of classic navigator where i was just managing a list of routes in the on generate route um method and this just felt so much more comfortable to me all of the logic for what page to show can happen right here um i've got my home page if the route is you know dot slash we're talking home page if it's slash login it's the login page if it's country and we've got this parameter country um i can put whatever logic here i want to check um i want to see is this a valid country is this country in my list of countries that i provided and if it is we're going to go ahead and build the country page and pass in my country parameter so i know which country we're talking about if it's not a valid country we're going to say that it's not found and it will then generate our not found page i created a profile path and i'm checking this is where i'm i'm checking to see if the user's logged in if app state is not authorized if the route's not authorized in my app state i'm going to redirect to the login page otherwise go ahead and send them to the profile page this is so much simpler to me um i don't know if it's if it feels that way to you all but all of that boilerplate basically from the previous example all that boilerplate just got simplified here this is pretty much all i have to worry about route masters taking care of everything else um and then you can see here the route information parser i don't have to do anything there either except pass in route master parser and and the package is taking care of that um that parsing logic so now let me show you the differences here um so again i've got my italy page i can go to spain excellent i can hit the back button i can hit the forward button i don't know if i showed that prayer um and the url is updating cool now remember i created that profile page and i've hard coded that the user's not authorized to see the profile page so i can come in here throw my url in there and it's going to redirect me to the login page because i'm not authorized so i just feel like that logic was a lot simpler so once i started implementing route master i just feel like i could breathe a little bit easier um and i haven't had to do anything super super complicated but route master does have really good um really good documentation and it was written by tom gilder i think is how you pronounce it he's really active and looking for feedback and constantly improving so i uh highly recommend it but i also just totally recommend checking out any of these other packages and seeing if something feels better to you i know v router is similar to how navigation is managed in view so if you come from a view background you might find that that's more helpful to you for me i played with a clever router i think is how they want you to say it uh route master and v router and route master just kind of worked the best for me so i hope that was helpful um i do want to leave you with some of the resources that i found the most useful to me the there's the medium article that came from the flutter team here and this is useful if you really like reading about how this stuff works i need a little bit of everything so i read this article a few times played with the code there's examples everywhere um again states managed directly in the router delegate so it i couldn't really didn't feel like i could jump off into a more complex uh situation um and then i found dominic roskowski's flutter krakow presentation where he talks about all of this stuff and a little bit more depth he had a little bit more time and then also has his the provider example and i think he's got a few others in there if i recall correctly simon lightfoot of course did a talk one of the first talks on it on air presentation here's a link to that and then chun heng tai did a presentation for devfest saudi arabia that i found really helpful and all of these guys are touching on the same stuff i just felt like hearing it a couple different ways from a couple different people was helpful for me and then this is the link to the demo that i showed you with the um the different examples there's also inside of that there's a pdf of these slides if there's anything you want to refer to there and i will drop all of this stuff in i'll drop all of this stuff on twitter if um if y'all will find that helpful i can do that and that is it is there any discussion or questions are there any questions anybody wants to ask i will do my best to answer them yes okay oh sorry go ahead jay okay uh thank you ronald for this beautiful demo uh i i just found your uh root mask away very best even i tried something with negative 2.0 basic uh your first demo but uh somehow i couldn't get it out the proper things which i wanted but your root master demo was uh very easy for me to understand but still i will try your first demo i have some questions uh uh if if i'm building my application for only android and ios part uh what what would you think that uh which negator is easy for implementation negative 2.0 or class 3 well i i would say it totally depends on it depends less on if it's just android and ios and more on what features you want to be able to use for managing your navigator um i think i don't really see a reason to especially with packages like route master i don't really see a reason to stick with classic navigator because it's it's just kind of preventing you from doing things like um well even with android it makes it more difficult to handle the android back button you have to use that will pop will pop scope if you if you um if you don't want the user to actually end up exiting the application when they hit the back button you'll have to do things like that and i think um these packages will will help with that and then they'll just give you more flexibility down the road if you decide oh i actually am going to need to nest some routers here because i've got tabs now um it'll just set you up so that those sorts of expansions are easier okay uh one more question uh i i have tried uh the first demo uh many times but every time i am ending a ending link uh hashtag for example our ui url becomes like localhost uh 3000 and uh it is slash and then home page so how can we remove the hashtag if possible oh yes it's totally possible uh and i think right here set url strategy to path url strategy and i believe this comes in and actually i should check this i think route master actually includes an option for this as well um but i just had this working separately from route master so i left it in this comes in with the flutter flutter web plugins uh package here but i'm pretty sure and let me just look at it really quickly um i think let me do oh yeah i don't see it i saw it somewhere in one of his demos i don't think it's called out here oh by the way one of the things i didn't mention is when you're actually ready like when you've got buttons and you want to push a route this is how you access the route master to do that it's just very similar to if you've used provider how you how you grab it um okay yeah i'm pretty sure that route master has its own uh way of handling this and it's just as simple but it's it's super simple to just make sure you have flutter web plugins added and then um set your url strategy to the path url strategy and that will get rid of the hash okay uh one one more thing uh there is uh okay uh like uh like in classic negative we had uh named parameters so do we have uh name parameters in this uh 2.0 uh sure so the way it's handled here in route master so this would be um [Music] these would be your named routes essentially yes yes and then what's easier is that you can now actually pass in url parameters and query parameters here um and before you had to like do some gymnastics to figure out like okay i've got a route coming in and it's does it have an id what do i do with it um and it was the way that i ended up doing that was with classic navigator was just a it was a headache um but here these are your named routes essentially and then the the colon is just denoting that hey this is a parameter and then there's some logic that i want to do around that right like we're referencing it um we're sending it in and checking to see we're taking you're basically past parameters i'm sending in the path parameter country and that knows to send in whatever's living here in this parameter send that to your is valid country check and here's where it's coming in and i'm checking it so it just makes it's very similar like that's one of the things i liked about the names parameters the named routes is that it's it's this with groutmaster felt very similar to the classic navigator and how you set it up with your route map does that help does that answer your question uh yes uh some more questions uh uh you you told uh you have a product so is it in clutter is it what sorry uh the out of uh this uh system question i want to ask you that uh for flutter web are you told that you have a product and you are i just want to ask you what kind of state management architecture you are using in uh for flutter web i am using change notifier and provider okay okay thank you yeah and that's that was why i was kind of frustrated with all the examples of the um you know the router setup with the delegate managing all of the state because i'm just i'm so used to lifting state up and having access to it you know kind of wherever i need it and um that was making it tough so that provider example here shows you how to do that with route manager but again like i mean how many lines of code was this example compared to route master so um yeah yeah so i'm still but i'm still um you know with route master you're still able to use provider here so i'm using this i'm doing the same thing in my application for the web my actual production app so you could use anything you could use blocks if you wanted to i'm mostly using a block uh i'm not so much familiar with the provider but i'm planning to move to uh provide or maybe get x but uh one more thing uh for uh responsiveness in your flutter web production what are you using anything specific or maybe media very good responsiveness like making sure that it works um i am using the media query mostly and i don't i didn't do much here it kind of worked out of the box i mean this is a super simple application but obviously like i didn't make it work terribly well on smaller screens um oh and see my list view isn't oh this isn't a list view but see this will keep sorry this will keep working at smaller screens um but yeah so this demo doesn't isn't really taking responsiveness into account but my web application i'm trying to build it i came from a web development background so i actually started a long time ago with you know html javascript um css that was my background and we always did mobile the mobile first approach so i tried to build with widgets that'll work for mobile and then as the screen gets larger i might use the media query to swap out a widget or something you know change out text size something like that um i'm not too too far along yet so i don't i don't feel like i have a really good um technique yet on like the best way to manage that i'm still kind of figuring that out for for flutter that might be another good talk though maybe as i figure that out i'll do one of those yeah that's great i also had another question uh especially with the navigation if the app becomes a little bit much complex uh would you still recommend the root master or navigator 2.0 like a complex app that has like so many uh navigation from one screen to another yeah i think i mean that i think route master can handle um it's it's hard to say not knowing specifically what the complexity is um but if you find that you need to do something fancy with the provider for instance um i don't think route master exposes that to you so you might need to go back to the you know to to use the actual um apis but i mean most like i said all of those um all of those check boxes here for all of these features and these are the common features that people are looking for in navigation route master handles it so so and i mean several of these packages handle it i don't i'm preaching pre uh route master because that's what worked for me but there are other packages that might work better for you all i i recommend digging into them but um so i would say and if you come up with a scenario that isn't one of these um features then you might not want to use a package but i haven't run into anything that made me i i can't think of the scenario at least where you would need to unless you're building your own package if you're building your own package then you would obviously need to use the the underlying apis but um so far every navigator situation that i can think of needing um there are packages that handle it but also there's i mean don't sometimes people just want to have the most flexibility and and be know that they can do anything they want in the future without any dependencies on anything and if that's the case then i suggest absolutely use use the apis the new apis and and build your own system um i just think for nine out of ten projects people are going to be really happy with the with the package options and reducing the complexity and and the amount of brain power they have to put into figuring this stuff out all right that's great to know so um any any other question i actually learned a lot uh from the navigation that uh some things that i've never explored especially the root master so looks like something to explore yeah i think so i recommend it i'd love to hear what you all end up doing and and playing with in your takeaways yeah yeah and it would also be nice if you share the resources so that we can share with others who are not able to join and also ask to check them out do you want me to send that to you so you can put it in the event or do you want me to like i can just put a link in the comments on the event or something like that also tweet it out but not everybody's following me so yeah you can share it with me and also you can tweet it either yeah all right i'll do both okay okay all right cool any other questions uh no no yeah i don't know i have one question sure uh so in production app you are using the route master package right uh i the the application is not in production yet but it will be in production i have a deadline of like i've got like another 60 days and this sucker's got to go out and i'm using route master yes okay uh so uh aren't you worried like you are using a package we don't have any control on it and these days i'm seeing like most of the packages uh they are going for an upgrades and updates so if we go for a production and we are using a package there is some change and we have to refactor the code immediately means aren't you worried about that yeah so i mean that's a challenge with any package that we use for any and for anything um but what's great about open source is that we can lock down a version um if you're worried about it lock down a version i think uh in this case there's gonna be a lot of communication about breaking changes um but it i will absolutely lock the version down so it doesn't it doesn't upgrade on me without me knowing it and if if a problem comes up um then i can i can fix it myself if it doesn't get resolved quickly it's open source i can branch it i can or fork it and and fix it myself and um and and you know use point to that fix if i need to um but yeah that's that's a challenge using any package um is is keeping up with updates and and hoping they don't make breaking changes or that they communicate them but i think the underlying api is is really solid and they um the you know the flutter team pushed it to stable it is ready um and then so they're not going to be making changes any breaking changes um on purpose anyway uh especially not with uh without communicating it and then the package developers like i said one of the things um about routemaster that i really liked is that tom is really engaged and active and and um trying to to help people use the package and is really interested in feedback and stuff like that so i don't get the sense that there's gonna be some big problem and he's just gonna drop it on the floor and walk away so yeah i would suggest finding a package that works for you lock down the version and then um not worry too too much about it okay thank you thank you donna that was a nice presentation thanks you're welcome yeah can you share your twitter handle oh sure it is at rk unboxed sure thank you i mostly tweet about flutter things yeah uh thank you that was a nice one so i'll hand it over to a cut maybe to say something yeah yeah thank you thank you very much uh it was a great talk i believe some people i just realized that most people are rsvp late so i believe they didn't get an email to join but uh we'll try to communicate with them so just like you said maureen you'll share with the marine the resources and then we'll try sharing for everybody who rsvp whether they were here or not so that they get this information maybe yeah so once again we thank you we hope you you get a chance next time to go maybe to come share with us the knowledge you have and we also appreciate you very much right now it's in the evening at my time i don't know what time is it on your end so the saturday is getting we are finishing saturday today i mean not today but around right now so it's around uh let me check the time it's around 17 hours so that's around 5 pm that is yeah i'm about to go eat breakfast so y'all are waiting in the morning to get to come to us and share with us the knowledge you have sure happy to do it yeah thank you very much and thank you jay and patel for joining i mean m and j that is sorry for joining us yep thanks for the good questions from both of you yeah yes thanks
Info
Channel: Flutter Kisumu
Views: 232
Rating: undefined out of 5
Keywords:
Id: iMzDMCaZQXg
Channel Id: undefined
Length: 55min 3sec (3303 seconds)
Published: Tue Sep 28 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.