really good work, note : why not add time for refresh data, i mean when stored data, automatically add addedDate to sqlite, when retrive data check addedDate if more than 7 (e.g) days , make http request and replace data
very excellent explanation ... But in the case of deleting or adding products from the control panel, how do I delete the old cache and make a new cache?
If I understood correctly you're giving the cache generic names such as API_Products etc.. but the data you're storing on it is filtered by params such as "searchStr". Wouldn't that cause cache hit even after the "searchStr" is changed?
Hello bro, Once I cache all the data, Then when the user restarts the app we need to call the api data right?(otherwise it will never update). So, will it be good to clear the cache in the main function?.
great video i have a question how will it take if we go to next page or increment the page ?? and how to display products with different category id ?? how to implement both in this package??
@@SnippetCoder yes okay i also thought about another thing what if someone added a new category or product so how will it add new category or product to the storage? dont get it wrong u have created an awesome work by creating this package
Amazing stuff, its a WOW it could be better if you store the keys in variables. What will happen if the data changes in the online DB or local DB, how to synch???
please can you tell us how to make data sync? at the first time, it fetches from api and stores in local and second time, it gets from local, in here if the back-end db is updated, how can i get the update data by making data sync? my back-end db is local MongoDB with nodeJS
HI i tried to implete your API_Cache there's an exception after saving the data exception: Row too big to fit into CursorWindow requiredPos=0, totalRows=1; query: SELECT * FROM api_cache_data WHERE key = ?
How to be sure local db is in synchronisation with server db.. if more than one user try to change the same data or maintain unique Id if inserting different data
By using this package you have to do 2-3 lines of code. but with hive you have to write your own mechanism to handle all this. For shared preference I will not recommended because in case your device is out of memory your shared preference get cleared automatically.
Yes another package that just stores JSON in SQLite. That's not really offline support. Offline API heu? What if you do a POST request to store it on the backend? Just use the Hive library (which is faster then SQLite btw) and store your JSON in the Hive box.
Suppose any changes in data made byoffline , does it reflects cloud? Like if we update a product price in offline , does it change in cloud when it recieves data connection?
Great package. It will help me a lot. But one thing I can not understand, If has cache data, then It won’t' make the API call, right? So how do we get updated / latest data from API?
I have used this package and it's a good one. I have a doubt that when i upade the data in API How to restore that data from API while the Internet is ON?
it is simple, on the new category save if status code = 200 then call this await APICacheManager().deleteCache("API_CATEGORIES"); Then when we call categories page, it will automatically call API first time, because we have deleted the key and it will again add fresh data.
it is simple, on the new category save if status code = 200 then call this await APICacheManager().deleteCache("API_CATEGORIES"); Then when we call categories page, it will automatically call API first time, because we have deleted the key and it will again add fresh data.
@@Tech1st No need to check anything, app will behave normally as, first time it will save the data in local and next time data will be read from local db itself
This looks nice, but how do I know you aren't storing this and pushing it to a remote server? There is no way to verify these endpoints that I can see...in other words, there is no source code. With out source, I'd not trust this without some form of End User Agreement with you to use your closed source plugin. Am I right? 🥴
But sir data updated kese hoga is ne first time he database fetch kar local save kar deya and je bas je check kar raha h data locally store h ya nahi je nahi dek raha ke local data updated h ya nahi
There is way to achieve it, Send the push notification to the app, and send payload "app_update" check if push notification payload is "app_update" then clear the cache and it will read updated data from API?
Hello bro, Once I cache all the data, Then when the user restarts the app we need to call the api data right?(otherwise it will never update). So, will it be good to clear the cache in the main function?.
Please subscribe to this TH-cam channel and click on the bell button so that you get updates on our videos. Thank you.
th-cam.com/users/SnippetCoder
Snippet Coder is the King of Flutter 🔥
Proper offline experience is more sofisticated than that. But you give me idea for a start. Thanks
really good work,
note : why not add time for refresh data,
i mean when stored data, automatically add addedDate to sqlite, when retrive data check addedDate if more than 7 (e.g) days , make http request and replace data
Already in Pipeline for next Update of plugin
@@SnippetCoder this is good
very excellent explanation ... But in the case of deleting or adding products from the control panel, how do I delete the old cache and make a new cache?
Call deleteCache(key) in delete product. Then Call addCache method
If I understood correctly you're giving the cache generic names such as API_Products etc.. but the data you're storing on it is filtered by params such as "searchStr". Wouldn't that cause cache hit even after the "searchStr" is changed?
Hello bro,
Once I cache all the data, Then when the user restarts the app we need to call the api data right?(otherwise it will never update). So, will it be good to clear the cache in the main function?.
Nice Video brother. Thanks for sharing the information... Keep post the videos... ☺
Thank you, I will
great video i have a question how will it take if we go to next page or increment the page ?? and how to display products with different category id ?? how to implement both in this package??
We should think these points before implementing this package in a project...
Yes we can do these also by outting some logic in the code to handle the pagination , ping me offline to discuss
I think we can use dynamic keys to handle pagination and different category_id's...
@@SnippetCoder yes okay i also thought about another thing what if someone added a new category or product so how will it add new category or product to the storage?
dont get it wrong u have created an awesome work by creating this package
Amazing stuff, its a WOW
it could be better if you store the keys in variables.
What will happen if the data changes in the online DB or local DB, how to synch???
That i will cover in Version 2.0 of the plugin, Soon Details video coming with package update.
@Snippet Coder thank you but when
my data from api request is not only text, but also image. Image can also be cached in local ?
please can you tell us how to make data sync? at the first time, it fetches from api and stores in local and second time, it gets from local, in here if the back-end db is updated, how can i get the update data by making data sync? my back-end db is local MongoDB with nodeJS
Great sir. This plugin is life saver. How you create those plugins?
Will make the video for this soon :)
@@SnippetCoder yes.. I want to learn that.❤️
HI i tried to implete your API_Cache there's an exception after saving the data
exception: Row too big to fit into CursorWindow requiredPos=0, totalRows=1; query: SELECT * FROM api_cache_data WHERE key = ?
Hello sir thanks for all tutoriels please Can you show us how to display a Notification Count Badge over App Icon,like WhatsApp, Facebook ?
wow thank you so much. it worked flawlessly
Glad it helped
How to be sure local db is in synchronisation with server db.. if more than one user try to change the same data or maintain unique Id if inserting different data
Nice video..
Can i get a sample code? As i am new to flutter and i need to add this to my currently working project.
thank you sir it's very very helpfull
Most welcome
how to query the data saved to local database with this package??
Nice video.
How is this better than Hive or shared preferences? I'm new to flutter and programming in general
By using this package you have to do 2-3 lines of code. but with hive you have to write your own mechanism to handle all this. For shared preference I will not recommended because in case your device is out of memory your shared preference get cleared automatically.
@@SnippetCoder Thank you!
I hope you subscribed to the channel, if not please do the same.
@@SnippetCoder Your package is amazing brother. I have one suggestion. If it uses the Hive database then the performance will be much better. Right?
God bless you sir 🙏❤️
Yes another package that just stores JSON in SQLite. That's not really offline support. Offline API heu? What if you do a POST request to store it on the backend?
Just use the Hive library (which is faster then SQLite btw) and store your JSON in the Hive box.
what can I say..! You are the best! Congrats...!
Question sire, if there is a new data in the response, how to update the local cached with the new set of api data 😊 or ???
With the help of push notifications, from backend send push notifications and based on that update the data in apicachemanager
Suppose any changes in data made byoffline , does it reflects cloud? Like if we update a product price in offline , does it change in cloud when it recieves data connection?
Hello, As of now no such feature, but promise, in future will share this feature in the package :)
Great package. It will help me a lot. But one thing I can not understand, If has cache data, then It won’t' make the API call, right? So how do we get updated / latest data from API?
Very soon video for V2.0 will come then all your questions will be automatically answers.
@@SnippetCoder Waiting... 😍
@@SnippetCoder Hi any update for V2.0 need this function
User internet connection off, user add category sava data offline, user come online auto new data upload api. How to make it?
Very helpfull channel
Thanks and welcome
You are the best bro 🔥
But this plugin need a timer for deleting cached data !
That you can do manually as per your requirement
@@SnippetCoder How can you add a timer
What a great work brother...thanks a lot.
My pleasure
How to update this data in api cache manager when the API data is added and how to update and show in UI without changing the Key
Just call the same method of addcachedata, it will automatically update the cache on the basis of key name
@@SnippetCoder Thanks you so musch.❣️ Can I use it in Todo app for daily task instead of Sqflite.?
How to delete specific records on the sync data?
This is awesome ... thanks for your efforts🤘❤️
Thank you so much 😀
I have used this package and it's a good one. I have a doubt that when i upade the data in API How to restore that data from API while the Internet is ON?
Will make the details video soon with update of package V2.0
@@SnippetCoder thanks
@@SnippetCoder but when??
Already on it bro, within this coming week :)
Where is the updated video?
When should we use that? How we will know new data add or not if we load from catche data
it is simple, on the new category save if status code = 200 then call this await APICacheManager().deleteCache("API_CATEGORIES");
Then when we call categories page, it will automatically call API first time, because we have deleted the key and it will again add fresh data.
@@SnippetCoder what if the changes are made by the admin and not by the app itself.. how is the app going to detect changes?
when this cache will be refreshed
If user add new category is automatically sync from api?
it is simple, on the new category save if status code = 200 then call this await APICacheManager().deleteCache("API_CATEGORIES");
Then when we call categories page, it will automatically call API first time, because we have deleted the key and it will again add fresh data.
@@SnippetCoder ncie.. when our connection offline its automatically detect?
@@Tech1st No need to check anything, app will behave normally as, first time it will save the data in local and next time data will be read from local db itself
@@SnippetCoder this package doesn't have Example ,Can u provide ?
Is this opensource?
This looks nice, but how do I know you aren't storing this and pushing it to a remote server? There is no way to verify these endpoints that I can see...in other words, there is no source code. With out source, I'd not trust this without some form of End User Agreement with you to use your closed source plugin. Am I right? 🥴
Source code will be up soon :) here everything we are doing only for testing/education purpose.
Excellent 👍
Thank you! Cheers!
Very good video!
Thank you very much!
Hey bro, nice tutorial, can i get a sample use case? (A sample code with implementation)
Thanks in advance
Oh! I was able to make it work. Thanks for this awesome package.
When will image support be available?
It will be awesome if that were true
if any new product is added to the server, is it saved in the cache based on this code ?????
No , for that you have to deal with push notification, upon getting the push notification update the cache based on new data.
Thx sir
you are the best thank you
Hi congratulations by the package it is awesome!! Do you can create a method to list all stored keys? That will be good.
Sure noted will add the same
@@SnippetCoder Thanks man. Do you have an idea when it will be available? I'm going to need this functionality in an app I'm developing.
I will try to update this functionality asap over the weekend.
@@SnippetCoder Thanks I am waiting for this update.
and then how can i get data from my cache ?
pls help about it
By calling this : getCacheData(keyName)
Long live the King!!!
But sir data updated kese hoga is ne first time he database fetch kar local save kar deya and je bas je check kar raha h data locally store h ya nahi je nahi dek raha ke local data updated h ya nahi
In next update of package, auto data update feature will be added
@@SnippetCoder thanks sir i waited.
many thanks bro ^_*
thaaaaanksss
You're welcome!
What if app kill?
How to manage if client adds new data to database from web and on app we have old sync.
There is way to achieve it, Send the push notification to the app, and send payload "app_update" check if push notification payload is "app_update" then clear the cache and it will read updated data from API?
@@SnippetCoder I am very thankful for your kind and quick response.
where update?
For complex modes it’s not working bro
like ?
less code more productivity
Woocommerce variations 🧐
👍
Hello bro,
Once I cache all the data, Then when the user restarts the app we need to call the api data right?(otherwise it will never update). So, will it be good to clear the cache in the main function?.
Hello, Its all depends upon the requirement. If you wanna keep the data then no need to clear, else you can clear it as per your requirement.
@@SnippetCoder Thank you brother for the reply.☺️👍 Keep going.