r/FlutterDev • • 1d ago

Discussion Database solutions

Hi,

I'm a flutter developer experienced with both cross platform and native applications development..

For 5 years I've been using Sqlite (android native) and sqflite (flutter) as my main database go to packages.. I'm kinda tired of hand writing sqlite quarries and I understand how frustrating it is to have a typo in a long quarry (I know we have AI now) or to actively maintain it.

I know we have a lot of non-sql solutions but they mostly use build runner and auto generate files to translate code properly and it feels mostly heavy and lacks a lot on optimization side.. So I'm starting my own package.. I want to understand what are your biggest issues with current packages.. What's your experience with them.. What do you think is a big downside that will make you switch from your current "go to"?

I'd love to hear from you!

1 Upvotes

18 comments sorted by

View all comments

Show parent comment

1

u/TrekCZ 1d ago

I don't see why you would not use drift and who said in your product why it is forbidden. If you are scared about migrations then don't do migrations in drift. Mapping ORM to existing database is just basic use case.

1

u/DullSpinach1684 1d ago

Not saying drift is bad in any way, shape, or form.. Yes it's great and a lot of developers are using it.. But even without its migration you still have build runner (which I pointed out in the post to be an issue) and also you won't get the performance and size of sqflite.. When you talk about sqflite you're talking in kilobytes.. When you're talking about drift you start with a couple of megabytes out of the box cause it was built on sqlite3.. Again I'm just asking about what people have in mind I'm not forcing a point on anyone.. Flutter was built on community and having all these options is a great perk. Hope that marks my pov 😁

1

u/TrekCZ 1d ago

Dude, you should use AI. Even me as flutter hobbyist can vibe that

drift adds small 1-2mb comiled native binary, but it is advantage, becase you have updated binary and not relying on OS

you are not forced to, you can use drift_sqlflite, but drift + sqlite3 is generally faster than sqflite

only argument is build_runner, if it is problematic for your specific use case, but in that case your app must be ultra huge, especially for a mobile app

1

u/DullSpinach1684 1d ago

As I stated before we work with tracking and navigation systems we work with special hardware and work closely with the local government (PD and city hall) they mostly install cheap tablets for the drivers with 2gb of ram.. If your client is someone that doesn't care at all about real performance like it's just a generic notes app or a generic eccomerce then yes let AI do everything.. But big local companies and departments rely on it you need to understand that it's not your choice to do anything that just achieves the required results.. Every single megabyte of storage matters. That's why I'm not relying on AI or build runner we need to have full control of everything correctly.. You'd say then build it in native why flutter.. We already have both flutter and native apps for various clients as stated at the top I have experience with both before AI was a thing.. We used automation tools, saved code blocks, and had a lot of shortcuts.. Some people can easily take an app template off of any website like code canyon and just white label it and call it a job well done.. But the app will be disastrous (I've seen vibe coded apps) and heavily rely on a lot of packages and UI kits making the app a big mess.. Now we have AI same people that used the templates are using it now and getting the same results.. Again I use AI but in a very strict way and mostly in UI development.. Using it in heavy services would be disastrous.. Again it's my experience.. You have yours.. Uf you're happy with what you work with then that's good for you.. 😁❤️

1

u/TrekCZ 23h ago

You are demonstrating lack of AI mastery and false dichotomy.

Ignoring fact that drift + sqlite3 is faster than sqflite. Flutter itself adds a lot of MB (engine, dart runtime, renderer), significant baseline RAM. Arguing that "every single megabyte of storage matters" to reject a 1–2 MB sqlite3 binary—while already choosing Flutter—doesn't really add up.

I am advising you with good intent, you need to go for AI mastery and significantly elevate your skills. Or be damned. Your choice.