drift_db_viewer

Creator: coderz1093

Last updated:

Add to Cart

Description:

drift db viewer

drift_db_viewer #

This package allows us to view our database in our development app without the need of exporting your database file.
Filtering is done at database level
Example #

Setup #
Add dependency to pubspec #

dependencies:
drift_db_viewer: <latest-version>
copied to clipboard
Use it #
Push a new route. The child will be the DriftDbViewer and pass your database to this screen.
final db = MyDatabase(); //This should be a singleton
Navigator.of(context).push(MaterialPageRoute(builder: (context) => DriftDbViewer(db)));
copied to clipboard
Drift Config #
Using named columns #
When using named columns you should add a @JsonKey to the column otherwise we won't be able to hide this table
class Todos extends Table {
IntColumn get id => integer().autoIncrement()();

TextColumn get title => text().withLength(min: 6, max: 32)();

@JsonKey('body') //This is required for the drift_db_viewer.
TextColumn get content => text().named('body')();

IntColumn get category => integer().nullable()();
}
copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.