database_inspector 1.0.7 copy "database_inspector: ^1.0.7" to clipboard
database_inspector: ^1.0.7 copied to clipboard

Inspect your database in the Flutter DevTools.

Usage #

final db; // Some drift database

useEffect(() {
    final dbClient = DriftDatabaseClient(id: 'my_db_id', db: db);
    DatabaseDevtoolsBinding.registerClient(
        dbClient,
        dbReset: () async {
            // Function to reset the database (close + delete file)
            await deleteLocalDb(ref);
        },
    );

    return () {
        DatabaseDevtoolsBinding.unregisterClient(dbClient.id);
    };
}, [db]);
0
likes
115
points
174
downloads

Publisher

unverified uploader

Weekly Downloads

Inspect your database in the Flutter DevTools.

Repository (GitLab)

Documentation

API reference

License

unknown (license)

Dependencies

drift, meta, web

More

Packages that depend on database_inspector