0

I am working on a notes app and using VS code in Ubuntu 20.04 I have integrated the SQFLite and path plugins but I am getting the exception

MissingPluginException (MissingPluginException(No implementation found for method getDatabasesPath on channel com.tekartik.sqflite))

Here is the integration of plugins

sqflite: ^2.0.2
path: ^1.8.0

These are the imports for these plugins

import 'package:path/path.dart';
import 'package:sqflite/sqflite.dart';

And here is the way I am accessing databases paths

Database db = await openDatabase(join(await getDatabasesPath(), "notes.db"),
    onCreate: ((db, version) async {
  await db.execute('''
  CREATE TABLE $tableName (
    id INTEGER PRIMARY KEY AUTOINCREMENT,
    $col1Name TEXT,
    $col2Name TEXT,
    $col3Name DATE
  )
  ''');
}), version: 1);

I have tried flutter clean but it is also not working

1 Answer 1

1

sqflite plugin is not supported on linux, you need to use the sqflite_common_ffi package that works both for flutter and dart VM on linux. More information here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.