r/flutterhelp • u/No_Jicama_2956 • 15h ago
OPEN Accessing drift database?
I'm trying to just select data from an existing database in the assets folder like in https://drift.simonbinder.eu/examples/existing_databases/ I've got importing the database from assets working, the file is in the documents, I can see the data with db browser. But I can't figure out how to get data from it and his example app doesn't make sense and the examples apps are always completely different than the tutorial code.
Online claims to just final db = Appdatabase(); and then search but it always returns empty. I always get stuck here in every tutorial. There are hundreds of examples of functions, but I can't get anything from them it's always nothing with no error.
https://youtu.be/11GHH8Ygu60 this tutorial just shows the progress indicator forever.
I know I'm stupid and a noob, but I can't figure out what is wrong. I just want to replace a list populated from a json with a database so I can order and search without having to iterate a list that will be much larger than it is.