InspectSource class

Where a widget's constructor was called.

Only ever present when the program was compiled with --track-widget-creation — see DaemonConfig.trackWidgetCreation, which is why it is on. The location is read out of the framework's inspector rather than off the widget: the kernel transform stores it behind a private interface in package:flutter, and Dart mangles private names per library, so no code outside that library can name the field. Not even dynamically.

Constructors

InspectSource({required String file, required int line, required int column})
const
InspectSource.fromJson(Map<String, Object?> json)
factory

Properties

column → int
final
file → String
A file:// URI, as the framework reports it.
final
hashCode → int
The hash code for this object.
no setterinherited
line → int
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

describe({String? relativeTo}) → String
path/to/file.dart:12:5, with relativeTo stripped when it matches.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, Object?>
toString() → String
A string representation of this object.
inherited

Operators

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