DriftDebugServer mixin
Debug-only HTTP server (stub when dart:io unavailable).
All methods throw or return placeholder values. Use the VM build (drift_debug_server_io.dart) for real functionality.
On web, do not pass sensitive data (e.g. auth tokens) to start—parameters are ignored and start only throws; no server is started.
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
- changeDetectionEnabled → bool?
-
Stub: always returns null (server not available
on web).
no setter
- monitoringEnabled → bool?
-
Stub: always returns null (server not available on web).
no setter
- port → int?
-
Stub: always returns null (server not running).
no setter
Static Methods
-
reportActivity(
String sql) → void -
Stub: silent no-op — deliberately NOT a throw. This is a hot per-query
hook the host may wire into drift's
logStatements/QueryInterceptorunconditionally; throwing here would crash every query of a web build that shares that wiring, when the correct web behavior is simply "no capture" (the server never runs on web anyway). -
reportAppQuery(
{required String sql, required int durationMs, required int rowCount, bool isWrite = false, String? error}) → void - Stub: no-op. Same rationale as reportActivity — the app wires this into a per-query hook and calls it unconditionally; the server never runs on web, so the correct behavior is "no capture", not a throw.
-
setChangeDetection(
bool enabled) → void - Stub: no-op (server not available on web).
-
setMonitoringEnabled(
bool enabled) → void - Stub: no-op (server not available on web).
-
start(
{required Future< List< query(String sql), Future<Map< >String, dynamic> >List< queryWithBindings(String sql, {Map<Map< >String, dynamic> >String, Object?> ? namedArgs, List<Object?> ? positionalArgs})?, bool enabled = true, int port = 8642, bool loopbackOnly = false, String? corsOrigin = '*', String? authToken, String? basicAuthUser, String? basicAuthPassword, Future<List< getDatabaseBytes()?, Future<int> >List< queryCompare(String sql)?, Future<Map< >String, dynamic> >void> writeQuery(String sql)?, Future<void> writeQueryWithBindings(String sql, {Map<String, Object?> ? namedArgs, List<Object?> ? positionalArgs})?, void onLog(String message)?, void onError(Object error, StackTrace stack)?, void onClassifiedError(Object error, StackTrace stack, DriftDebugErrorKind kind)?, Duration? sessionDuration, int? maxRequestsPerSecond, Set<String> ? declaredTableNames, DeclaredSchemaCallback? declaredSchema, DeclaredRelationshipsCallback? declaredRelationships, int? declaredSchemaVersion, List<String> staticTables = const <String>[], String? snapshotStorePath, String? discoveryDirectory, bool monitoringEnabled = true}) → Future<void> - Stub: always throws UnsupportedError.
-
stop(
) → Future< void> - Stub: no-op.