objectbox_inspector 0.0.10 copy "objectbox_inspector: ^0.0.10" to clipboard
objectbox_inspector: ^0.0.10 copied to clipboard

A visual interface for all the classes annotated with @Entity in ObjectBox.

Objectbox Inspector for Objectbox #

pub package

This package provides a visual interface for all the classes annotated with @Entity in ObjectBox.

Objectbox Inspector Demo

Usage #

To use the Objectbox Inspector, you need to add the objectbox_inspector and objectbox_inspector_generator dependency to your project.

Note: Obviosly objectbox itself is required.

dependencies:
  objectbox_inspector: latest

dev_dependencies:
  objectbox_inspector_generator: latest

After running flutter pub get, you can run the objectbox_inspector command to generate the inspector.

flutter pub get
flutter pub run build_runner build

This will generate a objectbox.inspector.g.dart file in your project. That contains the necessary code to run the inspector.

Example #

final store = openStore(); // need the Store instance...

// ...
IconButton(
    onPressed: () => openObjectboxInspector(
        context,
        getInspectableBoxes(store),
    ),
    icon: const Icon(Icons.bug_report),
),
// ...

Advanced relations preview #

There might be a case where instead of the preview of the relation, you want to see the actual data.

Now for a ToOne relation you would get a default preview.

  • ToOne<User>(id: 1)

To override this you can override the @Entity's class toString method.

@Entity()
class User {
  @override
  String toString() => "User(id: $id)";
}

Note: you cannot override the ToMany relation preview (for now).

"Buy Me A Coffee"

6
likes
120
points
368
downloads

Publisher

verified publisheranotherit.company

Weekly Downloads

A visual interface for all the classes annotated with @Entity in ObjectBox.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter, objectbox, path

More

Packages that depend on objectbox_inspector