TracklyInspectorController class
Stores the calls and logs shown by the inspector, and notifies listeners when they change.
Use the shared TracklyInspector.controller unless you need a separate
one.
- Inheritance
-
- Object
- ChangeNotifier
- TracklyInspectorController
Constructors
Properties
-
calls
→ List<
TracklyHttpCall> -
The recorded calls, oldest first.
no setter
- enabled ↔ bool
-
Whether calls and logs are recorded. Defaults to
falsein release builds.getter/setter pair - hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- lastCall → TracklyHttpCall?
-
The most recent call, if any.
no setter
- logOutput → TracklyOutput
-
A TracklyOutput that records log records in this controller.
latefinal
-
logs
→ List<
TracklyRecord> -
The recorded log records, oldest first.
no setter
- maxBodyLength ↔ int
-
Bodies longer than this many characters are truncated.
getter/setter pair
- maxCalls ↔ int
-
The number of calls kept. The oldest are dropped first.
getter/setter pair
- maxLogs ↔ int
-
The number of log records kept. The oldest are dropped first.
getter/setter pair
- maxScreenVisits ↔ int
-
The number of screen visits kept. The oldest are dropped first.
getter/setter pair
- pendingCount → int
-
The number of calls still in progress.
no setter
-
redactedHeaders
↔ Set<
String> -
Headers whose values are hidden, e.g.
{'authorization', 'cookie'}.getter/setter pair - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
screenVisits
→ List<
TracklyScreenVisit> -
The screens the app showed, with their load times, frames, and
requests, oldest first.
no setter
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
addLog(
TracklyRecord record) → void - Records a log record.
-
clearCalls(
) → void - Removes all recorded calls.
-
clearLogs(
) → void - Removes all recorded log records.
-
clearScreenVisits(
) → void - Removes all recorded screen visits, except the one showing now, which starts over.
-
completeCall(
TracklyHttpCall call, {required int statusCode, String? reasonPhrase, Map< String, String> headers = const {}, Object? body}) → void -
Records the response of
call. -
dispose(
) → void -
Discards any resources used by the object.
override
-
failCall(
TracklyHttpCall call, Object error) → void -
Records that
callfailed without a response. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
startCall(
{required String client, required String method, required Uri uri, Map< String, String> headers = const {}, Object? body, List<TracklyFormField> ? formData}) → TracklyHttpCall? -
Records the start of a request. Returns
nullwhen not enabled. -
startScreen(
String name) → void -
Records that the screen called
nameis now showing. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited