InspectorPlugin class abstract

Base class for ISpect inspector plugins.

Plugins extend the inspector panel with custom screens accessible via the draggable panel.

Example:

// 1. Define plugin
class DeviceInfoPlugin extends InspectorPlugin {
  @override
  String get id => 'device-info';

  @override
  String get title => 'Device Info';

  @override
  IconData get icon => Icons.phone_android;

  @override
  Widget buildScreen(BuildContext context) => const DeviceInfoScreen();
}

// 2. Register
ISpectBuilder.wrap(
  options: ISpectOptions(
    plugins: [DeviceInfoPlugin()],
  ),
  child: MyApp(),
)

Constructors

InspectorPlugin()
const

Properties

description String?
Optional description shown on long-press of the panel item.
no setter
enableBadge bool
Whether to show a badge indicator on the panel item. Override to provide dynamic badge state.
no setter
hashCode int
The hash code for this object.
no setterinherited
icon IconData
Icon shown in the draggable panel.
no setter
id String
Unique identifier for this plugin. Used for deduplication and settings persistence.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
title String
Human-readable title shown in panel tooltip and screen app bar.
no setter

Methods

buildScreen(BuildContext context) Widget
Build the full-screen widget for this plugin. Called when the user taps the plugin's panel item.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onDispose() → void
Called when ISpectBuilder disposes. Use for cleanup (cancel subscriptions, release resources).
onInit() → void
Called once when ISpectBuilder initializes. Use for one-time setup (register listeners, load data).
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited