Replies: 3 comments 1 reply
-
Plugins methods are async, there is no way we could make them not async and that would probably hang the UI. If you use the proper analysis options (https://dart.dev/guides/language/analysis-options) such as pedantic, you will not forget the await! |
Beta Was this translation helpful? Give feedback.
-
Thank you your answer. But: If I start an asnyc func on UI thread, then all other functions can be sync, so it remains async. So UI is not problem. The "https://pub.dev/packages/sqlite3" team could solve this problem, they uses some sync functions too, but there is no web support. Your team can solve sync version of functions? What can be technical problem? |
Beta Was this translation helpful? Give feedback.
-
sqflite uses invokeMethod from flutter services which is a sync so it is impossible to make sqflite functions sync. Indeed sqflite3 uses ffi so this is a solution. sqflite does not (and will not) support web neither. |
Beta Was this translation helpful? Give feedback.
-
Thank you for your efforts and work. Due to asynchronous functions, I can not use Sqflite. Async is very aggressive and "infects" most of the functions. Async generates many error possibilities in the code when we forget to use the await. Could you possibly create a synchronized version of the functions? It can help many programmers. Thank you in advance.
Beta Was this translation helpful? Give feedback.
All reactions