Relative Content

Tag Archive for flutterpackagesqflite

OnUpgrade of sqflite in flutter and setting a default value when you dont have the value

So the objective is to write a alter table query in the onUpgrade of the function of the inbuild onUpgrade to do so which works, but the issue im facing is i dont currently have the value during the initlization or the onupgrade, As I have to do a sync call to get the data which is to be then filled into the corresponding table, from where I need to fetch it and then work the onUpgrade. While i tried doing the API call before the working of the Onupgrade. There was a error of late initilaization. Any alternative or solutions to this would be much appreciated.