copyWith method
Returns a copy of this exception with the given fieldName
added to the
path.
Implementation
@override
DanglingReferenceException copyWith({required String fieldName}) {
return DanglingReferenceException(path: [fieldName, ...path]);
}