Hi Dane, i follow your Videos since mid June 2019. You brought so much Value to Flutter, its really unbelievable. Your Packages are stunning and deal with really important architectural questions. You have a brilliant MVVM Approach. Your Widgets and Videos are easy to understand. With every new Video from you, my App gets better structured and even cleaner and i have definitely less Boiler Plate. You taught me so much and i just wanted to say thank you dane! Keep up the good work and only the best. Cheers, Ray
@raykoster35624 жыл бұрын
But one thing you have to tell me. How the hell can i implement a validation to my FormField. i created a custom FormWidget (extends HookWidget), but where to put the key to validate? I cant even use a custom Validator logic in my Model, because the Dialog is already closed, when i get the text back.
@FilledStacks4 жыл бұрын
Hi Ray. Thank you so much for your kind words, i really appreciate them. It means a lot knowing that I've helped you produce something that's better in any way after using some of my input / opinions on the code.
@FilledStacks4 жыл бұрын
I don't use the key for validation. I either do it real time, using the onChanged function to update the value in the viewmodel. Or I check when the form is submitted allowing me to simply do it before I try to submit the form. I've never found the key useful so I've never actually used it for form submission.
@tony-mburu4 жыл бұрын
I have been waiting for this for some time now. Good stuff @FilledStacks
@FilledStacks4 жыл бұрын
Awesome! Happy that I could make it.
@isaacadariku4 жыл бұрын
I have not watch but can't imagine the next knowledge to get from @FilledStack 🙇🏽♂️
@FilledStacks4 жыл бұрын
haha, awesome. I hope it's useful.
@YTarikKalyoncu4 жыл бұрын
Big help when you use API service on your app. Dialog without context is like almost magic 😌
@FilledStacks4 жыл бұрын
Agreed. It's very useful when using it there.
@YTarikKalyoncu4 жыл бұрын
@@FilledStacks One question why responseData is a List? Why it isn't simply dynamic?
@FilledStacks4 жыл бұрын
@@YTarikKalyoncu I fixed that in the latest release.
@markdioneeb89972 жыл бұрын
Correct me if I wrong, If I want to add more custom dialog aside from "Basic" & "Form", I'll just need to modify the enums right? and add DialogType.ProductForm etc. Awesome package as always.
@FilledStacks2 жыл бұрын
Yes, you would register a new enum and a new ui for the dialog then you can call it.
@markdioneeb89972 жыл бұрын
Aside from Dialog & SnackBar, we also have bottom sheet, can dialog service accommodate that? I'm using modal_bottom_sheet package
@FilledStacks2 жыл бұрын
Yes. I actually built our bottom sheet service using modal dialog sheet package 😍 so you'll have the same functionality 🤩
@marlostrin3 жыл бұрын
Hello, how are you? that way I can trigger the dialog in the background? when does a push notification arrive when the dialog overlaps other apps?
@FilledStacks3 жыл бұрын
Hey hey, no. You can't draw over a different app unless you're a system application. You can only draw on the UI thread that belongs to you while your app is in the foreground
@theforestapp4 жыл бұрын
i believe im encountering a bug. using the registerCustomDialogBuilder isnt working, even though im calling it from the main() function after the setupLocator - i had to switch back to the old, deprecated method to get it to work. E/flutter (16889): [ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: 'package:stacked_services/src/dialog/dialog_service.dart': Failed assertion: line 165 pos 7: 'customDialogUI != null': You have to call registerCustomDialogBuilder to use this function. Look at the custom dialog UI section in the stacked_services readme. E/flutter (16889): #0 _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:46:39) E/flutter (16889): #1 _AssertionError._throwNew (dart:core-patch/errors_patch.dart:36:5) E/flutter (16889): #2 DialogService.showCustomDialog (package:stacked_services/src/dialog/dialog_service.dart:165:7) just wanted to let you know. on the latest StackedServices version as well
@FilledStacks4 жыл бұрын
And the function you registered is formatted correctly? I'm using this everyday in our code bases and it's working fine, latest and older versions.
@kanegomolema73574 жыл бұрын
Can you please do a tutorial on how to add google play and apple store payment integration using Stacked or payfast for us locals.
@FilledStacks4 жыл бұрын
that requires quite a lot of setup and would require me to make a series about it. I've done it once so i know the steps, I'll probably be able to do that in a month or two from now. Will see what else is planned and slot it in there.
@DonetsA4 жыл бұрын
привет подскажи как сделать профиль по этой основе, а то я уже неделю голову ломаю спасибо
@FilledStacks4 жыл бұрын
Hi, I have a video in my firebase series called user profiles and startup logic. In there I show how I handle user profiles in my apps.
@wickedgummybear31044 жыл бұрын
So i've tried linking the responsedata so I could save it. But why does it say that it's a list, when it's obviously only 1 textfield String... Or is this a list because you could potentially have multiple InputFields?
@FilledStacks4 жыл бұрын
It's dynamic at the moment so you can cast it to whatever you'd like at the end. It use to be a list of dynamics, but now it's dynamic only so you can have the freedom to cast to any type.
@wickedgummybear31044 жыл бұрын
@@FilledStacks I forgot I asked this hahaha.. Yea I solved getting the value already. Making it dynamic was the right choice indeed.
@chinmayagarnaik64584 жыл бұрын
Actually I want to know is their any way to show user random posts.i know how to show followers posts but I need suggested post. In firebase function. I know comments doesn't relented to video but I was just wondering if you can help me or make a course on firebase function node.js.
@FilledStacks4 жыл бұрын
Yep, you can keep a list of public posts in a seperate collection, get them then return random id's from that list to your user.
@routadu4 жыл бұрын
I'm using your stacked package How could I add a listener to one of the properties of viewmodel so that it would rebuild the UI to show custom progress states ? Is there any existing solution or should I just change it using a function and then call notifyListeners()
@FilledStacks4 жыл бұрын
There is no solution yet for that functionality. I am planning to build that at some point so as soon as I get some time I will implement that using the Selector functionality provided by provider.
@markdioneeb89972 жыл бұрын
@@FilledStacks any update to this? thanks!!
@FilledStacks2 жыл бұрын
@@markdioneeb8997 No, we haven't found this to be a requirement in any of the high performant 6 apps we've built so we don't think it's a required feature for any other apps either.
@dev.faizan3 жыл бұрын
How to show dialogue without pressing button I mean when app open it automatically show dialogue on home screen
@FilledStacks3 жыл бұрын
In the onModelReady function of your HomeView call a function in the Viewmodel that shows the dialog you want to show.
@dev.faizan3 жыл бұрын
@@FilledStacks thanks
@yerassylospanov11424 жыл бұрын
Hi, actually it's great! But i have a question =) How it affects to performance in Flutter to use this in app
@FilledStacks4 жыл бұрын
it doesn't. A package is just code, so whether you write it yourself or you use code someone else wrote it makes no difference.
@gideonmuiru58084 жыл бұрын
Thank you! Thank you! Thank you!
@FilledStacks4 жыл бұрын
You're very welcome :)
@mars31424 жыл бұрын
Why don't you inject the dependencies with function/method parameters? This will be the better solution, if you want to unit test your code, because you can inject different dependencies without changing anything for the injectable generated code.
@FilledStacks4 жыл бұрын
i don't like the dependency and maintenance it creates when changing signatures. and if you watch my unit test video I can still do the same thing by registering a I want to use in the setup.
@kevinmathew13094 жыл бұрын
Suppose if I want user data in all the screens and if i have option to edit profile how could i notify those changes through out the app ? I am following your provider architecture and my base viewmodel has the get current user function.
@FilledStacks4 жыл бұрын
I'd simply update the user service and call notifyListeners in the service. Make it reactive. That way any viewmodel that's listening to it will update itself if they're still alive.
@kevinmathew13094 жыл бұрын
@@FilledStacks is there any of your tutorial handle such a scenario, so i can refer ?
@FilledStacks4 жыл бұрын
@@kevinmathew1309 yes, part 2 of the new series shows how to use reactive services.
@kevinmathew13094 жыл бұрын
@@FilledStacks thanks. Is it there in youtube or in filled stacks website? Can you share a link.
@kevinmathew13094 жыл бұрын
Got it. In the second part of stacked package tutorial. Thanks
@GJJ20194 жыл бұрын
Or u could just use awesome get package for routes , navigation, DI, and state management
@FilledStacks4 жыл бұрын
I am using that :) for navigation, dialogs and snackbar.
@GJJ20194 жыл бұрын
@@FilledStacks get package deserve separate video don't u think ? And ur videos r awesome as always 👌
@FilledStacks4 жыл бұрын
@@GJJ2019 i don't use it in production on its own so i don't have the knowledge to make a video about it at this point. the most I use it is as I've shown in these videos.
@abhishekkhanal77914 жыл бұрын
Please make a video on how to implement caching and save something like posts on local database
@FilledStacks4 жыл бұрын
I am planning on doing a sqlite tutorial where I'll save some stuff locally.
@beyondbuks48284 жыл бұрын
Please make a video on managing in-App purchases especially subscriptions
@FilledStacks4 жыл бұрын
@fireship has a great few videos on it and a full course :)
@hendrickmanenga92134 жыл бұрын
Thank you .Pleas how to show Dialog with a textField?
@FilledStacks4 жыл бұрын
You're welcome. You do it like I show at the end of the video :)
@maherbanhusentech4 жыл бұрын
Pdf file upload and retrieve in firebase video send please
@FilledStacks4 жыл бұрын
Hey, I don't do that in production so I probably won't make a video on it.
@zeorjvistr62454 жыл бұрын
Bro I love your every video but when you will upload a new video
@FilledStacks4 жыл бұрын
Thanks man! I appreciate the support. I just uploaded a new one 20 minutes ago :D :)D :D
@bm8308104 жыл бұрын
Isn't a dialog some kind of view, so maybe it shouldn't be in viewmodel
@FilledStacks4 жыл бұрын
The viewmodel is not showing it, but you can request it to be shown from the viewmodel
@bm8308104 жыл бұрын
@@FilledStacks it's not about showing but about knowing about, changing view should not change viewmodel, by definition all your views should reside in view, and all your logic should be in viewmodel
@FilledStacks4 жыл бұрын
@@bm830810 That's absolutely true. The viewmodel knows absolutely nothing about the UI. There's no import of material, there's no imports of any UI related code. It's all based on an interface created by us outside of the UI. The viewmodel is simply interactive with a service class and providing the commands it wants it to do. The same could be said for an api call which is wrapped behind a service. A viewmodel should be handling business logic, not making api requests. But that's not how it's seen, and I think that's not how using any class should be seen. the service is doing the work. The viewmodel simply asks the service to do that work for them. Imagine having to let your viewmodel know about callbacks from the UI that then have to pass back to viewmodel what the results are causing multi directional dependencies. i don't like those kind of dependencies and I've found the best way to break them is through a simple service class that abstracts away any UI code.
@bm8308104 жыл бұрын
@@FilledStacks well, in your proposal if you want to change the dialog's text(which is a view), you should change your viewmodel. also testing the viewmodel becomes more complicated (what if you want to accept some dialogs and reject others, what if you have other inputs on the dialog as well and want to return their information, how to mock dialogs information) I've been following your pattern and got stuck exactly here, finally I went with the callback method that you mentioned, although it may be harder to understand at first, but it is easier to test and more aligned with pattern's philosophy.
@FilledStacks4 жыл бұрын
@@bm830810 That's weird. I find the testing much easier than using a callback method. you just register a mock using mockito and indicate what you want it to return. I have a video about it. Testing is very great for us. Unit testing is a first priority for us so I wouldn't sacrifice that for anything. I guess we differ on where responsibility should lie or what should be carrying the responsibility. i think the view should exist only to display the UI for that view. Since a dialog is a completely new view (as treated by the navigator where you have to call navigator.pop to remove it) i don't think it's the responsibility of the view to show it. Therefore it should be accessible in the business logic so that the view doesn't carry that responsibility. But as I've found discussions around opinions and preferences leads in circles. This is the most maintainable, readable and easiest approach that I've found during development. So far I think you're the only person I've encountered that got the problem you mention since I know how easy it is to mock with mockito.
@prn-ice4 жыл бұрын
I have loads of different dialogs so I use a custom DialogService, My switch statement has like 12 different cases, XD.
@FilledStacks4 жыл бұрын
hahaha, awesome! I have an issue that someone created proposing a different way of registering dialogs which I like so I think that'll become a bit easier to manage in the next few updates to the package.
@prn-ice4 жыл бұрын
@@FilledStacks Can't wait.
@jfish35764 жыл бұрын
@@FilledStacks Great! Are you planning on updating your written tutorial to match the documentation on pub?
@FilledStacks3 жыл бұрын
@@jfish3576 At the moment I am not planning on doing that. I don't even find time to make new content, i doubt I'll be able to find time to update old content.
@jfish35763 жыл бұрын
@@FilledStacks i understand! thank you so much for your investment! it helps a lot!
@woop87064 жыл бұрын
What is with people not implementing context and looking for ways to bypass it?
@FilledStacks4 жыл бұрын
1. Separating your Business Logic and state management from your UI will remove the context from the code your business logic has access to. 2. Easier for unit testing 3. Clear separation between uI and business logic and all the benefits of that.
@oris43584 жыл бұрын
Exactly my thoughts. The author's explanation doesn't justify it. Using get_it doesn't justify it. A context is an inherent part of Flutter, use it.
@1879heikkisorsa4 жыл бұрын
@@oris4358 So explain why context is indispensable. In the end you will work with whatever makes you build quality apps the fastest. The whole stacked architecture is one of the best why to achieve this in my opinion. But hey, whatever floats your boat man.
@oris43584 жыл бұрын
You lost me after "the fastest" 😉
@el72844 жыл бұрын
Depending on your architecture, you might want to abstract certain components, components which demand contexts
@yourasa12133 жыл бұрын
This is too difficult to follow. Besides it changed all the Flutter infrastructure model. I think I am not gonna waste my time for this. Thank you anyway.
@FilledStacks3 жыл бұрын
You're welcome. And yes, this channel is made specifically to help developers avoid wasting time by writing maintainable code upfront instead of struggling to decouple later on. So you're in the right mind with not wasting time on this, you probably don't need it yet. I Don't agree with flutter infrastructure model. Abstracting something so that it's easier to unit test is not an infrastructure change, it just means you're not directly dependent on it. But you're still using it :D Good luck