sqlite3_flutter_libs_aurora
The Aurora implementation of:
Usage
This package is not an endorsed implementation of sqlite3_flutter_libs.
Therefore, you have to include sqlite3_flutter_libs_aurora alongside sqlite3_flutter_libs as dependencies in your pubspec.yaml file.
*.desktop
Permissions=UserDirs
*.spec
%global __requires_exclude ^lib(icudata|icui18n|icuuc)\\.so.*$
*pubspec.yaml
dependencies:
sqflite_common_ffi: ^2.0.0
sqlite3_flutter_libs_aurora:
git:
url: https://developer.auroraos.ru/git/flutter/flutter-community-plugins/sqlite3_flutter_libs_aurora.git
ref: aurora-0.6.0
To get the directory use path_provider
dependencies:
path_provider: ^2.1.5
path_provider_aurora:
git:
url: https://developer.auroraos.ru/git/flutter/packages.git
path: packages/path_provider_aurora
ref: aurora-path_provider_aurora-0.6.1
*.dart
import 'package:sqflite_common_ffi/sqflite_ffi.dart';
// Set up databaseFactory by databaseFactoryFfi for sqflite_common_ffi
databaseFactory = databaseFactoryFfi;
// Get a location not using getDatabasesPath
var databasesPath = await getApplicationSupportDirectory();
String path = p.join(databasesPath.path, 'name.db');
// Open the database
_db = await openDatabase(
path,
version: 1,
onCreate: (Database db, int version) async {
// When creating the db, create the table
await db.execute('CREATE TABLE Table (val_str TEXT)');
},
);