Sluggish UI using SQLite - dart

I started developing a simple app in Flutter.
I use SQLite database to store some information and later show it on a ListView.Builder().
I pretty much do the same has here.
The problem is when i delete for instance a ListTile for a few frames I'm able to see the delete ListTile flashing before disappearing (I have implement a swipe do delete the ListTile).
I guess this happens because it takes time for it to update the database and get the new records and rebuild the ListView with the new info.
What can i do to solve this problem and make it more responsive? Any tips are welcome.
PS: I have started to look into the BLOC pattern. Not sure if it will help with this problem.
Thanks

Related

When to Use CSV from Web or Keeping Data in Xcode?

I do not believe this has been asked before so please be easy on me.
I plan to have a flashcard app that when pressing the "next" button, will cycle randomly through them. There will be different categories for different topics which will be accessed through a relative UIButton.
I could add all my data as code in Xcode of course, but the only issue is that when a new flashcard is created the user will have to update the App via App Store.
I have found bits and pieces of information regarding JSON and CSV files and pulling that data from an online source, however, with allowing the user to press a button to randomly cycle through what will be essentially TextViews, I have hit a dead-end on finding if this is an effective option or if there are better options. I also struggle to find information related to imported to Xcode, however, there is more than enough information on exporting from Xcode to CSV.
Thank You!

save to local storage swift

I am designing an idle clicker style app, as I am quite new to programming and thought it would be a good personal project. However I am trying to design the upgrades on a second ViewController menu, however every time that the user leaves the first ViewController, all the settings on that page are lost e.g. stats. I know that there are already similar questions, but they don't relate to my issue and I am having difficulties trying to understand them.
I was just wondering if someone had any way to save this progress both when the user moves to a new viewController and when the app is closed and reopened. Also this might be pushing it, but if you could describe what each part of the code does it would be very helpful.
Thanks
Best is to use UserDefaults to store page contents. You can define key/value pairs and save and load values as needed. Look for it in the IOS documentation. It is very easy to implement it.

How to show tabular data in a nice and practical way

My iOS app is a mobile version of a management program I had developed for a company as a desktop application. So its main tasks are saving data in a database and retrieve them when needed with the option to edit them. So I guess that the GUI is mainly composed by forms to fill in and tables to show data. So I am asking you if you could link me some tutorials or give me some tips on how to realize them in a nice way but not too complex. I'd rather avoid simply creating a blank view controller and inserting labels and text fields without a minimum of criterion. I am very new to iOS and XCode and, as I have not too much time, I am asking directly your opinion instead of spending hours in looking for tutorials.
UPDATE!
I mean that I would like to get something similar, for a mobile iOS device, to the following screenshots (from the desktop application I mentioned above)
Seems that you need a grid control to do it.
You can develop your own, or use existing library.
I have very good work experience with Infragistic http://www.infragistics.com/products/ios/grids/grid-view-layouts, but maybe DataForm from Telerik will be better in your case http://www.telerik.com/ios-ui/dataform

Caching likes a follow state iOS swift

I'm building a small social network. I quite far already. But now I need to implement a caching system.
In my app I can like things and follow other peoples. So what I want:
When I like a recipe it automatically counts up the number of likes. In the whole app without to reload a page
When I follow someone the it aitmomatically counts up the number of followers. In the whole app aswell without reloading anything.
Does anybody have an idea how to do this?
I'm working with swift.
Thank you :D
If you need an in-memory cache try the following library:
http://realm.io
If you need some kind of persistent database here are some options:
YapDatabase (key-value SQLite wrapper)
Realm.io (it fits for such purposes too)
Core Data (seems that it is too complicated solution for your issue)
This might help to you in caching, which code has written in swift. Code is here!

Core data changes, now update is crashing

I did a grave mistake, not migrating the coredata model properly (I'm a newbe, sorry). But now my update will crash when doing a specific operation. I need to fix it quickly because it is already out in the app store. My data model is very simple and all I need is deleting old model and uploading new one (like, deleting the app and reinstall it). how do I do it?
I know it is a stupid question, I can probably find the answer myself and learn how to do it, and I would have done that unless my bugged app had not ben already out there. Thanks in advance.
I followed the instructions here:
http://iphonedevelopment.blogspot.com/2009/09/core-data-migration-problems.html
Much better than Apple's documentation... (found it in another thread in this site).
And it worked right away!

Resources