Estou tendo o erro: [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: MissingPluginException(No implementation found for method getDatabasesPath on channel com.tekarti k.sqflite)
#0 MethodChannel.invokeMethod (package:flutter/src/services/platformchannel.dart:175:7)
#1 wrapDatabaseException (package:sqflite/src/exception_impl.dart:7:20)
#2 SqfliteDatabaseFactoryMixin.getDatabasesPath (package:sqflite_common/src/factory_mixin.dart:148:20)
meu código do app_database:
import 'package:path/path.dart';
import '../models/contact.dart';
import 'package:sqflite/sqflite.dart';
Future <Database> createDatabase() {
return getDatabasesPath().then((path) {
final String dbPath = join(path, 'bytebank.db');
return openDatabase(dbPath, onCreate: (db, version) {
db.execute('CREATE TABLE contacts('
'id INTEGER PRIMARY KEY, '
'name TEXT, '
'account_number INTEGER)');
}, version: 1);
});
}
Future<int> save(Contact contact) {
return createDatabase().then((db) {
final Map<String, dynamic> contactMap = Map();
contactMap['name'] = contact.nameReceived;
contactMap['account_number'] = contact.accountReceived;
return db.insert('contacts', contactMap);
});
}
Future<List<Contact>> findAll() {
return createDatabase().then((db) {
return db.query('contatcs').then((maps) {
final List<Contact> contacts = [];
for (Map<String, dynamic> map in maps) {
final Contact contact = Contact(
map['id'], map['name'], map['account_number'],
);
contacts.add(contact);
}
return contacts;
});
});
}
Já tentei flutter clean, fazer o pub get, já tentei tirar o sqflite do pubspec.yaml e colocar novamente, e não funcionou, me ajudem pfv quero continuar o curso e estou travado nesse problema.