(MissingPluginException(No implementation found for method openDatabase on channel com.tekartik.sqflite)) flutter
in internet thay say to force flutter clean + flutter pub get, but it didnt worked for me
I found the solution in my case. I was using construction:
return await openDatabase(
path,
version: 1,
onCreate: _onCreate,
onUpgrade: (db, oldVersion, newVersion) => onUpdateTable(db),
);
Which was wrong, instead try
sqfliteFfiInit();
return await databaseFactoryFfi.openDatabase(
path,
options: OpenDatabaseOptions(
version: 1,
onCreate: _onCreate,
onUpgrade: (db, oldVersion, newVersion) => onUpdateTable(db),
),
);