sanitizedName property
Returns the sanitized name of this entry.
Implementation
@override
String get sanitizedName {
final String? fromCachedInstantiations = _cachedInstantiations
.map((InstantiatedInspectEntry e) => e.sanitizedName)
.firstOrNull;
if (fromCachedInstantiations != null) {
return fromCachedInstantiations;
}
final String? fromModuleConnections = moduleConnections
.map((InspectEntryModuleConnection e) => e.sanitizedName)
.firstOrNull;
if (fromModuleConnections != null) {
return fromModuleConnections;
}
try {
final Object? value = this.value;
if (value is PythonObjectInterface) {
final String? name = value.getAttributeOrNull("__name__");
if (name != null) {
return sanitizeName(name);
}
}
} on PythonExceptionInterface<PythonFfiDelegate<Object?>,
Object?> catch (_) {
// ignore
} on PythonFfiException catch (_) {
// ignore
}
throw UnimplementedError();
}