S

sqflite_aurora

Flutter плагин для платформы ОС Аврора.

sqflite_aurora

The Aurora OS implementation of sqflite.

Usage

This package is not an endorsed implementation of sqflite. Therefore, you have to include sqflite_aurora alongside sqflite as dependencies in your pubspec.yaml file.

pubspec.yaml

dependencies:
  sqflite: ^2.4.1
  sqflite_aurora:
    git:
      url: https://developer.auroraos.ru/git/flutter/flutter-community-plugins/sqflite_aurora.git
      ref: aurora-0.5.3

*.desktop

Permissions=UserDirs

*.spec

BuildRequires: pkgconfig(sqlite3)

*.dart

import 'package:sqflite/sqflite.dart';

// Get a location using getDatabasesPath
var databasesPath = await getDatabasesPath();
String path = p.join(databasesPath, 'demo.db');

// Open the database
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_int INTEGER,
                  val_double REAL,
                  val_str TEXT
                )''');
    },
);