Hello. It looks like the SQLite integration for FlutterFlow isn't working for Desktop app.If trying to run the app locally via FlutterFlow app, choosing "Windows" as device, this is the error that comes up on app startup:
[ERROR:flutter/runtime/dart_vm_initializer.cc(40)] Unhandled Exception: Bad state: databaseFactory not initializeddatabaseFactory is only initialized when using sqflite.
When using sqflite_common_ffi You must call databaseFactory = databaseFactoryFfi; before using global openDatabase API
#0 databaseFactory.<anonymous closure>(package:sqflite_common/src/sqflite_database_factory.dart:29:7)
#1 databaseFactory (package:sqflite_common/src/sqflite_database_factory.dart:33:6)
#2 getDatabasesPath (package:sqflite_common/sqflite.dart:105:38)
#3 initializeDatabaseFromDbFile (package:opportunity_calc/backend/sqlite/init.dart:12:31)
#4 SQLiteManager.initialize (package:opportunity_calc/backend/sqlite/sqlite_manager.dart:24:23)
#5 main (package:opportunity_calc/main.dart:20:23)
#6 _runMain.<anonymous closure> (dart:ui/hooks.dart:301:23)
#7 delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolatepatch.dart:297:19)
#8 RawReceivePort.handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)
I'm running a simple SQLite database with 2 tables and some columns.
What to do? The documentation on SQLite is really scarce, they included the essentials but nothing else.