This is so cool. I'll waiting for the serie about doing Offline First with: REST and SQLite and FilledStacks. Great Work Dane!
@FilledStacks4 жыл бұрын
Thank you. I don't think there will be a series about that. I've shown how I do api, now sqlite so there's nothing left in that set of videos you asked for.
@steveandjodee4 жыл бұрын
@@FilledStacks You could give an example of syncing between the SQLite db in the app and the API!
@FilledStacks4 жыл бұрын
@@steveandjodee hey, I've seen this idea before. You don't actually sync between the two. Or at least in my experience of making an app offline. I store some of the data, that I won't want the user to request locally in the db. Then I'll always show that first and then fetch updated in the background and update again. There are waaaaay too many ways to do it and it all depends on the api capabilities. What you can get as a single request and what you can't get in addition what you want to be offline etc.
@ebelevics4 жыл бұрын
@@FilledStacks I would love to see tuts for building Offline First app. While I do agree it's an architecture choice, I haven't seen clear example of one of the architectures in Flutter using API and SQLite. Most problems occur when I have to sync with multiple devices or managing multiple offline state API requests when one of devices comes online after some offline time. And simply answering use Firebase is not an option.
@FilledStacks4 жыл бұрын
@@ebelevics Luckily I've never had to build apps like that so I won't be able to make a video about that. It's not something that I think of often. The furthest scenario i've had to use local storage for is to ensure things are on screen while we fetch the real data. i don't manually do "Sync when connected" , I don't "Sync between devices" if the user has multiple accounts. That's all "naturally" taken care of by my startup logic. Get everything needed in my startup view, and then continue into the app when it's ready. So I basically always show fetched data first unless there's no connection. But then the apps I build won't work so I just tell them that and don't do much about it. Can't order from a food delivery service without internet :D so we can just not handle those scenarios because it'll bring no benefit to the customer or clients. And we do have "sync when connected" functionality, but it's all handled by firestore haha, so won't be able to make a video about that on SQL.
@MafazKhan14 жыл бұрын
I definitely knew you would do it Thank u sooo much filled stacks
@FilledStacks4 жыл бұрын
You're welcome :) Hopefully it's worth it.
@hurbes1014 жыл бұрын
I was waiting for this tutorial for so long. it was greatly informative and helpful, thank you. Please make a video on GraphQL with flutter is possible
@FilledStacks4 жыл бұрын
I'm happy to hear that! and I'm happy that you got some value from it. I'm definitely doing GQL soon. Have to go into a bit of a crunch for a client app so we can deliver so I will probably be back in about 2 or three weeks only. I actually have a GQL implementation for this client so I can share that when I get back.
@hurbes1014 жыл бұрын
@@FilledStacks I'll be eagerly waiting for it :)
@FilledStacks4 жыл бұрын
@@hurbes101 :D
@gauravidesigns4 жыл бұрын
Your tutorials are best and consise
@FilledStacks4 жыл бұрын
Thank you. I try my best to keep things easy to understand
@sheshankgupta49934 жыл бұрын
Dane my man you absolutely lifted me from scratch in flutter development... Cannot thank you enough. And what the hell is this Riverpod thing. Would love to see your views on it.
@FilledStacks4 жыл бұрын
You're very welcome. It's my pleasure to share the knowledge. I haven't used it yet. I will take a look at it and see how much benefit we can get from it.
@ferhataksoy18514 жыл бұрын
This is the video that i am waiting for thank you so much.
@FilledStacks4 жыл бұрын
You're welcome! I hope it's worth the wait.
@ferhataksoy18514 жыл бұрын
@@FilledStacks Definitely worth it.
@h3w454 жыл бұрын
Thanks for this. Also covering Moor or Hive will be great.
@FilledStacks4 жыл бұрын
Resocoder has a good series on moor so I don't think there's anything that I can add. If I ever use hive in production I will share what I learned, at the moment i haven't so I don't have anything to share about it.
@h3w454 жыл бұрын
@@FilledStacks yes you are totally right, thank you.
@FilledStacks4 жыл бұрын
@@h3w45 😄
@workflop41174 жыл бұрын
I love your content always fantastic quality
@FilledStacks4 жыл бұрын
I really appreciate the kind words and leaving the comment. Thank you
@workflop41174 жыл бұрын
@@FilledStacks Thanks to you for sharing such amazing content
@FilledStacks4 жыл бұрын
@@workflop4117 😊
@_rubs4 жыл бұрын
Pretty nice information here. Can I suggest you to follow up this SQL series on how to back up the DB to either google drive or even better dropbox, and restore the DB back again to a simulated brand new device?.
@FilledStacks4 жыл бұрын
Thank you. I've never done that, the way I handle that is by storing all the information on the server. The database functionality is purely to provide offline capabilities when there's no connection so we show something and not nothing. I've never done a DB backup. Basically on start I get whatever info I need from the api and keep it locally.
@isyedaliraza4 жыл бұрын
I really appreciate your work. Keep it up bro. Also do a tutorial on localization. Thanks for the knowledge you are sharing ❤️
@FilledStacks4 жыл бұрын
Hey Hey, I planned to do one but never got around too it. There's quite a lot of functionality to go through and to add into my package before I can do that. But it's on the list of videos to make.
@isyedaliraza4 жыл бұрын
Thanks, I'm looking forward to that.
@FilledStacks4 жыл бұрын
@@isyedaliraza Hopefully one day soon
@cautaro4 жыл бұрын
Any experience with using Floor? What are your thoughts on it?
@FilledStacks4 жыл бұрын
None, I've never used it. The furthest I got was watch the @resocoder video on it to see what it's about. But I've never used it in production.
@cautaro4 жыл бұрын
Great video again! How would you organize multiple models in the database_service file? Would you extract the CRUD functions to a file for each model?
@FilledStacks4 жыл бұрын
thank you! I'm a bit confused by the term "Multiple models in a database_service file" the data models I usually keep in separate files. When there are multiple actions for each model I do split them up at some point but I've found it more difficult to maintain in the long run that way. Unless each of them has access to the same database, but I like having a unified api for all the DB actions. So that's a personal thing on my side. You could split the actions for ORders and posts into separate repositories if that feels better for you.
@cautaro4 жыл бұрын
@@FilledStacks In the example above you have only one model - Todo. The methods ( getTodos, addTodo etc.) that manipulate this model are in DatabaseService. In case that the app has multiple models, where do you place all the methods specific to these models? Still in the DatabaseService? For an app with 10 models and 5 methods each, it can be a file with 50 methods. I'm trying to get my head around how you organize such a scenario. Thank you
@FilledStacks3 жыл бұрын
@@cautaro I see, i've done both. Splitting the models between multiple classes and keeping it in 1. I like keeping it in 1 more than splitting it into 10 different classes. makes the unit testing easier and the maintenance as well. It might be how i implemented it but I still liked having 1 file more for the maintenance.
@pierremarais76693 жыл бұрын
Hi, I have a sqlite database I want to 'secure' it using sqlcipher, is this the correct way, have you ever seen an example of using this, thanks Pierre
@FilledStacks3 жыл бұрын
Hi Pierre, I have not seen an example of this and I also have never used sqlcipher. I've never stored sensitive info locally so I don't ever have the requirement for a secure db.
@LikeLuluLikeLulia3 жыл бұрын
Hi, how to create multi-tables with foreign key with this method? and in openDatabse, there isn't a path, only a datebase name, do we need a path too? thank you!
@FilledStacks3 жыл бұрын
Hi, that would all be done in your SQL files. However you would do that in normal sql you'd do it the same way here, if that's supported in sqlite. And the path is the name of the DB.
@jaspreetkaur-mo2dr4 жыл бұрын
Awesome man, Another again content. Thanks, Man
@FilledStacks4 жыл бұрын
Thanks! I appreciate it :)
@NabilDesignz4 жыл бұрын
Can you please do Wysiwyg ? How to render properly data from wysiwyg stored in firestore? I mean from wysiwyg web to firestore to data displayed nicely in flutter. Thanks 👏
@FilledStacks3 жыл бұрын
Hey, I have no idea what that is so I doubt I'll be able to make a video about it.
@ajnaf72773 жыл бұрын
have you considered using the hive package it saves much boilerplate and it is fast
@FilledStacks3 жыл бұрын
I have but the query functionality is limited. I needed the query relations for the data that was being stored
@ajnaf72773 жыл бұрын
@@FilledStacks i had the same problem but i solved it by adding adapters to each model it should work fine
@FilledStacks3 жыл бұрын
@@ajnaf7277 Thanks for that info. I'll look into that again when we get around to our next project. I Appreciate you sharing that.
@isaacadariku4 жыл бұрын
💙💙💙 thanks FilledStack
@FilledStacks4 жыл бұрын
You're welcome. Thanks for watching.
@JuanPerez-vv5lk3 жыл бұрын
is this technique valid as of today july 2021 ?
@FilledStacks3 жыл бұрын
Yes. still valid. we use it in production.
@oualisalaheddine55874 жыл бұрын
Merci Monsieur.
@FilledStacks4 жыл бұрын
:D
@rishabhsharma38214 жыл бұрын
Thanks I was working with this package , can we also save the state of the widget like for example a process bar
@FilledStacks4 жыл бұрын
I wouldn't recommend that. I'd rather use a no sql db for that like hive so that you don't have to update your schema everytime you want to save data from a different widget.
@rishabhsharma38214 жыл бұрын
I was trying Hive but Idk what’s wrong with it , the package is not stable though I have worked with before but now it’s not working
@rishabhsharma38214 жыл бұрын
Can you create a discord channel where you can add people working in flutter so that they help each other out
@FilledStacks4 жыл бұрын
@@rishabhsharma3821 Yeah we have a channel on Slack join.slack.com/t/filledstacks/shared_invite/zt-hqvqnd50-trS3YfEsL~2LQXfi9XjFBw I don't like discord because everthing is confusing and you can't follow a conversation. Slack has threads so it works out better.
@wickedgummybear31044 жыл бұрын
@@rishabhsharma3821 I was using Hive for a while, but also struggeling. At some point it was not doing something which it was supposed to do and didnt give an error either. SQL is a bit too much power for my needs at the moment so I switched to Sembast. It seems to do the trick.
@RioM8z4 жыл бұрын
Unfortunately is not possible to use SQLite in Flutter for web.
@FilledStacks4 жыл бұрын
If I had to choose a db to use I wouldn't go with SQLite for local storage. Something without schema management would be my first choice. If I had to do advanced queries then it would have to be sqlite other than that you can do with a noSql db that has browser support.
@hammadpervez45684 жыл бұрын
I'm having a issue with my flutter code, Where can I ask ?
@FilledStacks4 жыл бұрын
You can join our slack channel and ask there join.slack.com/t/filledstacks/shared_invite/zt-hqvqnd50-trS3YfEsL~2LQXfi9XjFBw
@beyondbuks48284 жыл бұрын
Next video suggestion how to manage onboarding screens(the screens should only be shown when the user first installed the app)
@FilledStacks4 жыл бұрын
Thanks for the suggestion. I've seen quite a few videos on that. You just use shared preferences, at the end of onboarding you set a value to true. If it;s false when you start the app you show the on boarding. If it's not you skip it.
@jaineelmamtora82083 жыл бұрын
Hey, my database is getting deleted whenever I hot restart or also when the app is removed from recent apps and opened again. Any idea how to solve this?
@FilledStacks3 жыл бұрын
Hey, I don't know why that would be happening. I use the sql_migration_service and it solved that for me.
@jaineelmamtora82083 жыл бұрын
@@FilledStacks I got the solution, thanks for replying though!
@FilledStacks3 жыл бұрын
@@jaineelmamtora8208 Awesome. What did you have to do?
@jaineelmamtora82083 жыл бұрын
@@FilledStacks Well, I was not querying the database properly.
@FilledStacks3 жыл бұрын
@@jaineelmamtora8208 aaaaaah, that can happen. I'm a SQL noob and that has definitely happened to me before.
@beyondbuks48284 жыл бұрын
Thank you so much
@FilledStacks4 жыл бұрын
It's my pleasure to share it! Thanks for watching.
@attafriski59014 жыл бұрын
Thank you Dane.
@FilledStacks4 жыл бұрын
It's my pleasure.
@wickedgummybear31044 жыл бұрын
Damn, so many things to dissect here... personally never used FutureViewModel. Going to look into that now.. very nice Tutorial! Thank you!
@FilledStacks4 жыл бұрын
Thanks! It's pretty basic, if your view DEPENDS on data returned by a Future then use the future viewmodel. Give the future to the futureToRun function and it'll run the future, set the view to busy until the data is returned. When the data comes back it sets the data property on the model and fires onData incase you want to do something when the data is returned. It also catches the errors for you and sets it to the error object. it also fires the onError function in case you want to do something when the error happens like show a dialog, etc. Very useful. It removes quite a bit of boilerplate.
@wickedgummybear31044 жыл бұрын
@@FilledStacks I see, I think I'll try to refactor a bit of my app to see how it goes when I'm done with my other stuff.Thank you for this.. On an unrelated note, I was updating my packages and got this error: Because "app" depends on stacked_themes ^0.2.0 which depends on get_it ^4.0.4, get_it ^4.0.4 is required. If you have the time, can you update your package requirements?
@FilledStacks4 жыл бұрын
@@wickedgummybear3104 I can definitely update and push that.
@wickedgummybear31044 жыл бұрын
@@FilledStacks It's all working perfectly fine as it is, but I just always feel a bit better when everything is tidy and up to date hahaha. Thank you! No hurries though!
@FilledStacks4 жыл бұрын
@@wickedgummybear3104 haha, you and me both :D :D It's a much better feeling and migration process as well when you do all the incremental updates along the way instead of a massive refactor months down the line. We think the same!
@NIKHIL27B4 жыл бұрын
You are amazing man ♥
@FilledStacks4 жыл бұрын
Thanks man. Much appreciated.
@abraiyan79844 жыл бұрын
Can we use Moor here? Are there any downsides of using Moor?
@FilledStacks4 жыл бұрын
yes you can. I don't know of any downsides, haven't used it before.
@abraiyan79844 жыл бұрын
@@FilledStacks you should check it
@FilledStacks4 жыл бұрын
@@abraiyan7984 I don't need SQLite outside of the basic functionality and I needed a bit more manual control over models and mapping of the data. But i have seen the reso coder series on it.
@abraiyan79844 жыл бұрын
@@FilledStacks Thanks, man. It will be great to know what kind of database you use for your projects. And I have a request. Make a video on the NoSQL database or a series of videos.
@FilledStacks4 жыл бұрын
@@abraiyan7984 All the code I share comes from production solutions. So at the moment we're using sqlite. The only NoSql db we use is through firestore which we're using for 2 apps at the moment, another 2 a few months ago. I'd highly recommend fireship.io instead of my content for no sql db content. Jeff has a way better set of knowledge around it. I only learn what I need to to overcome a problem at hand.
@emmanuelsonzico59974 жыл бұрын
Thanks dane! 🙌
@FilledStacks4 жыл бұрын
It's my pleasure!
@Moali114 жыл бұрын
Great video, could you please share the source code for this tutorial?
@FilledStacks4 жыл бұрын
Thank you. It's with all the other tutorials at github.com/filledstacks/flutter-tutorials
@nero90613 жыл бұрын
Please make a video about handle API and exception and other concept related. I get stuck with this so long :(((
@FilledStacks3 жыл бұрын
Hey, I handle mine the normal way, I surround the call with a try catch and print out the errors in the catch statement.
@nero90613 жыл бұрын
many problem around they such as many different responses corresponding to many status codes, how catch it and print error message inside different json type ... :((
@FilledStacks3 жыл бұрын
@@nero9061 I check for certain status codes and then handle it according to how my app should handle that based on what it means coming from the api. I just add if statements and then do what needs to be done per response code. I have one function that handles all the actual requests so I can handle the response codes in one place and use that function for every endpoint we have.
@nero90613 жыл бұрын
@@FilledStacks but when i handle in one function actually making request, with one responsebody, I have to call fromJson function in different classes to decode to have actual message to show in dialog, and in every classes i said, the model class is totally different. So I can't return the actual message I want to show from where making request to the view model to show dialog or something like that. Still so confused ...
@FilledStacks3 жыл бұрын
@@nero9061 Sorry man, i have no idea what you mean. You can just return your response in the way you want it. If you're handling the same response differently in many places that should work fine as well.
@billywatsikenyere66563 жыл бұрын
you good man
@FilledStacks3 жыл бұрын
Thank you! Much appreciated.
@RandalLSchwartz4 жыл бұрын
It's pronounced "ess cue light" according to Richard Hipp, and "ess cue ell" for the abstract language (and *never* "sequel" yuck), regardless of how you've been hearing it all these years. Monty Widenius insists on "my ess cue ell" for the app/framework later named Maria, and I've heard "ess cue flight" for the Flutter package.
@FilledStacks4 жыл бұрын
Thanks, i do always struggle to find the correct ways to pronounce things. I like using the SQL naming SeeQuel Lite. But now I know it's wrong haha.
@vicyoslinuxofficial26073 жыл бұрын
Bruh, you rock!!!!!! Thank you so much for this freaking good video! Bruh, I've gotta question: Is your website: "www.filledstacks.com" backend and front-end made with flutter for web? Thanks.
@FilledStacks3 жыл бұрын
Thanks!! There's actually no backend for FilledStacks. It uses all locally hosted data. The tutorials are generated from markdown files and stored in a local graph ql database. I use Gridsome for my website, it's built ontop of VueJs.
@pradeep4224 жыл бұрын
lol u still on Earth thought u moved to Mars heheh...