DurbunOptions class
Configuration of the Dürbün SDK.
await Durbun.run(() async {
WidgetsFlutterBinding.ensureInitialized();
runApp(const MyApp());
}, options: const DurbunOptions(host: '192.168.1.20'));
Constructors
-
DurbunOptions({bool? enabled, String? host, int port = 9751, bool captureNetwork = true, DurbunPrintCapture capturePrint = DurbunPrintCapture.auto, bool captureErrors = true, bool metrics = true, int maxBufferedMessages = 5000, List<
String> redactHeaders = const <String>[], String? appId, String? appName, String? appVersion, Duration waitForDesktop = Duration.zero, bool listenForUsb = true, bool useBackgroundIsolate = true, bool inspector = true, String? slackWebhook}) -
const
Properties
- appId → String?
-
Override the detected bundle id / package name.
final
- appName → String?
-
Override the detected display name.
final
- appVersion → String?
-
Override the detected version (Android cannot detect it without plugins).
final
- captureErrors → bool
-
Report
FlutterError.onError,PlatformDispatcher.onErrorand zone errors (crashes).final - captureNetwork → bool
-
Capture dart:io
HttpClienttraffic (package:http, Dio's default adapter,NetworkImage, …) and apply the desktop's mock rules.final - capturePrint → DurbunPrintCapture
-
print/debugPrintcapture policy.final - enabled → bool?
-
Whether the SDK runs.
null(default):final - hashCode → int
-
The hash code for this object.
no setterinherited
- host → String?
-
Desktop address for Wi-Fi (LAN) connections, e.g.
192.168.1.20or192.168.1.20:9751. Also read from--dart-define=DURBUN_HOST=…and theDURBUN_HOSTenvironment variable. USB and simulators need no host.final - inspector → bool
-
Keeps the last logs, requests and metrics on the device for the in-app
inspector (
DurbunInspector), with or without a desktop. Bounded: about 2,000 log lines, 300 requests and 24 MB of bodies.final - listenForUsb → bool
-
iOS physical devices: listen on 127.0.0.1:9752–9755 so the desktop can
connect over USB (usbmux).
final
- maxBufferedMessages → int
-
Outgoing messages kept while the desktop is unreachable (oldest dropped).
final
- metrics → bool
-
Send FPS, janky frames, frame build/raster times, memory and CPU.
final
- port → int
-
Desktop SDK port (default 9751). Used for 127.0.0.1 and for host.
final
-
redactHeaders
→ List<
String> -
Header names (case-insensitive) whose values are replaced by
••••before they leave the device, e.g.['authorization', 'cookie'].final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- slackWebhook → String?
-
Slack incoming webhook for the in-app panel's "Send to Slack": a log
line or a request goes to that webhook's channel when someone taps Send,
from the phone itself, without the desktop.
null(default): the--dart-define=DURBUN_SLACK_WEBHOOK=…value, else no Slack button.final - useBackgroundIsolate → bool
-
Run the transport (JSON encoding, socket I/O) on a background isolate.
final
- waitForDesktop → Duration
-
Durbun.run waits up to this long for the desktop before running the app
body, so mock rules apply to the very first requests. Default: no wait.
final
Methods
-
copyWith(
{bool? enabled, String? host, int? port, bool? captureNetwork, DurbunPrintCapture? capturePrint, bool? captureErrors, bool? metrics, int? maxBufferedMessages, List< String> ? redactHeaders, String? appId, String? appName, String? appVersion, Duration? waitForDesktop, bool? listenForUsb, bool? useBackgroundIsolate, bool? inspector, String? slackWebhook}) → DurbunOptions - Copy with some fields replaced.
-
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