sqlview 0.2.1

  • README.md
  • Example
  • Installing
  • Versions
  • 43

Sqlview #

pub package

A collection of sql views for Sqlite and Flutter using Sqlcool. Available views:

  • Admin view: full admin interface for add/edit/delete rows in a table
  • Infinite list view from a table

Crud admin view #

List of rowsEdit row
Crud admin 1Crud admin 1

To get the above use an Sqlcool database with a defined schema:

   import 'package:sqlcool/sqlcool.dart';

   var table = DbTable("item")
      ..boolean("boolean", defaultValue: false)
      ..integer('integer_number', defaultValue: 1)
      ..real("double_number", defaultValue: 0)
      ..text("text", defaultValue: "");

   var db = Db();
   db.init("db.sqlite", schema = [table]);

Then use it in a widget:

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

   class _CrudPageState extends State<CrudPage> {
      SelectBloc bloc;

   void initState() {
      bloc = SelectBloc(database: db, table: "item");

   Widget build(BuildContext context) {
      return Scaffold(
         body: CrudView(bloc: bloc, nameField: "varchar"),
            CrudAddActionButton(db: db, schema: db.schema.table("item")),

   class CrudPage extends StatefulWidget {
      _CrudPageState createState() => _CrudPageState();

Infinite list view #

      db: db,
      table: "product",
      limit: 15,
      orderBy: "name",
      itemsBuilder: (context, item) {
         return ListTile(
            title: Text(item['name']), trailing: Text(item["price"]));

Todo #

  • [ ] Add validators for forms in CrudView

Changelog #

0.2.1 #

  • Update code for flutter_slidable api change
  • Update dependencies
  • Fix null values for varchar and text column types

0.2.0 #

  • Add infinite list view
  • Add automatic forms generation to edit rows in CrudView

0.1.0 #

Initial release


example #

A new Flutter project.

Getting Started #

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  sqlview: ^0.2.1

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:sqlview/sqlview.dart';
Version Uploaded Documentation Archive
0.2.1 Jun 1, 2019 Go to the documentation of sqlview 0.2.1 Download sqlview 0.2.1 archive
0.2.0 May 31, 2019 Go to the documentation of sqlview 0.2.0 Download sqlview 0.2.0 archive
0.1.0 Mar 15, 2019 Go to the documentation of sqlview 0.1.0 Download sqlview 0.1.0 archive
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Jun 17, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.3.2
  • pana: 0.12.18
  • Flutter: 1.5.4-hotfix.2


Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health issues and suggestions

Fix lib/src/crudview/form.dart. (-25 points)

Analysis of lib/src/crudview/form.dart failed with 1 error:

line 95 col 7: Missing case clause for 'blob'.

Maintenance issues and suggestions

Support latest dependencies. (-25 points)

The version constraint in pubspec.yaml does not support the latest published versions for 4 dependencies (1 direct: sqlcool).


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.2.2 <3.0.0
card_settings ^1.4.1 1.4.1
cupertino_icons ^0.1.2 0.1.2
flutter 0.0.0
flutter_slidable ^0.5.3 0.5.3
sqlcool ^2.8.2 2.9.0 3.0.0
Transitive dependencies
auto_size_text 1.1.2 2.0.1
collection 1.14.11
dart_internal 0.1.4
flutter_colorpicker 0.2.5
flutter_cupertino_settings 0.1.0
flutter_masked_text 0.7.0 0.8.0
intl 0.15.8
matcher 0.12.5
meta 1.1.6 1.1.7
observable 0.22.2
path 1.6.2
path_provider 1.1.0
quiver 2.0.3
sky_engine 0.0.99
sqflite 1.1.5
stack_trace 1.9.3
synchronized 2.1.0
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies