sqlview 0.4.0

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",
      orderBy: "name",
      itemsBuilder: (context, item) {
         return ListTile(
            title: Text(item['name']), trailing: Text(item["price"]));

Todo #

  • [ ] Check table constraints and add validators for forms in CrudView

Changelog #

0.4.0 #

  • Add the DbViewer widget
  • Use stronger analysis options
  • Update dependencies
  • Add support for default values param in forms

0.3.0 #

  • Update dependencies
  • Fix null values for varchar and text column types
  • Update code for flutter_slidable api change
  • Use pedantic for analysis options
  • Minor fixes and linting

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.4.0

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';
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 Feb 16, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.5
  • Flutter: 1.12.13+hotfix.7


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.2.2 <3.0.0
card_settings ^1.4.2 1.6.1
cupertino_icons ^0.1.2 0.1.3
extra_pedantic ^1.1.1+3 1.1.1+3
flutter 0.0.0
flutter_slidable ^0.5.4 0.5.4
pedantic ^1.7.0 1.9.0
sqlcool ^4.1.1 4.3.0
Transitive dependencies
auto_size_text 2.1.0
collection 1.14.11 1.14.12
flutter_colorpicker 0.2.6 0.3.2
flutter_cupertino_settings 0.3.0
flutter_masked_text 0.8.0
flutter_material_pickers 1.2.0
intl 0.16.1
meta 1.1.8
path 1.6.4
path_provider 1.6.0
platform 2.2.1
sky_engine 0.0.99
sqflite 1.2.0 1.2.1-dev.3
synchronized 2.2.0
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies