clone method
Deep clones the node.
Implementation
@override
ObjectNode clone({required bool keepParent, I18nLocale? locale}) {
final node = ObjectNode(
path: path,
rawPath: rawPath,
modifiers: modifiers,
comment: comment,
entries: entries.map(
(key, value) => MapEntry(
key,
value.clone(keepParent: keepParent, locale: locale),
),
),
isMap: isMap,
);
if (keepParent && parent != null) {
node.setParent(parent!);
}
node.setGenericType(genericType);
if (interface != null) {
node.setInterface(interface!);
}
return node;
}