sqlcool 1.1.0 copy "sqlcool: ^1.1.0" to clipboard
sqlcool: ^1.1.0 copied to clipboard

outdated

A Flutter library to work with Sqflite. Provide helpers for crud operations.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:sqlcool/sqlcool.dart';
import 'page_selectbloc.dart';

void main() {
  initDb().then((_) {
    runApp(MyApp());
  });
}

initDb() async {
  String q = """CREATE TABLE items (
  id INTEGER PRIMARY KEY,
  name TEXT NOT NULL
  )""";
  String dbpath = "items.sqlite";
  await db.init(path: dbpath, queries: [q], verbose: true).catchError((e) {
    throw ("Error initializing the database: ${e.message}");
  });
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'Sqlcool example',
      home: PageSelectBloc(),
    );
  }
}
42
likes
0
pub points
34%
popularity

Publisher

unverified uploader

A Flutter library to work with Sqflite. Provide helpers for crud operations.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

cupertino_icons, flutter, path_provider, sqflite, synchronized

More

Packages that depend on sqlcool