toObject method

  1. @protected
Object? toObject(
  1. String? id,
  2. [String? groupName]

Returns the Dart object associated with a reference id.

The groupName parameter is not required by is added to regularize the API surface of the methods in this class called from the Flutter IntelliJ Plugin.


Object? toObject(String? id, [ String? groupName ]) {
  if (id == null) {
    return null;

  final InspectorReferenceData? data = _idToReferenceData[id];
  if (data == null) {
    throw FlutterError.fromParts(<DiagnosticsNode>[ErrorSummary('Id does not exist.')]);
  return data.value;