FlutterDebugPanel class

Main class for the Flutter Debug Panel.

Usage:

void main() {
  FlutterDebugPanel.init(
    enable: true,
    enableShake: true,
    enableLongPress: true,
  );

  runApp(
    FlutterDebugPanel.wrap(
      MyApp(),
    ),
  );
}

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

config DebugPanelConfig
Get the current configuration.
no setter
isEnabled bool
Check if the debug panel is enabled.
no setter

Static Methods

clearLogs() → void
Clear all logs.
clearNetworkLogs() → void
Clear all network logs.
disableFeature(String feature) → void
Disable a feature flag.
enableFeature(String feature) → void
Enable a feature flag.
init({bool enable = true, bool enableShake = true, bool enableLongPress = true, bool enableThreeFingerTap = true, Duration longPressDuration = const Duration(seconds: 2), Color? backgroundColor, Color? accentColor}) → void
Initialize the debug panel with configuration.
initWithConfig(DebugPanelConfig config) → void
Initialize with a config object.
isFeatureEnabled(String feature) bool
Check if a feature flag is enabled.
log(String message, {LogLevel level = LogLevel.debug, String? tag}) → void
Log a debug message.
logRequest(DebugNetworkRequest request) → void
Log an HTTP request.
startShakeDetection(VoidCallback onShake) → void
Start shake detection.
stopShakeDetection() → void
Stop shake detection.
wrap(Widget app) Widget
Wrap the app with the debug panel overlay.