openfoodfacts / smooth-app

The new Open Food Facts mobile application for Android and iOS, crafted with Flutter and Dart
https://world.openfoodfacts.org/open-food-facts-mobile-app?utm_source=off&utf_medium=web&utm_campaign=github-repo
Apache License 2.0
742 stars 260 forks source link

The app can't be launched on Linux #5427

Closed g123k closed 1 week ago

g123k commented 1 week ago

Error message:

Bad state: databaseFactory not initialized
databaseFactory 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      LocalDatabase.getLocalDatabase (package:smooth_app/database/local_database.dart:62:33)
    #4      _init1 (package:smooth_app/main.dart:137:40)
    <asynchronous suspension>
    #5      _SmoothAppState._init2 (package:smooth_app/main.dart:182:5)
    <asynchronous suspension>
    #6      _FutureBuilderState._subscribe.<anonymous closure> (package:flutter/src/widgets/async.dart:624:31)
    <asynchronous suspension>

Part of