sqlcool2 1.0.0 copy "sqlcool2: ^1.0.0" to clipboard
sqlcool2: ^1.0.0 copied to clipboard

Easy and reactive Sqlite. Stream of changes, select bloc, custom database models

example/lib/main.dart

import 'package:flutter/material.dart';

import 'conf.dart';
import 'dbmodels/dbmodels.dart';
import 'dbviewer/dbviewer.dart';
import 'init_db.dart';
import 'pages/index.dart';
import 'pages/join.dart';
import 'pages/select_bloc.dart';
import 'pages/upsert.dart';

void main() {
  runApp(MyApp());

  /// initialize the database async. We will use the [onReady]
  /// callback later to react to the initialization completed event
  initDb(db: db);
  initDb2(db: db2);
}

final routes = {
  '/': (BuildContext context) => PageIndex(),
  '/select_bloc': (BuildContext context) => PageSelectBloc(),
  '/join': (BuildContext context) => PageJoinQuery(),
  '/upsert': (BuildContext context) => UpsertPage(),
  '/dbmodel': (BuildContext context) => DbModelPage(),
  '/dbmanager': (BuildContext context) => DbViewer(db: db),
};

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'Sqlcool example',
      routes: routes,
    );
  }
}
4
likes
130
pub points
46%
popularity

Publisher

unverified uploader

Easy and reactive Sqlite. Stream of changes, select bloc, custom database models

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

extra_pedantic, flutter, path_provider, sqflite, synchronized

More

Packages that depend on sqlcool2