toObject method

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

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.

Implementation

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

  final _InspectorReferenceData data = _idToReferenceData[id];
  if (data == null) {
    throw FlutterError('Id does not exist.');
  }
  return data.object;
}